At this point, I can type in whatever I want into the xterm and I can do anything to my FreeBSD computer from the Win98 computer that the user genisis has permission to do.
If you don't like the default window manager of "twm," you can experiment running other windows managers. Since the pixel information required to redraw the screen is being sent over the network, you'll probably want to consider one of the more light-weight windows managers. Since Windowmaker is already installed on my FreeBSD computer, I typed
wmaker into the "xterm" and was greeted by the familiar Windowmaker desktop. For some reason, I was also able to load Xfce, but it refused to load the menubar, leaving it functionally useless. If you experiment on your own and find a windows manager that works for you, you can tell your VNC server to permanently change the default windows manager.
To do so, you'll have to kill the running VNC server and edit VNC's xstartup file. I'll do this as the user genisis:
killall Xvnc cd ~genisis/.vnc more xstartup #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
That last line that says
twm &, I'll edit to read
wmaker &. I'll then restart the VNC server using the
vncserver command. When I reconnect from the Win98 computer, I now have the Windowmaker windows manager instead of "twm."
Another handy way to attach to a VNC server is from a Java enabled Web browser. I'll open Internet Explorer from the Win98 computer and type in the following URL:
Remember that the VNC server listens for Web requests from port 580x; since my server is listening on display number 1, I replaced the
x with the number
1. In the Web browser, a VNC Authentication page is displayed that prompts for the password. Once I type in the password, I'm once again greeted with the Windowmaker display running on my FreeBSD computer.
A quick note on the difference in the displays depending on whether the VNC server is running on a MS machine or a FreeBSD computer. Unlike Unix, Microsoft does not use the concept of an XServer that can listen for multiple connections. Instead, it uses profiles to distinguish one user's desktop from another. Since MS operating systems are single user, only one profile can be run at a time; which profile is used depends upon who has logged in. For this reason, when you access a MS machine using VNC, you will get the actual desktop that is currently running on that computer, including that user's wallpaper, shortcuts, etc.
In contrast, FreeBSD is a multi-user operating system and the XServer is capable of listening for multiple connections, each of which is assigned a sequential number. When you access a FreeBSD computer running VNC, you must specify the number of the display you would like to connect to. You'll then receive a default desktop, not the desktop of the user who started the VNC server.
On the Microsoft computers in your network, you don't have to install VNC on each machine you want to connect from, just those that will be running the server. The vncviewer easily fits on a floppy; simply copy the executable onto a floppy and take it with you when you want to initiate a VNC connection to another computer in your network.
This article should get you started on the possibilities available to you by using VNC on your LAN. To discover the other built-in features on VNC, check out the documentation that was installed on your FreeBSD computer or from the VNC Web site. They contain instructions on how to run VNC as a service in NT, how to run VNC through an SSH tunnel and how to run VNC through a firewall.
Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.
Read more FreeBSD Basics columns.
Return to the BSD DevCenter.