From Bashlinux
Revision as of 23:50, 22 July 2015 by Manpaz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to install VNC server

Pretty straight forward, x11vnc is reliable vnc server which doesn't take much or even all the CPU usage. To install it run:

# yum -y install x11vnc xinetd

How to generate a password for x11vnc

x11vnc -storepasswd

Then x11vnc will prompt you for a password for the user this command is being executed by

How to setup VNC on demand

To improve the usage of VNC, it can be triggered by xinetd, a configuration file under /etc/xinetd.d must look like

service x11vnc
       disable         = no
       socket_type     = stream
       protocol        = tcp
       port            = 5900
       wait            = no
       user            = root
       server          = /usr/bin/x11vnc
       server_args     = -inetd -display :0 -scale 2/3 -ncache 10 -auth /var/gdm/\:0.Xauth -usepw -rfbauth /opt/bashlinux/.vnc/passwd -o /opt/bashlinux/.vnc/x11vnc.log

That means that a service with such name must be created in order to let xinetd know which service to trigger when the desired port is bind. it could be accomplished by adding it to `/etc/services`

# echo "x11vnc 5900/tcp" >> /etc/services

At the end, ensure that X server grants access to DISPLAY 0 by adding at the end of the <t>~/.bashrc</tt> file:

xhost +
Warning Important
Please ensure that xinetd is installed before start VNC setup.

How to setup VNC on demand over SSL

Some things that should be considered in order to get connection to a VNC terminal are:

  • Iptables is set to only listen for VNC calls from server, to get connection from your terminal you need to remove the statement -s on /etc/sysconfig/iptables rule for vnc.
  • For Mac users doing VNC over SSL, ssvnc is available at
  • add the following option at the end of the x11vnc command arguments
-ssl SAVE


  • x11vnc certificates and key management