LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Allowing root to use X (https://www.linuxquestions.org/questions/linux-distributions-5/allowing-root-to-use-x-126589/)

indigojo_uk 12-17-2003 05:24 AM

Allowing root to use X
 
Does anyone know how to allow 'root' to use the X server when a common user is logged in? Whenever I try to run an X program as root, I get a message like this:

linux:/home/indigojo # yast2 &
[1] 2085
linux:/home/indigojo # Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

y2controlcenter: cannot connect to X server :0.0

How do I sort this out? I would have thought that root would have access to the X server anyway?!

indigojo_uk 12-17-2003 05:25 AM

BTW I'm using SuSE v9 professional

BrianNJ 12-18-2003 10:46 AM

i'm no guru... but the short of the answer is that only one user has access to an x session at a time.

i get around it by issuing
Code:

xhost +localhost
then switch to root, and run yast2

indigojo_uk 12-19-2003 06:38 AM

Thanks ... I had heard of xhost +localhost but I didn't realise you had to type it *before* going into root mode. I thought root had general access as with the file system.


All times are GMT -5. The time now is 10:55 PM.