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


Click here to return to the 'A workaround for X11 sharing by multiple users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A workaround for X11 sharing by multiple users
Authored by: hopthrisC on Feb 25, '04 06:11:49PM
2) Thanks for open-x11 - its the solution we were looking for. I did not know about this command. Works perfectly so my workaround is...
It's all in the FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
...unnecessary...
At least you learned a lot about shell scripting and racing conditions ;)
...(just have to set up a series of aliases since the lab is used to just typing the program name - was hoping for something more seamless).
Ah! The joys of user education ;) Well, there is another hack that could help you with this. It's slightly ugly, but anyways: If you start X11.app from the Terminal (or from a script, which you can use as a Startup Item) like so:
  # /Applications/Utilities/X11.app/Contents/MacOS/X11 :$UID
It will use the user's (unique!) ID as display number. You then can set $DISPLAY to $UID in .tcshrc, .bashrc or even in ~/.MacOSX/environment.plist (which is the more general approach).

With this method the users can never get in each other's way and don't have to use open-x11. You only have to make sure that they don't start X11 on their own, or that they only start it via your script.

(With this method you can start several instances of X11.app at the same time, so don't be confused, if you see more then one X icon in the Dock!)

[ Reply to This | # ]