if [ "`ps axc | egrep XDarwinStartup`" != "" ]; then
export DISPLAY=:0
fi
or alternatively,
if [ -n "`ps axc | egrep XDarwinStartup`" ]; then
export DISPLAY=:0
fi
[ -n "..." ] is a test for nonemptiness against string "...". egrep can be used in place of grep. On many systems, grep is just a symbolic link to egrep. On 10.2.2, /usr/bin/grep seems to be a hard link to /usr/bin/grep, BTW.
No success guaranteed or implied.
By the way, I'm not sure why "DISPLAY=:0" is preferred over "export DISPLAY=$HOSTNAME:0" (or "sentenv DISPLAY $HOSTNAME:0" in (t)csh). I still don't really understand how X works ever after trying to make friends with it. Could somebody here explain why?
Cheers,
Kow
On Thursday, Dec 19, 2002, at 10:49 US/Pacific, Sylvain Cuaz wrote:
but this always set DISPLAY, and thus can cause the problem I mentioned. Here's what I've just come up with :
if ("`ps axc | grep XDarwinStartup`" != "") then
setenv DISPLAY :0
endif
this will set DISPLAY only if XDarwin is launched. Of course you could mix the 2 (by adding $?DISPLAY), if you don't want to overwrite DISPLAY.
--
zauc
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users
------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Fink-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-users
