Saturday, November 04, 2006

VNC (a.k.a. KDE 'Desktop Sharing') crashing and slow performance workaround


Disable the built-in 'Desktop Sharing' and install x11vnc:

# apt-get install x11vnc

If you have an existing VNC password file:

# x11vnc -display :0 -rfbauth ~/.vnc/passwd


To set the password (not my preferred way):

# x11vnc -storepasswd yourpassword /path/to/password

Or set the password using vncpasswd (part of vnc-common):

# vncpasswd

***

Alternatively, create ~/.x11vncrc with all the options you need and then just start 'x11vnc'.

# ~/.x11vncrc
# ** uncomment options you need **

# password file must use full path
rfbauth /home/user/.vnc/passwd

display :0
forever
shared

# keyboard repeat
repeat

# visual speed tweak
nodragging

# CPU performance tweak (?)
threads

# be less verbose
quiet

# put process in background
#bg

# show GUI
#gui


To stop x11vnc running in background ('bg' option):

# x11vnc -remote stop