So, recently we need to put vnc server on a newly installed AIX 6.1 box. The installation went smooth, and we were able to start the vncserver. The problem is, we were unable to connect to server as it’s showing only a grey screen with and “X” for cursor. So it seems that xterm and twm are not running on the vncserver display.
Starting the vncserver gave me this:
# vncserver New 'X' desktop is hqcfnuat6:8 Starting applications specified in /home/oracle/.vnc/xstartup Log file is /home/oracle/.vnc/localhost:8.log
Further look to the log gave me these:
Font directory '/usr/lib/X11/fonts/ibm850/' not found - ignoring AUDIT: Fri Jun 29 23:56:26 2012: 9306238 Xvnc: client 1 rejected from IP 127.0.0.1 port 54312 Xlib: connection to "localhost:4.0" refused by server Xlib: Client is not authorized to connect to Server
and this:
twm: unable to open display "localhost:4"
..and finally, this:
xterm Xt error: Can't open display: localhost:4
So, yes. twm and xterm are not running. What bugged me is that vncserver was using “localhost” instead the hostname of the server. Obviously, the next logical step is to check the hostname:
# hostname hqcfnuat6
Next, uname:
# uname -a AIX localhost 1 6 00F6DD264C00
There you go! The /etc/hosts gave me this:
127.0.0.1 loopback localhost # loopback (lo0) name/address 172.16.2.97 hqcfnuat6
So it seems that localhost is resolved to 127.0.0.1, instead of 172.16.2.97, which is where the connection was supposed to be accepted. It seems that the engineer that set the hostname for the server did not reboot to complete the hostname setup process
There are two option to solve this:
First, to set that localhost is resolved to 172.16.2.97. Second, is to make sure that vncserver use the correct hostname. To do that, either reboot the server, or do:
# uname -S hqcfnuat6
This should set the uname to the correct value
# uname -a AIX hqcfnuat6 1 6 00F6DD264C00