This quickie howto will describe the basic steps necessary to configure a VNC server to enable remote control of the X Windows desktop environment on Debian GNU/Linux. VNC4 Server and the XFCE4 desktop environment will be used in this example. This howto also assumes that you already have XFCE4 up and running locally.
Install VNC4 Server via the Aptitude software package management utility.
# aptitude install vnc4server
Login as the user who’s X desktop you want to control remotely. Start the VNC4 Server for the first time to configure the login password. After the VNC4 Server has started, shut it down to continue configuring the server.
~$ vncserver You will require a password to access your desktops. Password: Verify: New 'debian:1 (username)' desktop is debian:1 Creating default startup script /home/username/.vnc/xstartup Starting applications specified in /home/username/.vnc/xstartup Log file is /home/username/.vnc/debian:1.log ~$ vncserver -kill :1 Killing Xvnc4 process ID 4057
Next, modify the /home/username/.vnc/xstartup file and set XFCE4 as the desktop environment.
#x-window-manager & startxfce4 &
Start the VNC4 Server again for the new settings to take effect.
~$ vncserver New 'debian:1 (username)' desktop is debian:1 Starting applications specified in /home/username/.vnc/xstartup Log file is /home/username/.vnc/debian:1.log
Open up your favorite VNC client on another system and attempt to connect to the newly configured VNC server on display 1. For example, if the IP address of your VNC server is 10.0.1.1, you would connect to 10.0.1.1:1 using the password you chose previously to login. If the connection attempt fails, be sure to review the log file in /home/username/.vnc for error messages.