Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Tuesday, November 16, 2010

TightVNC in openSUSE

↑↑↑↑Installation & Configuration
Software: The RPMs are in the standard install media. GoTo Yast --> Software --> Software Management and search on vnc. Install the RPMs tightvnc and xorg-x11-Xvnc. Those RPMs will install both the viewer functionality and the server functionality. Use the Packman repository for the tightvnc RPM in openSUSE 11.1 and the standard repository (oss or vendor) for the tightvnc RPM in 11.2 and 11.3
For an openSUSE client where you wish to view the server by web browser, install also the java RPMs java-x_y_z-openjdk and java-x_y_z-openjdk-plugin (you can use either the sun or the openjdk RPMs).
Initialise Passwords: The first thing to do after installing the RPMs is initialise the vncserver process. Run the command vncserver for the first time. It will lead you through the setting of passwords, one to accept clients in an interactive mode and one for a view-only mode. Run the command in your normal user's console window and follow the instructions in the prompts.
Select the Desktop Manager: The default Desktop Manager that would be served to remote clients is TWM (Tab Window manager). The defaults are coded into the startup script xstartup located at /home/your_username/.vnc/xstartup. the default contents are as follows:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Most people want to change that to KDE4 or Gnome. To do that you edit the file called xstartup in your home directory and make the contents as follows:
  • For KDE4
  • #!/bin/sh
    /usr/bin/startkde
  • For KDE3.x as in openSUSE 10.x and 11.0, 11.1
  • #!/bin/sh
    /usr/bin/kde &
  • For Gnome
  • #!/bin/sh
    /usr/bin/gnome &
Note: the file xstartup is an executable script file. Make sure it remains executable. If it is not, then make it so with this console command: chmod +a /path_to/xstartup, or use your file manager GUI --> Properties --> executable.
↑↑↑↑Starting TightVNC Server (Manually)
Users who are logged on can start a server with a simple console command.
  • Starting the server in Suse versions 10.x: vncserver
  • Starting the server in Suse versions 11.x: dbus-launch vncserver
The vncserver command will start the next unused desktop in the sequence :1, :2, :3 ...etc. You can attach many options to the command line when starting the server. There are options specific to TightVNC on the TightVNC man page and you can also attach the options listed in the Xvnc man page.
I sometimes use one or more of three useful options when initiating a server:
  • the geometry option allows me to prescribe the screen so it will fit comfortably into viewers on client machines, e.g. -geometry 1024x768 or smaller.
  • The default window is :1 and this implies TCP ports 5801 and 5901. If you want to use a different port/window combination, use the :x option, where x is the display number. For example this command will start a server on window :6 with port associations 5806 & 5906: vncserver :6
  • The colour depth option is useful for low bandwith connections and for speeding up communications. You invoke the option like this: -depth 8 (use 8, 16 or 32). However at this point I should mention that options for speeding communications are best invoked from the client (see below).
Stitching this together gives an example I use on a server when I want to connect with my low bandwith, small screen laptop:
dbus-launch vncserver :6 -depth 8 -geometry 800x600
(Of course, you don't have to add any options if you simply want TightVNC's default settings.)
↑↑↑↑TightVNC Server Running as a Service

No comments: