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


Click here to return to the 'What about GUI commands?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
What about GUI commands?
Authored by: schnarr on Feb 21, '03 01:51:58PM

This is similar to the way displays are handled on Xwindows with xhost set to -, only I don't think there's any way to allow all hosts to connect to OSX's display (I haven't seen one yet, at least). The purpose of xhosts on Xwindows systems is to allow other hosts to connect to and bring up windows on your display.

On an Xwindows system, typing 'xhost -' disables anyone else from sending a window to your display. If you've got X11 or XFree86 installed, try the following:
start X11
launch an xterm
xhost + (or xhost + [your machine/remote machine])
echo $DISPLAY
su - [some other user]
echo $DISPLAY
note that the display won't be set for this user, so you won't be able to launch any new Xwindows from here -
try one:
xterm
(error about Can't open display)
if using csh, tcsh, or zsh type
setenv DISPLAY [use value from DISPLAY above]
otherwise, type
export DISPLAY=[value from DISPLAY above]
xterm
the xterm is now be launched as the other user on your display.

btw, setting and leaving xhost + is a BAD IDEA, because anyone can send a window to your display, and it could look like another window you have open (tricking you into sending them information you don't want to send), or they could send you annoying pictures or ads (hey admin, Al's looking at porn again... no I'm no... - where the heck did that come from!?!).



[ Reply to This | # ]