[Scottish] Which distro

Colin McKinnon colin.mckinnon at ntlworld.com
Fri Dec 22 22:29:46 GMT 2006


On Thursday 21 December 2006 13:17, Ben Thorp wrote:
> > I will give this a try. SInce I have you online perhaps you can help
> > with another problem. Whenever I attempt activate an application like
> > Kate from the prompt using sudo kate I receive an error unable to
> > connect to X server.
>
> That's because the root user doesn't have permission to access the ordinary
> users X session in this way.
>

There are several ways around this - the cleanest one being to use (in  KDE) 
kdesu e.g. `kdesu xterm` which will prompt for the root password and then run 
the program.

Another solution is to (partially) disable access control to the screen using 
the xhost command, e.g.`xhost +localhost` allows any local process access to 
the screen regardless of the user.

The third way to open a window as a different user is to provide access to 
that specific user using the xauth command - your supposed to use it to 
export and import specific entries from you .Xauthority file, but a quicker 
solution is to just copy the .Xauthority file from the home directory of the 
current user to that of the user you want to run the program as.

There's probably other ways too.

Don't ya just luv X

C.



More information about the Scottish mailing list