TightVNC

From Gentoo Wiki
Jump to: navigation, search

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

Installation

Cannot load package information. Is the atom net-misc/tightvnc correct?

Server

Install tightvnc with the server USE flag enabled:

root #USE="server" emerge --ask --update --newuse net-misc/tightvnc

Client

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

root #emerge --ask --update --newuse net-misc/tightvnc

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

Services

OpenRC

Start the server:

root #/etc/init.d/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.