IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53VNC
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53VNC
Added by OneSkyWalker, last edited by OneSkyWalker on Aug 28, 2008  (view change)
Labels: 
(None)

How to install, configure, and use VNC on AIX V5.3

VNC (Virtual Network Computing) is a useful collaboration tool which creates an X-Windows desktop on AIX and then serves up the desktop as an HTTP web page. The X-Windows desktop can be shared, so that several users can share control of the mouse and keyboard and all users can see what other users are doing, making it very easy to see what command someone else was typing or quickly and conveniently show others what command to type.

VNC is a solid alternative if no UNIX or Linux workstations with graphics displays are available and Hummingbird Exceed or the equivalent is not available. VNC can provide the X-Windows desktop required for Mozilla, Acrobat, and the Oracle Universal Installer GUI.

VNC is delivered in the vnc package on the AIX Toolbox for Linux Applications CD. Documentation is available here, although the documentation might not correspond to the release delivered in the AIX Toolbox for Linux Applications.

VNC installation

A terse README file is delivered with VNC (see /usr/opt/freeware/doc/vnc-3.3.3r1/README once the RPM package is installed). The README notes that you may need to change the following things in the vncserver shell script delivered with VNC:

  • The location of Perl - if Perl is not installed in /usr/bin you'll need to edit the "#!/usr/bin/perl" first line of vncserver.
  • $vncClasses - this specifies the location of the Java classes for the VNC viewer applet. The default is /usr/local/vnc/classes.
Hint

The README also notes that if you want to use the Java VNC viewer (the default behavior on AIX), you should copy the class files from the classes directory to the default directory in which vncserver looks for them:

# mkdir -p /usr/local/vnc/classes
# cp -ip /opt/freeware/vnc/classes/* /usr/local/vnc/classes

If you copy the class files to the default directory, you don't need to change $vncClasses. If VNC can not find classes, messages such as:

16/12/04 00:03:33 httpd: get '' for 9.65.12.24
16/12/04 00:03:33 httpd: defaulting to 'index.vnc'
16/12/04 00:03:33 httpProcessInput: open: No such file or directory

will appear the log file (eg, /home/pittman/.vnc/dodgers:2.log).

  • Xvnc's font path and color database. If you have an installation of X which is not in the standard place you may need to add arguments to the Xvnc command line to set these. These should be appended to the $cmd variable at the comment "# Add font path and color database...".
Hint

If messages such as:

Font directory '/usr/lib/X11/fonts/Speedo/' not found - ignoring

Fatal server error:
could not open default font 'fixed'

appear the log file (eg, /home/pittman/.vnc/dodgers:2.log), the problem can be circumvented by adding /usr/lib/X11/fonts/ to the font path specified in /opt/freeware/bin/vncserver. Edit the vncserver file, find the section shown here:

# Add font path and color database stuff here, e.g.:
#
# $cmd .= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";
# $cmd .= " -co /usr/lib/X11/rgb";
#

uncomment the third line, and change it to:

$cmd .= " -fp /usr/lib/X11/fonts/,/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";

The problem can also be circumvented using a font server. See Setup and Use of a Fontserver.

Hint

Please note that the twm command (invoked by VNC's xstartup) is delivered in the X11.samples.apps.clients fileset, so VNC isn't going to work very well if the fileset is not installed unless VNC's xstartup is tailored to invoke a window manager other than twm.

VNC use

Invoke the vncserver command. You will see something like:

New 'X' desktop is dodgers:2

Starting applications specified in /home/pittman/.vnc/xstartup
Log file is /home/pittman/.vnc/dodgers:2.log

You must note the X-windows ID number that follows dodgers: - add 5800 to the ID to determine the port number at which a browser must be pointed to access the desktop. In the example above, you would point a browser at http://dodgers.usca.ibm.com:5802/ to access the desktop.
The first time you invoke vncserver, you will be prompted for a password required to access the desktop. The selected password is encrypted, cached in $HOME/.vnc/passwd, and used for subsequent vncserver requests. To change the password, use the vncpasswd command.

When you point a browser at (for example) http://dodgers.usca.ibm.com:5802/, the VNC Authentication screen will prompt you to enter the password you have chosen. If you want to share the VNC X desktop with others, click on Options before logging in and change the "Share desktop" option to Yes. Others can then point their browser at the same URL, enter the password, and begin sharing the VNC X desktop with you.

When you are finished using the desktop, please stop your VNC server by invoking stopcmd Xvnc.

Please note that VNC does implement a shared Windows/X-Windows clipboard. Use the Clipboard button in the upper left corner of the VNC window to view contents of the shared clipboard. But copy/paste between a Microsquash Windoze XP workstation and the VNC X-desktop can be something of a challenge. Highlighting text with the left mouse button seems to cut it from an X-window to the clipboard and Alt-LeftClick pastes text from the clipboard into an X-Window. But there are known issues. See here for more information.

Note

The default $HOME/.vnc/xstartup file will start an xterm window on the VNC X desktop. If you attempt to use xhost in the xterm window (to give another host authority to use the VNC X desktop), you might encounter a problem. The problem occurs when running vnc-3.3.3r1-2 on AIX V5.2 ML02. The problem does not occur when running vnc-3.3.3r2-6 on AIX V5.3 TL06 SP1. If xhost fails with:

$ xhost + surveyor
surveyor being added to access control list
1346-203 xhost: must be on local machine to add or remove hosts.
$

and if, when an X-windows client on surveyor attempts to use the desktop, the client fails with:

$ export DISPLAY=dodgers:1
$ aixterm
Xlib:  connection to "dodgers:1.0" refused by server
Xlib:  Client is not authorized to connect to Server
1363-008 aixterm: Cannot make a connection to X server dodgers:1.
If the X server is not running, run the xinit command.
If the X server is running, check the specified display number.
$ ping -c 2 dodgers
PING dodgers.usca.ibm.com: (9.72.8.207): 56 data bytes
64 bytes from 9.72.8.207: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 9.72.8.207: icmp_seq=1 ttl=255 time=0 ms

----dodgers.usca.ibm.com PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
$

then please note that output of the xauth command (invoked in the VNC xterm window) suggests a potential circumvention for the xhost failure:

$ echo $DISPLAY
dodgers:1.0
$ xauth
Using authority file /home/pittman/.Xauthority
xauth> list
dodgers:1  MIT-MAGIC-COOKIE-1  a88554a6ea9a9b304cc961745d77a356
dodgers/unix:1  MIT-MAGIC-COOKIE-1  a88554a6ea9a9b304cc961745d77a356
xauth> quit
$

The xhost failure can be circumvented by changing $DISPLAY to the last specification displayed by xauth above:

$ DISPLAY=dodgers/unix:1
$ xhost + surveyor
surveyor being added to access control list
$

Clients from host surveyor can now use the VNC X desktop.


 
    About IBM Privacy Contact