To start the Virtual Network Computing (VNC) server, type the following command at the command line and press ENTER:
CALL PGM(QSYS/QP2SHELL) PARM('/QOpenSys/QIBM/ProdData/DeveloperTools/vnc/vncserver_java' ':n')
where n is the display number that you want to use. Display numbers can be any integer in the range 1-99.
Note: Starting the VNC server displays a message that identifies the iSeries™ system name and display number, for example, "New 'X'desktop is systemname:1." Remember or write down the display number, because you use that value to configure environment variables.
When you have more than one VNC server running at the same time, each VNC server requires a unique display number. Explicitly specifying the display value when you start the VNC server makes it easy to configure the DISPLAY environment variable later. You must configure environment variables every time you want to run Java™ with NAWT.
However, when you do not want to specify the display number, simply remove ':n' from the previous command and the vncserver_java program finds an available display.
The .Xauthority file
The process of starting the VNC server either creates a new .Xauthority file or modifies an existing .Xauthority file. VNC server authorization uses the .Xauthority file, which contains encrypted key information, to prevent applications of other users from intercepting your X server requests. Secure communications between the Java virtual machine (JVM) and VNC REQUIRES that both the JVM and VNC have access to the encrypted key information in the .Xauthority file.