Robert Leach wrote:
Yeah, I figured out that my root user can't do anything to my
home
directory on the network. I ran into a similar problem setting up
cpan. It wanted to create a .cpan directory and got permission denied.
Sounds like it's something similar here. Although I'd be mildly
surprised if root couldn't run the xwindows server... Maybe root tried
to write necessary files to my home directory during installation and
couldn't, hence I'm unable to run it?
It isn't that root can't run the X server; it's that the existing X
server process refuses the connection.
Typically, clients have to authenticate themselves to the X server.
They do this by passing the authentication data which is stored in
either the file specified by $XAUTHORITY or (if that isn't set)
$HOME/.Xauthority. The account under which the client runs is
irrelevant.
Typically, the error which you report occurs because $HOME isn't the
home directory of the user for whom the X server was started (by e.g.
xdm), and so $HOME/.Xauthority doesn't contain suitable authentication
data.
If I am running X under my user account ("glynn"), and I want to be
able to use X programs from within a shell which is running as root, I
need to do:
XAUTHORITY=/home/glynn/.Xauthority
export XAUTHORITY
X clients will then be able to obtain the necessary authentication
data and connect to the server.
OTOH, you state that:
Yeah, I figured out that my root user can't do anything to my
home
directory on the network.
Is your home directory mounted via NFS? If so, then the "root" account
on your system probably doesn't have root access to the NFS
filesystem, including your home directory. In which case, you would
have to manually copy the authentication data to a file which is
accessible to the local root account.
--
Glynn Clements <glynn.clements(a)virgin.net>