Setting up vnc to handle connections at a variety of resolutions under Fedora Co

Print Friendly, PDF & Email

Summary of the steps required to make it so that vnc can connect the a Fedora Core 6 linux box using hostname:SCREEN_NUM where SCREEN_NUM allows the choice of various resolutions.’, ‘

We access our machines at home from a variety of computers. While my main computer has a high resolution screen, others have moderate to low resolution. Using a variety of vnc server resolutions allows me to easily choose the right resolution when logging into my machine remotely.

This is summarized and customized from this forum posting:

http://forums.teamphoenixrising.net/showthread.php?t=32325

As root:

  1. Install xinetd service
    1. yum install xinetd
    2. chkconfig xinetd on
    3. service xinetd start
  2. Run gdmsetup
    1. Under the remote tab, set it to be “Same as Local”
    2. Close gdmsetup
  3. Edit /etc/services and add several new services.
    • vnc1280 5901/tcp # VNC Server
    • vnc1024 5902/tcp # VNC Server
    • vnc800 5903/tcp # VNC Server
  4. Create several new files under /etc/xinet.d/
    • Create a new file for each service specified above (vnc1280 for example) .
    • Each file should look like the following, with the SERVICE_NAME and GEOMETRY set appropriately. Cutting and pasting is good.
    service SERVICE_NAME
    {
    disable = no
    socket_type = stream
    protocol = tcp
    group = tty
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -inetd -query localhost -geometry GEOMETRY -depth 24 -once -fp unix/:7100 -securitytypes=none
    }
    

    Appropriate values for this example:

    SERVICE_NAME      GEOMETRY
    vnc1024           1024x768
    vnc1280           1280x1024
    vnc800            800x600
    
  5. run system-config-securitylevel to ensure that the vnc ports are open in the firewall.
    1. Expand “Other ports”
    2. Add ports 5901-5903/tcp.
    3. Click ok to exit and ok again to accept the changes.
  6. Turn off vncserver in case it is running.
    chkconfig --level 2345 vncserver off
  7. Easiest is to reboot the computer at this point. However, as the article above points out, from a root prompt, you can type init 3; init 5; /etc/init.d/xinetd restart and the system will be reset enough to enable vncviewer to work. Obviously this will only work if you\’ve logged in remotely via ssh or something similar, and are not sitting on the console in graphical mode. 🙂
  8. Test by trying to use vncviewer localhost:3; you should have a login prompt in an 800×600 window.

Leave a Reply