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: jhegarty on Apr 10, '04 05:44:18AM

Interesting. I also prefer the Terminal, but don't always start X before starting the Terminal. It also seems like when I put the machine to sleep, X gets confused and I have to restart it when I wake the machine up (but I don't want to close and then reposition all my terminals!). I worked around the problem of having the Terminal start first by adding

[ ! "$DISPLAY" ] && export DISPLAY=:0.0

to my /etc/profile. (i.e.: if DISPLAY is not set when the Terminal starts, set it to :0.0, otherwise use the existing $DISPLAY) Of course, I'm really the only regular user on this machine, and definitely the only one using X locally. Setting the display like this doesn't seem to break ssh for remote logins, by the way. If I login to this machine remotely and X is already running locally, ssh still sets the display correctly for forwarding.

** Note: This was a Physicist's hack. Less messy than the Biologist's hack, but much more spur-of-the-moment and broken. ;)

Hmm .. it might be worthwhile to write a script that checks for the ownership of the .X##-lock files, and sets the display according to which one you own. That way X can still give you whatever display it wants to, and it should be trivial for a user to run a single command if they discover their X isn't set correctly (without worrying about exactly what it's supposed to be set to), right?

---
--[ you cannot consistenly judge this statement to be true ]--



[ Reply to This | # ]