Novell Home

Create and Use Persistent VNC Sessions

Novell Cool Solutions: Feature
By Aaron Gresko

Digg This - Slashdot This

Posted: 19 Sep 2005
 

SUSE Linux ships with remote administration capabilities included. On SLES 9, turning on remote administration is done by starting YaST, selecting Network Services > Remote Administration, and selecting Allow Remote Administration.

The server can then be accessed using a VNC viewer application. On SUSE LINUX, running vncviewer ip_address:1 will access the remote system. In the default setup, the VNC session closes when the VNC viewer quits. In some situations, it's advantageous to have a VNC session alive after the VNC viewer quits.

Creating a persistent VNC session is done using the command vncserver. View the vncserver man page for full details of the command.

To create a persistent VNC session, complete the following:

  1. Log in to the system that will be remotely adminstered as the user who will use the VNC session. The user admin on an OES system will be used for an example. The admin user can ssh in to the remote system to do the work also.
  2. At the terminal, start a VNC server session by entering vncserver :2.
  3. Enter and verify a password for accessing the VNC session.
  4. If a view-only password is desired, select y and enter the view-only password.
The VNC session for the admin user is now running on VNC display 2, or port 5902. To access the remote system, run vncviewer ip_address:2 and provide the connection password. The remote desktop is displayed.

VNC viewer session with TVM

Test the persistent connection by running top in the command window and closing the VNC viewer window. Start the VNC viewer again and provide the connection password. The top command should still be running on the remote system.

The default window manager is tvm. If the user wants to use their full desktop, they need to configure VNC to start their window manager. To specify the window manager, complete the following:
  1. Open a terminal and change to the user's .vnc folder by entering cd ~/.vnc.
  2. Edit the xstartup file by entering vi xstartup.
  3. At the bottom of the xstartup file is the command to start the window manager. Change it from tvm & to kde &.
  4. Save the changes and quit.
After changing the xstartup file, the VNC server session must be restarted to see the changes. Complete the following:
  1. Open a terminal or ssh into the machine as the user who will administer the machine via VNC.
  2. Kill the VNC Server session by entering vncserver -kill :2.
  3. Start the VNC Server session by entering vncserver :2.
Connecting to the remote system with a VNC viewer reveals the user's full desktop environment is running.

VNC viewer session with KDE

Inspiration taken from a Novell Support Forums post by Justin Grote.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell