Posted by: jasonk2600 | January 3, 2010

Remotely Controlling X Windows on Debian GNU/Linux


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.


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, you would connect to 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.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: