Remote Desktop Between Ubuntu/Linux and Windows, Part I
Installing a VNC Client and Server on Another Linux Distribution

Eric Geier
Monday, January 19, 2009 10:43:53 AM
If you are using a Linux distro other than Ubuntu, search through
its repositories for appropriate packages. Otherwise, you can
download TightVNC directly
from their website and follow the instructions
to build and install it.
The TightVNC/RealVNC server doesn't have a GUI; you must use the
command-line—don't fret, it's
easy. Simply open Terminal, type vncserver, and hit
Enter. The first time you run this, you'll be prompted to create a
password for the VNC connections. Once you define your password, it will
automatically configure a display or tunnel, such as shown in Figure 2.
Multiple displays are supported in order to offer access for multiple users and/or to
define varying attributes, such as screen resolution, startup
commands, and more. Each time the vncserver command is run, it
creates a new tunnel, typically starting with 1 and incrementing from there on.
Here are several vncserver options to keep in mind:
For help, use -help or
enter man vncserver.
Using -name desiredname
gives you the option of naming the particular tunnel or display,
which is viewable in the title bar of VNC clients when remoting to
the display.
-
Amending :# lets you manually define the tunnel or
display number
-
Using -geometry WxH lets
you set the desktop width and height.
Adding -depth # lets you
set a color depth of 8 to 32 bits per pixel.
To close a VNC tunnel, use
-kill :#, replacing the pound sign with the desired tunnel ID.
Depending upon your particular Linux distro and the VNC solution you have
installed, you may or may not have a GUI for the client or viewer application.
If you have one, feel free to use it; otherwise you can use the command-line.
For the GUI, you can usually set the options from a dialog box. When connecting
to a Linux machine, type in the computer name or IP address of the remote
machine (or the Internet IP when connecting through the web) followed by a colon
and the display or tunnel ID, and then hit Enter. For instance,
ericslinuxbox:1 or 192.168.0.122:1. If connecting to Windows,
don't include the colon and display number. To connect from the Terminal, type
vncviewer and the same type of host info, such as shown in Figure 1
earlier.
Loading a VNC client/server onto Windows
TightVNC also offers a Windows version of their VNC client and server from
their download page. After
you install TightVNC, you can start the server by clicking the Launch TightVNC
Server shortcut from the Start menu. The properties dialog (see Figure 3) will appear, where
you should assign a password for incoming remote sessions. After reviewing the
other settings, hit OK. The icon will appear in the system tray and the server
is ready for remote connections. Again, don't use the colon and display number
when connecting to a Windows PC, from any platform.
If you want to connect to a remote PC from Windows, click the TightVNC Viewer
shortcut from the Start menu. Just like when connecting from other platforms,
type in the name or IP address of the remote PC (or the Internet IP when
connecting through the web), and when connecting to Linux boxes, include the
colon and a display number.
Stay tuned for the next part: we'll secure the
VNC connection and configure everything for connections over the Internet.