From Gentoo Wiki
(Redirected from TightVNC)
Jump to: navigation, search

A client/server software package allowing remote network access to graphical desktops.


USE flags

USE flags for net-misc/tigervnc Remote desktop viewer display system

dri3 Build with DRI3 support local
drm Build with DRM support local
opengl Add support for OpenGL (3D graphics) global
server Build TigerVNC server local
xinerama Add support for querying multi-monitor screen geometry through the Xinerama API global
xorgmodule Build the Xorg module local


Those using the package for the VNC server need to install the package with the server USE flag enabled. This can be added to the package.use file (or directory), or specified one-shot-like on the command-line:

root #USE="server" emerge --ask --update --newuse net-misc/tigervnc
Setting USE="server" as displayed in the example above will emerge the package with the specified USE flags, however the flags will not be preserved upon package upgrades. Be sure to set them in package.use in order to make flags persist when applying system updates.

Those installing just the client can simply emerge the package:

root #emerge --ask net-misc/tigervnc


Login as 'normal' user. The following steps should be take for any user who wishes to configure the VNC server for remote connection.

Set a password:

user $vncpasswd

Start the server:

user $vncserver

If desired, use a VNC client on either a local or remote machine to test the connection.

Once finished, kill the running vncserver:

user $pkill Xvnc


Setup the displays. Substitute each 'user' value below with the name of a user who will be running the VNS server on the machine:

FILE /etc/conf.d/tigervnc
DISPLAYS="user:1 user2:2"

Typically the value of 0: will be used for the server's own X display. This is why the example above starts by using the :1 display handle.

Desktop environments

Each user who will be running a VNS server can configure an X startup script. This script can define which desktop environment will be used for the X server to run when connecting a client to the server. For example:

FILE ~/.vnc/xstartup
startkde &
#startxfce4 &
#startfluxbox &
#fvwm2 &
#icewm-session &
#startlxde &
#xfce4-panel &


Edit the VNC startup script:

FILE ~/.vnc/xstartup
xrdb ${HOME}/.Xresources
xsetroot -solid black
lxterminal &
/usr/bin/lxsession -s LXDE &


Edit the VNC startup script:

FILE ~/.vnc/xstartup
xrdb ${HOME}/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Make sure the xstartup file is executable:

user $chmod +x ~/.vnc/xstartup



Start the server:

root #service vnc start



user $vncviewer server:1

Connect over ssh with high resolution

user $vncviewer -truecolour -quality 9 -via user@remotehost localhost:1
user $vncviewer -truecolour -quality 9 -via user2@remotehost localhost:2

See also

  • ssh - Secure shell.