can't run X11 programs from xterm
Heya,
I got a 'little' problem, often when i want to start a program through the terminal while being in X window system it can't open the GUI. Then it gives the following error message: Code:
Xlib: connection to ":0.0" refused by server Code:
linux:/home/me # guarddog Any ideas? Thank you Suse linux 9.0 pro. pentium4 3 ghz 512 mb ram Asus P4P800 Ati Radeon 9800Pro 128 mb :scratch: |
Hmmm, are you doing an su to another user. It is pretty simple, as root, or user, before the
su, enter xhost + localhost This will allow other users to connect to the running user's X session. R.O. |
Tsk tsk tsk ;)
RolledOat, that's only half the story! You'dhave to add export DISPLAY=localhost:0.0 in the respective shell, too ... And then, xhost + is always a security risk. The cleaner alternative is a local ssh connection. ssh -X <otheruser>@localhost <program> Cheers, Tink |
Ahhh, tink, it was not saying 'unknown host/location'. It knew where to connect, just wasn't allowed to. Plus, adding localhost to xhost + is not that great a risk because only someone logged into localhost can connect to it. (If they had ssh/rsh, etc access, they would redirect to their local machine, which is a whole nother ball of wax).
I would agree that ssh is more secure, but did not want to overwhelm the poster. Besides, if the xhost + localhost didn't work, with a new error, then I would get into export DISPLAY, etc. R.O. |
thanks guys, both worked great :)
|
All times are GMT -5. The time now is 10:28 PM. |