This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
TigerVNC
A client/server software package allowing remote network access to graphical desktops.
Installation
USE flags
USE flags for net-misc/tigervnc Remote desktop viewer display system
+drm
|
Build with DRM support |
+opengl
|
Add support for OpenGL (3D graphics) |
+server
|
Build TigerVNC server |
+viewer
|
Build TigerVNC viewer |
dri3
|
Build with DRI3 support |
gnutls
|
Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl) |
java
|
Build TigerVNC Java viewer |
nls
|
Add Native Language Support (using gettext - GNU locale utilities) |
xinerama
|
Add support for querying multi-monitor screen geometry through the Xinerama API |
Emerge
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
Configuration
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
Displays
Setup the displays. Substitute each 'user
' value below with the name of a user who will be running the VNS server on the machine:
/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:
~/.vnc/xstartup
#!/bin/sh startkde & #startxfce4 & #startfluxbox & #fvwm2 & #icewm-session & #startlxde & #xfce4-panel &
lxterminal
Edit the VNC startup script:
~/.vnc/xstartup
#!/bin/sh xrdb ${HOME}/.Xresources xsetroot -solid black lxterminal & /usr/bin/lxsession -s LXDE &
twm
Edit the VNC startup script:
~/.vnc/xstartup
#!/bin/sh 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
Services
OpenRC
Start the server:
root #
service vnc start
Usage
Connecting
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.