Hi, @37li I found this on an old Debian wiki page. I am not sure if these files still exist on the repositories. but if they are, this may help. There is also another method which uses FreeNX server. But FreeNX requires additional installation files from an external source, I didn’t include it. I haven’t tried them as well.
Vnc Configuration in Debian
VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing `desktop’ environment not only on the machine where it is running but from anywhere on the Internet and from a wide variety of machine architectures.
Install vncserver (as root):
This package provides a vncserver to which X clients can connect and the server generates a display that can be viewed with a vncviewer.
It contains an X server connector so clients can connect to your local X desktop directly.
Note: This server does not need a display. You need a vncviewer to see something. This viewer may also be on a computer running other operating systems.
#apt-get install vnc4server
Choose your desired window size and color depth, then, as an ordinary user, open a terminal and type:
Vnc4server -geometry 1024x768 -depth 24
This will prompt you to create a password:
You will require a password to access your desktops.
Password:
Verify:
This will save a scrambled password in the file ~/.vnc/passwd.
Once that’s been done you can create a new server by invoking:
vnc4server
This will start a new server and show you the “desktop” it is running upon. This is something that you’ll need to know when connecting to the server.
The server will start and tell you where to access it:
New ‘X’ desktop is debian:1
Starting applications specified in /etc/X11/Xsession
Log file is /home/test/.vnc/debian:1.log
Open the VNC viewer on your remote machine, enter the hostname:screen and password (use a hostname or IP that your client machine understands), and your Linux desktop will open in a window! Network speed and processor power will affect performance, but it’s amazing how many apps will run fine under VNC. You might not be able to play Frozen Bubble, but you can use productivity applications without any trouble.
To kill the server enter a command similar to this, using the appropriate settings:
vnc4server -kill :1
If you wish to change the way the server runs you’ve got a couple of choices.
You can modify the global configuration by editing the file /etc/vnc.conf, copying this file to your home directory and naming it .vncrc will affect just servers you start.
Another common option is to adjust the window manager that remote users will recieve
once you’ve started one of the servers you’ll need a client. One popular client is xvn4cviewer.
Installing VNC Client is simple:
#apt-get install xvnc4viewer
Once it’s installed you can connect to a running server by using:
Xvnc4viewer hostname
If invoked with no arguments you’ll be prompted for the host you wish to connect to, and if necessary a password.