View previous topic :: View next topic |
Author |
Message |
Titeuf l33t
Joined: 19 Jun 2004 Posts: 759 Location: Middelkerke, Belgium
|
Posted: Wed Jun 30, 2004 10:23 pm Post subject: allow root to start programs using x |
|
|
I've logged in as a normal user. When I open a terminal and use su to go to root, and then wants to launch a program that uses the x-server I get this:
Code: | Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
kwrite: cannot connect to X server :0.0
|
How can I make xfree doesn't refuse te connection ? |
|
Back to top |
|
|
kiezpro Tux's lil' helper
Joined: 13 May 2004 Posts: 126 Location: Yes
|
Posted: Wed Jun 30, 2004 10:27 pm Post subject: |
|
|
It's a bit confusing, but you need to enable X connections from localhost, like this:
Do this as your regular user, not as root. |
|
Back to top |
|
|
CompNerd Retired Dev
Joined: 16 Mar 2003 Posts: 311 Location: 127.0.0.1
|
Posted: Thu Jul 01, 2004 5:10 am Post subject: |
|
|
Allowing connections from unauthorized connections can be percieved as a security risk. Once you are done, I would suggest that you do the following to reset the server's authentication settings.
CompNerd |
|
Back to top |
|
|
Titeuf l33t
Joined: 19 Jun 2004 Posts: 759 Location: Middelkerke, Belgium
|
Posted: Thu Jul 01, 2004 9:40 am Post subject: |
|
|
I've tried the xhost + localhost thing (as a normal user).
It says:
Code: | localhost being added to access control list |
So I don't think there is a problem here.
But when I su, and then launches for instance kwrite, I still get the same error:
Code: | Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
kwrite: cannot connect to X server :0.0 |
Can somebody help me with this ? |
|
Back to top |
|
|
Celtis l33t
Joined: 05 Jul 2003 Posts: 737
|
Posted: Thu Jul 01, 2004 9:50 am Post subject: |
|
|
Code: | * x11-misc/sux
Latest version available: 1.0-r1
Latest version installed: 1.0
Size of downloaded files: 9 kB
Homepage: http://fgouget.free.fr/sux/sux-readme.shtml
Description: "su" wrapper which transfers X credentials
License: X11 |
Emerge sux and then use that instead of su. |
|
Back to top |
|
|
Titeuf l33t
Joined: 19 Jun 2004 Posts: 759 Location: Middelkerke, Belgium
|
Posted: Thu Jul 01, 2004 9:51 am Post subject: |
|
|
This solved my problem.
Thank you |
|
Back to top |
|
|
10drill Tux's lil' helper
Joined: 27 May 2004 Posts: 104 Location: 0{here}1
|
Posted: Thu Jul 01, 2004 1:06 pm Post subject: |
|
|
I asked this question before too...another solution is if you are using KDE (as it sounds like you are with kwrite) you can do something like:
|
|
Back to top |
|
|
polle Veteran
Joined: 28 Feb 2003 Posts: 1498 Location: Belgium
|
Posted: Thu Jul 01, 2004 1:12 pm Post subject: |
|
|
or before you su to root do this:
export XAUTHORITY=/home/foo/.Xauthority |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
|
Back to top |
|
|
|