Graphical remote login
August 9th, 2006
Troubleshooting remote graphical sessions from a Windows PC to a remote Fedora machine.
X Sessions
1) Make sure you aren't being blocked by your firewall(s).
If you want to establish an X session from a machine on the internal network to a machine in your DMZ (e.g. your web server), you'll need to open up DMZ pinholes to allow the server in the DMZ to send screen data to ports 6000 (and, for some reason, 6001) on the Windows machine. If you're using Smoothwall you can do this quite easily in the Smoothwall admin pages.
For an X session, check that your firewall on the Windows machine isn't blocking traffic from port 6000 on the Windows machine to port 177 (XDMCP) on the server in the DMZ via the UDP protocol. If the firewall blocks this, the X manager on your Windows PC will not find the DMZ server even if its up and running and listening for connections on port 177.
2) Check gdm is running:
SSH to the server and enter the command:
ps -ef | grep gdm
This will tell you if gdm has been started.
3) If it's not running use the command:
gdm &
to start gdm
Be aware that gdm uses up a lot of processing power. If you have your server set up to boot up to run level 3 (text-only login), it will be sitting with a black screen and a login prompt. When you start gdm, this changes to a graphical login (although, of course, you won't see this if the server doesn't have a monitor). So when you've finished your remote X session, you should use the command:
gdm-stop
to stop gdm, switching the local display on the server back to the text-only login.
VNC
The main things for troubleshooting VNC are to check that you have SSHed into the server to open up the tunnel to port 590n (e.g. 5903 for display 3).
You should never allow direct VNC access to the server, only via a port forward tunnel opened by an SSH session. This means that your session info for the VNC client will be something like:
localhost:3
Which only works if port 5903 on the machine you're at has been forwarded to port 5903 on the server you've SSHed to.
If you HAVE SSHed to the server and you still don't get the authentication dialog box of your VNC client, check that vncserver is running on the server.
To do this use the command:
ps -ef | grep Xvnc
If there isn't an Xvnc process using display 3, start vncserver, telling it to use display number 3.
To do this, use the command:
vncserver :3
Just remember to stop vncserver after you close your VNC window:
vncserver -kill :3
Note: VNC may also be blocked by your firewall(s).
Potentially similar posts
- Scan for available IP addresses – August 2011
- Rails Chronicles – Part 2 – July 2011
- Prevent Skype hogging port 80 – June 2011
- Adding your choice of text editor to Flare’s Open With menu – December 2010
- UNIX on Windows (Microsoft’s little secret) – March 2010