The FreeBSD 'zine

July 2000 : Remote Access Software

Accessing FreeBSD using VNC
by Joel Sutton <[email protected]>

In this article we will introduce you to the VNC graphical remote access software. Although you don't really need anything to read through this article, I am going to assume that you have a FreeBSD server and a Windows 98 workstation (a very popular combination these days). If you wish in proceed with the practical side of this article, you will need to have X and the VNC port installed on your FreeBSD server, as well as the VNC viewer on your Windows 98 workstation.

You can download the Windows 98 version of VNC from:

What is VNC?

As I mentioned earlier, VNC is a remote access tool for graphical user interfaces. In many ways, VNC is very similar to TELNET. There isn't really anything new about the concept of a "graphical TELNET". Products like PCAnyhere and Netware's ZENWorks have been around for several years now. However, none of these products have been freely available or offered for such a variety of different operating systems.

Like TELNET, VNC is made up two separate processes - a client, or viewer, process and a server process. Both servers and clients are available for a majority of the different operating systems out there, but there are a selected few for which only the client part is available. Even though we will be discussing the VNC viewer on a Windows 98 workstation, remember that you can achieve the same results using the viewer on the Macintosh, RiscOS, or any other supported operating systems.

Setting up VNC on the server

First of all, you will need check to make sure that you have the X distribution installed and functioning. Check the FreeBSD handbook if you're not sure how to do this.

Next we need to install the VNC port onto the FreeBSD server. This can be done through either the ports or the package collection. If you already have the ports collection installed then change into the net directory. There you will find a vnc subdirectory. Once you've changed into it, it's the usual make install to do the job. If you have problems at this stage you might need to refer to the handbook again, or post an email to FreeBSD Questions.

$ su -
password:
# cd /usr/ports/net/vnc
# make install

Once VNC has been successfully installed you'll need to exit from the super-user mode and run vncserver. As I mentioned earlier, this program is going to handle the server side of the connection. If this is the first time that you have used the VNC server then you will be asked to choose a VNC password - which will be separate from your normal password.

stargate$ vncserver

You will require a password to access your desktop.

Password:
Verify:

New 'X' desktop is stargate.home:1

Starting applications specified in /home/jsutton/.vnc/xstartup
Log file is /home/jsutton/.vnc/stargate.home:1.log

stargate$ 

Take note of the screen number that has been assigned to you. Chances are that you'll get :1 if this is your first attempt.

Running the VNC viewer on the workstation

Now that server process is up and running we're ready to connect with the viewer. For this step you'll need to have the VNC viewer installed on a Windows 98 workstation.

First of all, start the VNC viewer from the Start menu.

You will then be prompted to supply the host name and screen number of the machine running the VNC server process. To access my server at home, I use stargate.home:1. You will note that this information was supplied to us when we ran vncserver.

Next you'll be asked to supply that new password that you chose earlier. Provided the server is happy that you've typed the right password, you should now get a large window which is your X desktop.

Closing your session

One small quirk that I've found with the FreeBSD VNC server is in the procedure for closing the session. Unlike TELNET, if you close your VNC viewer that session still remains active. This is great if you want to change workstations but can make ending you session tricky, especially as closing your windows manager doesn't seem to do the trick.

To end your session properly you need to issue the following command:

stargate$ vncserver -kill :1
Killing Xvnc process ID 30104
stargate$ 

VNC friendly software

Although VNC is a good approximation of a graphical console, it has some definite limitations. These limitations lay mainly in the speed with which the screen is drawn. This means that graphically intensive software, like browsers and action games, become fairly un-usable - even on a switched network. The number of colours present on the screen is also an important performance factor (as you may expect). Unless you have a particular need, I recommend that you stick to the lowest possible setting - which is 8 bit colour.

However, I have had some success with the following FreeBSD software:

  • graphical vim
  • twm window manager
  • xsol
  • xscrabble
  • xterm

These packages fulfill my simple needs but VNC isn't necessarily confined to this limited selection.

Conclusion

VNC is a great remote access tool which is getting better with every release. It has various limitations but can be particularly useful if you are not using graphically intensive applications. If you're doomed to run Windows (MacOS, Solaris, RiscOS or whatever) the VNC is a great, cheap, way to get the best of both worlds.

Be sure the read through the VNC manual, on the web site mentioned at the start of this document. The VNC server has a number of configuration options which may make your sessions easier to deal with.

Current Issue
. Issue #06 : July 2000

Old Issues
. Issue #01 : February 2000
. Issue #02 : March 2000
. Issue #03 : April 2000
. Issue #04 : May 2000
. Issue #05 : June 2000

Quick Links
. Table of Contents
. Mailing Lists
. FreeBSD Events
. User Group Calendar
. Site Statistics
. Old Articles
. Latest News
. Press Releases
. Contribute
. Send us Feedback
. Other Resources
. Submit an Article
. Submit an Event

Today's Fortune
Any stone in your boot always migrates against the pressure gradient to exactly the point of most pressure. -- Milt Barber

FreeBSD 'zine Poll
Are you going to BSDCon?
Yes.
No.
Maybe.
What the hell is BSDCon?
Results More polls

Sponsors
. VicFUG

Download
. Issue #01 : Download
. Issue #02 : Download
. Issue #03 : Download
. Issue #04 : Download
. Issue #05 : Download
. Issue #06 : Download

Search

Runs on FreeBSD

Add Channel to My Netscape

DaemonNews

Contact: <[email protected]>
This site and the tarballs are built every 6 hours.
Copyright � 1998-2000, The FreeBSD 'zine
Code revision: 07/24/2000��All rights reserved.