Remotely Manage Machines Using VNC

Posted by Admin on October 5th, 2006

url:http://www.debianadmin.com/remotely-manage-machines-using-vnc.html

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

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.

System Message: WARNING/2 (data/remotely-manage-machines-using-vnc.txt, line 9); backlink

Inline interpreted text or phrase reference start-string without end-string.

Install vncserver (as root) in Debian

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 1024×768 -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.

Example

This is what i got from my debian machine

# vnc4server -geometry 1024×768 -depth 24

You will require a password to access your desktops.

Password: Verify: xauth: creating new authority file /root/.Xauthority

New ‘debiantest:1 (root)’ desktop is debiantest:1

Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/debiantest:1.log

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

Example

This is from my debian desktop

#vnc4server

New ‘debiantest:2 (root)’ desktop is debiantest:2

Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/debiantest:2.log

Connecting to VNC Server

I am using windows xp client to connect to debian server (where vnc server is running) for this you need to download vnc viewer.There are many VNC viewers i am using tight vnc viewer downloaded and install from here

Open the VNC viewer on your remote machine, enter the hostname:screen (use a hostname or IP that your client machine understands).

Enter your password here

your Linux desktop will open in a window with grey background with console you can see the screen as follows

from here if you want to open gnome or kde you need to enter the following

For KDE

#startkde

For GNOME

#gnome-session

I am trying to strat GNOME session and you can see in the below screen

I have started my GNOME session and you can see this in action in the following screen

Network speed and processor power will affect performance, but it’s amazing how many apps will run fine under VNC.you can use productivity applications without any trouble.

To kill the server enter a command similar to this, using the appropriate settings

#vnc4server -kill :2

If you wish to change the way your VNC server runs you’ve got a couple of choices.

You can modify the global configuration by editing the file /etc/vnc.conf copy this file to your home directory and naming it .vncrc will affect just servers you start.

Another option is to adjust the window manager that remote users will recieve.

if you have the GNOME desktop installed for your use you might wish incoming connections to use a more light-weight window manager such as IceWM. To do that you need modify the file ~/.vnc/xstartup.

Installing VNC Client in Debian

#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.

If you are looking alternative to vnc server package you can check x11vnc check here for more information.