Fedora 11 VNC Server and Gnome

Scenario / Question:

How do I setup vncserver so I can remote into Fedora 11 and use Gnome desktop or GDM

Solution / Answer:

Install vnc-server on Fedora 11 machine and connect to Gnome desktop or GDM

Install Xinetd

# yum install xinetd

Enable XDMCP

# vi /etc/gdm/custom.conf

Change the follwoing lines:

[xdmcp]
Enable=true

[security]
DisallowTCP=false

Create VNC Xinetd Service

Create the following file:

# vi /etc/xinetd.d/vnc-server

Add the following to the file:

service vnc-server
{
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
}

Configure Firewall

Open port 5900/tcp and 5900/udp on your systems firewall

System -> Administration -> Firewall

Reboot your System

# shutdown -r now

Connect with a VNC client to your systems IP address and port 5900 (default vnc port)

5 Comments so far

  1. [...] Setup VNC server and Gnome Desktop | Fedora | Linux Tutorial [...]

  2. Daniel on October 1st, 2009

    Thank’s for posting!

    How would one go about changing the display number of the server?

  3. Fabio Milano on October 1st, 2009

    In traditional VNC the file is /etc/sysconfig/vncservers

    With the above I believe the display is handled by XDMCP and GDM ?

    You can define multiple service entries for different screen resolutions at different ports.

    Check this out:

    http://kbase.redhat.com/faq/docs/DOC-2517

  4. Daniel on October 1st, 2009

    So I should add

    VNCSERVERS=”8:username”
    VNCSERVERARGS[8]=”-geometry 1024×768″

    to the /etc/sysconfig/vncservers file to have vncserver listen on port 5908?

    Also, do you know of a GUI frontend for the vncserver that can change the port? I know vino did in fedora 10, it was a tab in the System -> Preferences -> Remote Desktop dialog, but it seems to have disappears as of fedora 11.

  5. Fabio Milano on October 1st, 2009

    Not unless you are using VNC without XDMCP.

    With XDMCP

    vi /etc/xinetd.d/vnc-server-5908

    service vnc-server-5908
    {
    disable = no
    socket_type = stream
    protocol = tcp
    group = tty
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
    }

    # vi /etc/services

    Add:

    vnc-server-5908 5908/tcp

    Dont forgot to open your firewall for 5908 !

    May need to restart system for effects to kick in

Leave a reply