Slackware This Forum is for the discussion of Slackware Linux.
|
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-04-2005, 11:14 AM
|
#1
|
|
Member
Registered: Oct 2004
Location: Here
Distribution: Slackware 12, openSuSE 11.0, XP
Posts: 76
Rep:
|
Root can't open display, but normal user can?
Hi,
I'm using Slackware 10.1 with a 2.6.10 kernel.
If I load up Fluxbox (or KDE, whichever GUI it doesn't matter), load up a terminal and run something like xine, it works perfectly in my user.
However, if I go su and then try and run xine (or anything that tries to use X) I get an error message:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Cannot open display
Any ideas? I need to be able to run programs as root in the GUI really.
Thanks
|
|
|
|
06-04-2005, 11:17 AM
|
#2
|
|
Senior Member
Registered: Dec 2003
Posts: 3,142
Rep: 
|
Had this problem in debian as well.
The best solution would be to use sux (su in X) or su-to-root (or any other graphical su like gksu, kdesu and so on).
Last edited by vharishankar; 06-04-2005 at 11:20 AM.
|
|
|
|
06-04-2005, 11:27 AM
|
#3
|
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
you can also type " xhost + " in a console as user.
that gives others permission to use the graphics.
egag
|
|
|
|
06-04-2005, 11:31 AM
|
#4
|
|
Senior Member
Registered: Dec 2003
Posts: 3,142
Rep: 
|
Quote:
you can also type " xhost + " in a console as user.
that gives others permission to use the graphics.
|
Yes. But I don't think it's quite as clean a solution as using a graphical su program to launch GUI apps.
But both methods should work well for you.
Just remember to run the xhost + every time you reboot or save this in your bootup script in /etc/rc.d.
|
|
|
|
06-05-2005, 09:25 PM
|
#5
|
|
LQ Newbie
Registered: Oct 2003
Posts: 16
Rep:
|
kde already has a "run as root" GUI interface.
but yeah, basically i would normally do the xhost command mentioned above as it can be tedious typing the root password many times.
|
|
|
|
06-05-2005, 10:20 PM
|
#6
|
|
Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194
Rep:
|
Or this better way:
export DISPLAY=:0 #assuming it wasn't set already
xauth merge ~user_in_x/.Xauthority
Also "xhost +local:" is better than just "xhost +", but not as good as the above. The above xauth command only allows root to use X, "xhost +local:" allows anyone locally at the computer, "xhost +" allows anyone who can connect to your computer. And the xauth usually only works as root and the xhost only works as the user currently in X.
|
|
|
|
06-05-2005, 11:48 PM
|
#7
|
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
Just wanted to add, I'm sure you must know this, but just in case, you can startx as root. And if you've display 0 running with your user, you can use startx -- :1 to open another X server (can access it with CTRL+ALT+F8).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:22 PM.
|
|
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
|
|