September 7, 2017 - rob

X11VNC with RedHat / CentOS 7

I recently built a CentOS 7 machine and wanted to control the X desktop remotely.  I have another post that deals with how to do this on a Linux Mint / Ubuntu machine, but CentOS uses a different X manager.   Here is what I did to get it working:

yum install x11vnc

You might need to install the EPEL repo to get x11vnc

sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass

sudo vi /etc/gdm/Init/Default

Add this line to the file just before exit 0:

/usr/bin/x11vnc -nap -bg -many -repeat -clear_keys -rfbauth /etc/x11vnc.pass -rfbport 5900

sudo vi /etc/gdm/custom.conf

Add / edit KillInitClients option in the [daemon] section to:


Reboot the machine

Also, you can find out which x manager you are using with these simple commands:

pgrep -x kdm
pgrep -x gdm
pgrep -x xdm

whichever returns a value is the one you a running.  

Linux CentOS / Linux / x11vnc /