Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use other terminal apps with Apple's X11' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use other terminal apps with Apple's X11
Authored by: EddEdmondson on Aug 27, '04 03:05:48AM

Good idea but there's one flaw with what you're doing:

The DISPLAY variable is only 0 if you are the first user running X11.app. If you FUS to another user and start another X11.app the DISPLAY variable will be 1. To do things properly you probably need a clever Applescript to switch to X11.app and try to get the variable from there and pass it back.

If you're the sole user on your machine you'll be fine - but beware if you aren't!!



[ Reply to This | # ]
Solution?
Authored by: EddEdmondson on Aug 27, '04 03:09:03AM

A possible alternative to the problems with the DISPLAY variable taking on other values - arrange for your .xinitrc file to place the DISPLAY variable in a file like '.x11appdisplay' in your home directory, and parse its contents if the X11.app is found to be running on the start of a shell. I'll leave the details of this as an exercise for the reader based on other posted scripts!



[ Reply to This | # ]