Article View: news.software.readers
Article #35326Re: [SLRN] Detecting X (was: [SLRN] Help w/macro please)
From: Greg Wooledge
Date: Sat, 19 Jul 1997 00:00
Date: Sat, 19 Jul 1997 00:00
31 lines
1837 bytes
1837 bytes
On Fri, 18 Jul 1997 03:52:12 +0200, Bjoern Frantzen <bjoff@bgnett.no> wrote: >I've seen the code in art.c, but I'm wondering if that code is so >good. On the *nix accounts I have I always declare DISPLAY in my >loginscripts as the display usually is on another machines. "Usually" isn't the same as "always", right? >Or maybe it's just my setups that are a bit uncommon... ;-) Probably. Maybe you could do something like this: if [ "$TERM" = xterm ]; then DISPLAY=mydisplay:0 export DISPLAY fi It depends on how you get in, etc. Since I don't have the details, I can't help more than this; you may have to be clever to get everything right. It's extremely common (a de facto standard, I'd say) to use the presence of $DISPLAY to indicate the presence of an X server. If you set $DISPLAY when you aren't running X, things will break. -- ------------ Greg Wooledge ------------- ------- wooledge@kellnet.com ------- --- http://kellnet.com/wooledge/main.html ---
Technical Details
Message-ID:
<slrn5t03bl.mca.wooledge@phoenix.local>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5sn34c.8o.pardoz@io.com> <slrn5so9nt.1u.bjoff@bgnett.no> <slrn5spe55.26.pardoz@io.com> <5qm549$p2l@cocoa.brown.edu> <slrn5stj2h.4e.bjoff@bgnett.no>Show Full Headers
Complete Article Headers
Message-ID: <slrn5t03bl.mca.wooledge@phoenix.local> Subject: Re: [SLRN] Detecting X (was: [SLRN] Help w/macro please) Date: Sat, 19 Jul 1997 00:00:00 +0000 From: wooledge@kellnet.com (Greg Wooledge) References: <slrn5sn34c.8o.pardoz@io.com> <slrn5so9nt.1u.bjoff@bgnett.no> <slrn5spe55.26.pardoz@io.com> <5qm549$p2l@cocoa.brown.edu> <slrn5stj2h.4e.bjoff@bgnett.no> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 257623221 Organization: homo sapiens Reply-To: wooledge@kellnet.com Newsgroups: news.software.readers