Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-18-2003, 10:38 AM
|
#1
|
LQ Newbie
Registered: Nov 2003
Location: The Netherlands
Distribution: Suse 9.0 professional
Posts: 14
Rep:
|
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
Xlib: No protocol specified
Or with another program:
Code:
linux:/home/me # guarddog
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
guarddog: cannot connect to X server :0.0
However when i try to run the program from the kde menu it works fine.
Any ideas? Thank you
Suse linux 9.0 pro.
pentium4 3 ghz
512 mb ram
Asus P4P800
Ati Radeon 9800Pro 128 mb
|
|
|
12-18-2003, 11:19 AM
|
#2
|
Member
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843
Rep:
|
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.
|
|
|
12-18-2003, 11:29 AM
|
#3
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
Last edited by Tinkster; 12-18-2003 at 11:30 AM.
|
|
|
12-18-2003, 11:41 AM
|
#4
|
Member
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843
Rep:
|
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.
|
|
|
12-18-2003, 11:55 AM
|
#5
|
LQ Newbie
Registered: Nov 2003
Location: The Netherlands
Distribution: Suse 9.0 professional
Posts: 14
Original Poster
Rep:
|
thanks guys, both worked great
|
|
|
All times are GMT -5. The time now is 08:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|