Setting up vnc to handle connections at a variety of resolutions under Fedora Co
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:
- Install xinetd service
- yum install xinetd
- chkconfig xinetd on
- service xinetd start
- Run
gdmsetup
- Under the remote tab, set it to be “Same as Local”
- Close gdmsetup
- Edit /etc/services and add several new services.
- vnc1280 5901/tcp # VNC Server
- vnc1024 5902/tcp # VNC Server
- vnc800 5903/tcp # VNC Server
- 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
- run
system-config-securitylevel
to ensure that the vnc ports are open in the firewall.- Expand “Other ports”
- Add ports 5901-5903/tcp.
- Click ok to exit and ok again to accept the changes.
- Turn off vncserver in case it is running.
chkconfig --level 2345 vncserver off
- 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. 🙂 - Test by trying to use vncviewer localhost:3; you should have a login prompt in an 800×600 window.