TigerVNC
TigerVNC is 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
dri3
|
Build with DRI3 support |
drm
|
Build with DRM 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 gettextGNU locale utilities) |
opengl
|
Add support for OpenGL (3D graphics) |
server
|
Build TigerVNC server |
viewer
|
Build TigerVNC viewer |
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
Single Server Configuration
This configuration allows remote control of the entire Xorg X11 server.
Create the TigerVNC config file for Xorg X11
root #
mkdir -p /etc/X11/xorg.conf.d
/etc/X11/xorg.conf.d/40-vnc.conf
Section "Module" Load "vnc" EndSection Section "Screen" Identifier "Default Screen" Option "PasswordFile" "/etc/X11/vncpasswd" EndSection
Create /etc/X11/vncpasswd
root #
vncpasswd /etc/X11/vncpasswd
Multiple Server 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 VNC 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 VNC 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 &
kde
~/.vnc/xstartup
#!/bin/sh startplasma-x11 &
gnome
Edit the VNC startup script:
~/.vnc/xstartup
#!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid blue gnome-session &
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 #
rc-service tigervnc start
Usage
Connecting
user $
vncviewer server:1
Connect over ssh with high resolution
user $
vncviewer -Fullcolor -QualityLevel 9 -via user@remotehost localhost:1
user $
vncviewer -Fullcolor -QualityLevel 9 -via user2@remotehost localhost:2
See also
- SSH — the ubiquitous tool for logging into and working on remote machines securely.