Debian Admin - Your way to Debian World

October 5, 2006

Remotely Manage Machines Using VNC

by @ 11:25 am. Filed under General

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.

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.

Tags: , , ,
 

You may also be interested in...

12 Responses to “Remotely Manage Machines Using VNC”

  1. Béranger Says:

    The short search link fro Debian (the last “here”) is as simple as that:
    http://packages.debian.org/x11vnc

  2. d0nk3y Says:

    This works the other way around too. We use VNC on our windows servers - the enterprise version with AD authentication functionality.

    I use the windows VNC enterprise viewer on my linux workstation with wine and it works a treat! :-)

  3. vagabondo Says:

    >This works the other way around…
    Much better performance by enabling RDP on the MS machine and connect with rdesktop (krdc is a gui frontend). Use VNC for desktop sharing in helpdesk situations.

  4. Ugo Bellavance Says:

    You may want to have a look at ultravnc (www.ultravnc.com), especially if you also work with windows workstations. It supports AD authentication and costs 0. You can also use their single-click feature (SC) that allows you to configure a packaged .exe that will allow you to take control of a remote computer, even if it hasn’t VNC installed. See the recent entry here

  5. dietrich Says:

    if you like vnc, then you’ll even better using vnc over ssh.
    besides the added compression, ssh encrypts as vnc sends your password in ‘clear text’. :(

    if you like vnc over ssh, then you’ll like even better nx (www.nomachine.com)–nothing better. period.

    But don’t take my word for it–you can get your own free personal server edition of nx.

    OK, that should do it.
    (static line noise !@#$%^&* crackle) blip.

    Good article.

  6. BSD'd Says:

    I’ve been using TightVNC to connect to FreeBSD on a home net. Now I’d like to logon, from work using Putty/TightVNC, to the FreeBSD box, via
    XP Pro box/Ananlogx portmapper.

    I believe I’ve VNC’d into the XP Pro box:22 and got Analogx’d to the FreeBSD box.

    How do I verify TightVNC’s route?

  7. Jeffunk Says:

    In case any one else is struggling to get XFCE desktop working with VNC I offer the following suggestions.

    Make sure that your xstartup file has “& xfwm4 & xfce4-panel &” in it.

    Without the xfce4-panel included I just get a terminal window. Which was fine for a while, but I certainly prefer to have the whole panel.

  8. Arrikhan Says:

    I followed the above instructions with debian etch install and my initial (and future) VNC screen doesn’t have a temrinal window, its just all grey !! Help !!

    I can logon locally, just not using VNC.

    Anyone know how to fix?

  9. Arrikhan Says:

    Update from above, I was using vncserver, not vnc4server ! The latter works..

    Arrikhan

  10. Luiz_BR Says:

    it helped me a lot!

  11. charesread Says:

    very informative! thanks alot!!!!

  12. baron Says:

    hi . i am try but error :

    Error “unable to connect to hotst: Connection refused (10061)”

    VNC Viewer 4

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

Wordpress Collection
Windows Reference
Ubuntu Geek
DebianHelp
All About Debian Tutorials
Power Electrical
Check Your IP Here
Debian,Ubuntu News
DebCentral
Tuxmachines
Capnkirby
Libervis
Nuxifield
Linux Horizon
Linux Appfinder
Debuntu
GNU/Linux For Everyone
Free Penguin
DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.