Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.

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.

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 &


Starting

root # /etc/init.d/vnc start

Client

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