[CentOS] Headless VNC problem


Recommended Posts

Aldur82

I'm going to say it right away...I am a linux noob, but thought it was about time I started to learn.

Here is the current setup:

I have CentOS 5.6 installed and working fine.

I have VNC Server set up as a headless box (not sure if that is the correct term...I've got it so I remote in and login like I would if I was sat in front of the computer, instead of into a particular desktop like a normal VNC connection).

The problem I am having is that when I log in through VNC it's using a temporary .Xauthority file instead of the one located in my home directory. This is causing me to have to use 'xhost +localhost' if I want to run any GUI admin functions (like I said, still a noob so I sometimes use the GUI application installer so I can read about software to see if it's what I want).

I should point out when I ssh into the machine, it uses the correct .Xauthority file.

The way I set up the VNC server was by following the guide on this page from "Configuring Xinetd for VNC".

I know enough about linux to not just blindly run scripts, and you learn by doing so I manually went through and set everything up.

Unfortunately I don't know enough to distinguish distro specific things from guides like this, so by blindly following the guide I may have used the wrong file locations in places without realising.

One thing I did change from the guide was the 'AllowRemoteRoot=true' to 'AllowRemoteRoot=false'...but that was yesterday after I became aware of this problem.

If anyone has any experience in successfully setting up this kind of VNC access I would appreciate any help.

Link to post
Share on other sites
ichi

Try setting the XAUTHORITY environment variable before launching the vncserver (to ${HOME}/.Xauthority or whatever). You can also check the vncserver startup script and find where it's looking for the .Xauthority file.

Link to post
Share on other sites
Aldur82

Try setting the XAUTHORITY environment variable before launching the vncserver (to ${HOME}/.Xauthority or whatever). You can also check the vncserver startup script and find where it's looking for the .Xauthority file.

Here comes the noobness I was speaking of in my original post...where would I check/find this information/files?

Link to post
Share on other sites
Aldur82

OK, after a bit more trouble shooting and looking at error logs it appears the problem is coming from the Xsession not being able to find the user that logs on.

xsession-errors has the line

No profile for <anyusername> found.
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/32732

This happens with any username that is used to login through the VNC connection, even root (I enabled the RemoteRoot login to test this).

The way my thinking is heading now is it's the session manager that can't find the correct folder for the user logging on, so loads a temporary one.

Where would I track down the configuration file for the session manager to check where it's looking for the profiles, and what else could I check to narrow down the cause of this problem?

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.