TightVNC

From Gentoo Wiki
Jump to: navigation, search

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

Setup

→ Information about USE flags
USE flag Default Recommended Description
java No Enables an integrated web server which provides a java based client.
tcpd No Adds support for TCP wrappers
server No Build vncserver. Allows us to only build server on one machine if set, build only viewer otherwise.

Server

Install tightvnc with the server use flag enabled:

root # USE="server" emerge -uN tightvnc

Common configuration

Login with normal user.

user $ vncpasswd
user $ vncserver

kill the running vncserver:

user $ pkill Xvnc

Setup the displays

File/etc/conf.d/vnc:

DISPLAYS="user:1 user2:2"

Special configuration for KDE (and some others) installed on server

Edit the vnc startup script:

File~/.vnc/xstartup:

#!/bin/sh
startkde &
#startxfce4 &
#startfluxbox &
#fvwm2 &
#icewm-session &
#startlxde &
#xfce4-panel &

Special configuration for lxterminal installed on server

Edit the vnc startup script:

File~/.vnc/xstartup:

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid black
lxterminal &
/usr/bin/lxsession -s LXDE &

Special configuration for twm installed on server

Edit the vnc startup script:

File~/.vnc/xstartup:

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Make sure you set the xstartup file to be executable (chmod +x):

user $ chmod +x ~/.vnc/xstartup

Starting

root # /etc/init.d/vnc start

Client

If you're just installing the client, you will not need the server use flag:

root # emerge -uN tightvnc

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