Lubos Rendek

The only solution is determination.

Configuration of VNC Client/Server Remote Dekstop on Debian Linux

| Comments

This is a short guide on how to configure remote desktop using VNC on Debian Linux. First install all necessary packages: SERVER:

1
# apt-get install vnc4server

CLIENT:

1
# apt-get install xvnc4viewer

Now change to a user you wish to connect as using your client. In my case the user is “lubos”:

1
# su lubos

Next, start vncserver and set your default resolution. If this is a first time you are starting vnc server you will be asked to supply a new password consisting of 6 - 8 characters.:

1
2
3
4
5
6
vnc4server -geometry 1300x750 -depth 24

You will require a password to access your desktops.
Password:
Verify:
New 'earth:1 (lubos)' desktop is earth:1

From the above we can see that new VNC server has started. Earth is actually my hostname so your output will be different. In any case it is always safer to use IP address instead a hostname ( depends on your DNS settings ). At this point we are ready to remote login to our server. From, remote client enter substituting your hostname with the actual IP address:

1
2
3
4
5
6
7
8
9
10
11
vncviewer 10.1.1.8:1

VNC Viewer Free Edition 4.1.1 for X - built Jan 30 2013 16:07:52
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Tue Feb 18 15:40:28 2014
 CConn:       connected to host 10.1.1.8 port 5901
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
Password:

Extra Settings Information

STOP VNC server

1
2
$ vnc4server -kill :1 
Killing Xvnc4 process ID 4962

Note the server number must match.

Start KDE desktop manager automatically

edit your ~/.vnc/xstartup file to include the following lines:

1
2
3
#!/bin/sh

startkde &

Save this file and start new VNC server or kill the existing and start new one again.

Change VNC password

As a regular user execute vncpasswd and enter your new password:

1
2
3
$ vncpasswd
Password:
Verify:

Comments