Please read this entire page before running VNC. This is not IICF supported software. If you encounter any problems, first check the Troubleshooting Section, and if you still have problems then email me directly.
Please kill your VNC server session within 24 hours of starting it. We have been having problems with old VNC sessions using too many resources. If a session runs for more than 24 hours it could be killed without notice if there are memory problems.
VNC stands for Virtual Network Computing. In short it is a way to access the CIS login servers remotely in a manner similar to doing a remote X query with Xwin-32 or eXceed, but unlike a remote X query the session will be faster, easier to manage, and work through a NAT or IP Masquerade gateway easily. Much more information can be found on the VNC homepage, but I will outline the steps necessary to start using it here. I have used VNC in Unix and Windows (shudder) and have been quite surprised with the results. I hope that this will help you to experience a faster and more enjoyable remote usage experience. I suggest reading everything here before getting started with VNC. There are a few important things to note throughout this page.
VNC consists of the following programs:
You can think of VNC as wrapping your remote X session inside of a new X11 protocol, at least in a sense. This would be a good time to tell you that it is even possible to run a VNC client session in Netscape or IE at home, but I'll save that exciting news until later :-)
I support VNC in contrib, so the first thing that you need to do
is subscribe to CONTRIB. This is easy to do with the
subscribe command. Here is an example:
[rowland@gamma rowland]$ subscribe
? # Package ? # Package ? # Package
- - ------- - - ------- - - -------
0 ACROREAD 7 EIFFEL * 14 SMARCH
1 ACU-COBOL 8 HOMEBIN 15 SML
* 2 ADMIN * 9 JDK-CURRENT 16 SQR
3 CADENCE * 10 LATEX2HTML * 17 SSMS
4 CNADM * 11 NETPBM * 18 SYBASE
* 5 CONSULT * 12 OPERATOR * 19 TETEX
6 CONTRIB 13 RESOLVE * 20 VI
Enter a command (a,i,q, or h for help), or a number to SUBSCRIBE: 6
Simply choose package 6 from the list and your almost ready. Next you have to reinitialize your environment for the change to take place. The best way to accomplish this is to logout and login again. Once this is done, you should be able to do the following:
[rowland@gamma rowland]$ which vncserver
/usr/contrib/bin/vncserver
The first thing to do is create a password for your VNC session.
The password is used as authentication when you connect to your
remote vncserver session. Basically, this keeps other people from
connecting to your session, which would be a pretty big problem
for most people :-). You run the vncserver program
to set your VNC password. Here is an example:
[rowland@gamma rowland]$ vncserver
You will require a password to access your desktops.
Password:
Verify:
Note that I did not use vncpasswd. That is used to
change your password once it is created. Running the
vncserver the first time does not start a VNC
session. It only creates the passwd file by running
vncpasswd for you the first time. If at any time you
wish to change your VNC session password, simply run the
vncpasswd program.
Once your password has been created you are ready to start a VNC
server session. This session runs on a stdsun machine. You use a
VNC client to connect to that session. I have modified the
vncserver program to run a Xsession
automatically. This will give you the default CDE environment.
Here is an example:
[rowland@gamma rowland]$ vncserver -depth 24 -geometry 1280x1024
New 'X' desktop is gamma:1
Creating default startup script /n/gold/4/rowland/.vnc/xstartup
Starting applications specified in /n/gold/4/rowland/.vnc/xstartup
Log file is /n/gold/4/rowland/.vnc/gamma:1.log
The vncserver program creates a default startup file
in your personal ~/.vnc directory. This file runs
Xsession to start CDE for you. The two command line
arguments I used are all you will ever really need. The first,
-depth 24, specifies that the VNC server start an X
session at 24 bit color depth. I run my PC at 32 bit color depth,
and you definitely want your VNC session and home PC's color depth
to match!
Note: Because of Solaris X-server-isms, you should use 24
bit color with vncserver if you run 24 or 32 bit color at home.
Yes, they do not exactly match, but STUPID programs like netscape
won't work unless you do this. You won't have a problem with 8 or
16 bit color (although some applications, such as any GUI Java
apps or Framemaker, will NOT run at 16 bit color).
The next command line option, -geometry 1280x1024,
specifies that the VNC session desktop will be 1280x1024 in size.
The default is 1024x768, but that is way to small for a fanatic
like me. If you use the Windows vncviewer program it
is possible to specify that it use your whole Windows desktop, in
which case you would want to start vncserver with the
same resolution as your Windows desktop, but you can play around
with it and set the geometry to whatever you like. When you are
finished with your VNC session, after reading the notes on exiting
CDE and VNC below, you kill the vncserver like this:
[rowland@gamma rowland]$ vncserver -kill :1
Killing Xvnc process ID 3859
Login to the machine on which you started vncserver
and kill it with the -kill display_number command
line option. Yes, that display number has importance! There are
important notes about running CDE and different window managers
later on in this document. Please read them.
NOTE: You must login to the machine you started
vncserver on. This means you can't just connect back
to the stdsun alias again. Instead, you have to connect to the
specific host you ran vncserver on!
I used to have some notes about environment settings that would
cause vncserver not to run. I created a Perl wrapper
script for vncserver that removes these from the
enviromnent. It also helps with controlling the number of
vncserver processes running on each server. I have
noticed a problem where users do not kill their
vncserver process, instead opting for starting yet
another one. This unreasonably eats system resources. The
wrapper script will inform you if there is a
vncserver process running for you on the current
Solaris login server. If there is, it tells you how to kill it.
You will not be able to start a new vncserver process
until the running one is killed. Here is an example:
[rowland@psi rowland]$ vncserver -geometry 1280x1024 -depth 24
You are already running vncserver on this host:
Please run "vncserver -kill :1" before starting a new session.
If you have problems with this try "kill 20946".
This is important to conserve resources. VNC login sessions consume a lot
of resources. Please only run one copy on a server at a time. Thanks.
If you have questions, please contact rowland@cse.ohio-state.edu.
One of the most important pieces of information about your VNC
session is what display it is running on. When you started
vncserver on the remote machine (a stdsun server), it
printed out something like the following:
New 'X' desktop is gamma:1
In this case the VNC server is running on gamma:1, or the host
gamma.cse.ohio-state.edu display number 1. This is used by the
vncviewer to connect to the correct remote host and
display number. The vncviewer is run on your home
machine in either Windows or some VNC supported free Unix
operating system. I currently use FreeBSD with no problems.
In FreeBSD on my home machine I issue the following command to
connect to the remote VNC session I started on gamma:
[rowland@dsl-64-193-163-133 rowland]$ vncviewer gamma.cse.ohio-state.edu:1
VNC server default format:
32 bits per pixel.
Most significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
Using default colormap which is TrueColor. Pixel format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Notice how the "VNC server default format" (32 bits on the server, even though specified with -depth 24) matches the "Using default colormap" (32 bits on the client). If you use a different color depth on your PC, you will need to start the server with that color depth or you will be in for a small surprise color-wise! It will still work, but you will not like it much. Don't worry! This isn't as hard as it may seem.
In Windows the vncviewer program has a nice GUI
interface where you can right click on the taskbar and set a lot
of options. I will not go into detail about how to configure the
Windows client at this time.
I am glad I asked me that question on your behalf! You may have
noticed that both vncserver and
vncviewer are installed in contrib. The
vncviewer in contrib is NOT what you use to connect
from home. When you download VNC you get both the server and the
client. I installed both, and you should as well (because they
come together, there is no other good reason). Anyway,
simply download the VNC software for your platform
here.
BTW, you do not have to fill out the form on that page, but I did
the first time I downloaded this stuff just to be nice. This
software is under the GNU GPL
license, so in the minds of many it is absolutely free (although
some BSD-heads like myself claim the BSD license to be
absolutely free, but I won't get into that... I think :-).
Magic! Just kidding. The vncserver starts a small HTTP daemon that serves Java class files that your browser can probably grok. All that you have to do is point your browser to:
http://vncserver_host:58nn
The vncserver_host is the remote host you started the
VNC server on. The port specifies the display number. In my case
I would connect to gamma on port 5801, since my display was 01:
http://gamma.cse.ohio-state.edu:5801
You will probably notice that the colors are hosed. I don't know
why or if you will have that problem, but I did. This is a cool
feature, so I thought I would mention it anyway.
When you are done with your CDE session exit like you normally do.
The busy light will flash for a while, but CDE will not fully
exit. This is normal in VNC, but don't be fooled! It is actually
doing stuff with that light is flashing. Once the light is done
you can kill the vncserver normally (vncserver -kill
display_number) and go about the rest of your day. It is
not a disaster to miss this step, but just don't miss it anyway!
NOTE: It is possible to exit the vnclient and leave the
server running remotely. You can then connect to it again, and
everything is still running like you left it. This is perfectly
fine to do, but it is more considerate to exit when you are
finished for the sake of the rest of us.
Although it might seem like a real pain sometimes, it is VERY important to use the stdsun.cse.ohio-state.edu alias when accessing the CIS login servers. We have this alias so that the load on the login servers is spread out more evenly than if people just chose machines on their own. Trust me! I have been there and done that! Here is a typical scenario for getting a remote VNC session going:
-depth command line option.
-geometry option if you wish to have
a resolution greater than 1024x768.
vncviewer and tell it to
connect to the remote VNC server:display. You will
have to login with your VNC session password.
vncserver -kill
display_number
First of all, do not send mail to help@cse.ohio-state.edu. This
software is supported in contrib by me. Send me email if you need
help, but first read the next Troubleshooting Section. My email
is conveniently located at the bottom of this page.
These are some questions and answers that come to mind as I write this. If you have more I am just an email away, but I hope this helps out a little.
The vncserver program needs to be able to create a
Unix domain socket in /tmp/.X11-unix. Our system does not make
this directory for normal X connections, so it is possible that
someone else created that directory somehow and you don't have
permission to write there. This should not happen if you use VNC
(it creates the directory but allows others to write there like
"normal" in this case). If you do the following:
[rowland@gamma rowland]$ ls -ld /tmp/.X11-unix
drwxrwxrwt 2 root root 104 Feb 23 12:07 /tmp/.X11-unix/
and see something different than this drwxrwxrwt,
like drwxrwxr-x then you will either have to try
another server or let me know in email so I can fix it. I would
appreciate the email actually. This should no longer be a problem
as I have made the system go, but I leave this information here
anyway.
We kill processes that look like they have run-away. You can thank programs like netscape for that, but it is something that we really need to do. You should kill your VNC server when you are done. Yes, you can just disconnect and reconnect later, which is really nice, but if you are going to leave it set for a long time you might as well just kill it for the good of the community.
Welcome to the club! It is easy to start a different window
manager. There are a couple in contrib. All that you have to do
is edit the ~/.vnc/xstartup file. An example
xstartup file for window maker is:
#!/bin/sh
/usr/contrib/bin/wmaker &
If you run your home PC at 24 or 32 bit color depth, start the
vncserver with a color depth of 24 bits with the
command line option -depth 24. The 24/32 bit color
issue is too much for me to get into here, but this will fix your
problem.
You cannot run vncserver at 16 bit color depth
without these problems. Blame the application developers for
being too lazy to support the hacked-up-ultra-lame 16 bit color
depth.
For now you can ignore them. They probably won't affect you. Just delete the Warning buffer and go on your way.