Linux
Accessing KDE desktop via VNC
Submitted by ross on Sun, 07/05/2009 - 18:28I wanted to be able to connect to my Linux system's boot up screen remotely using VNC.
To do that, I needed to install x11vnc. Since I'm running Kubuntu, the KDE version of Ubuntu, I simply typed:
$ sudo apt-get install x11vnc
After poking around I found the xauth file in /var/run/xauth, so to start x11vnc, I typed
$ XAUTH=`ls -t /var/run/xauth/* | head -n 1` $ nohup x11vnc -display :0 -auth $XAUTH &
Since x11vnc complains there is no password, I could have instead used:
$ XAUTH=`ls -t /var/run/xauth/* | head -n 1` $ nohup x11vnc -passwd insert_password_here -display :0 -auth $XAUTH &
I tried:
$ XAUTH=`ls -t /var/run/xauth/* | head -n 1` $ x11vnc -usepw -display :0 -auth $XAUTH
and even
$ x11vnc -storepasswd insert_password_here $HOME/.vnc/passwd $ XAUTH=`ls -t /var/run/xauth/* | head -n 1` $ x11vnc -passwdfile $HOME/.vnc/passwd -display :0 -auth $XAUTH
but couldn't get either to work.
When I was done with this VNC instance, I removed it from memory via:
$ killall x11vnc
This doesn't kill the actual desktop, just the x11vnc instance in memory.
To create a new virtual KDE desktop, I installed vnc4server via:
$ sudo apt-get install vnc4server
and then created the desktop with:
$ vnc4server -geometry 1024x768 -depth 24 :1
For -geometry, I can effectively use any values I want, but I generally use smaller values, as a larger desktop takes longer to repaint.
For -depth I usually use 24, or 32.
When I was done with this desktop, I removed it from memory via:
$ vnc4server -kill :1
- ross's blog
- Login or register to post comments
