Setting up XVNC support on Fedora

 

Install VNC

Install the VNC server packages using the Fedora package manager

Setup /etc/services

We will need to add the port number that we will be using for the VNC session in /etc/services

If you plan to use different sessions with different screen resolutions then more than one configuration with a different port number assigned can be included here

For example add the following to the /etc/services file

vnc1024 5900/tcp #VNC server 1024x768

vnc1440 5901/tcp #VNC server 1440x900

5900 is the default VNC port number

Setup xinetd to start VNC

VNC sessions can be started using xinetd

If xinetd is not installed you will need to install using the fedora package manager, one way to do this is to type at the command line system-install-packages xinetd

Once xinetd is installed you will need to create files in /etc/xinetd.d directory corresponding to your entries in the /etc/services file.

For example as we have vnc1024 specified in /etc/services we will create a file named vnc1024, contents as follows

service vnc1024
{
        disable = no
        socket-type = stream
        protocol = tcp
        group = tty
        wait = no
        user = nobody
        server = /usr/bin/Xvnc
        server_args = -desktop linuxhostname -inetd -query localhost \
          -geometry 1024x768 -once -securitytypes=none -rfbport 5900 :1
}

Replace "linuxhostname" for the hostname of your linux box

Create any other files for any other entries in the services file as required

Restart xinetd as follows

service xinetd restart

Configure GDM to allow remote logins

Using the GUI

Login into the graphical console such as Gnome

Then select System|Administration|Login Screen from the menu.

Select the Remote tab and choose "Same as Local" to enable remote logins.

Select the Security tab and uncheck "Deny TCP connections to X server".

Select close

Using the command line

Edit /etc/gdm/custom.conf an ensure the file contains only the following, the other sections should be blank

[daemon]
RemoteGreeter=/usr/libexec/gdmgreeter

[security]
DisallowTCP=false

[xdmcp]
Enable=true

Restart GDM

GDM will now need to be restarted

Type the following

killall gdm-binary

Or you could reboot if that doesn't work

Give it a go

Try connecting using a VNC viewer from say another PC

Ensure you have opened up the correct ports if you are using a firewall

You should be able to login to the linux graphical desktop

If vnc viewer starts to connect then bombs out, and you are using fedora 7, try disabling the accessible login support

You can do this via the "Login Screen adminstration GUI" or by editing /etc/gdm/custom.conf and adding "AddGtkModules=false" to the [daemon] section. If you modify the file then restart gdm with killall gdm-binary