TigerVNC
lastmod 2018-08-17created 2015-11-175 edits
TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. TigerVNC also provides extensions for advanced authentication methods and TLS encryption.
TigerVNC Server
Describes how to start a TigerVNC server on Linux. Fedora uses TigerVNC as its default vnc-server. So from here on TigerVNC is referred to as vnc, and the explanation below is based on Fedora 17.
First, use rpm to check whether vnc-server is installed.
If vnc-server is not present, install it with yum.
If it installed correctly, use rpm as below to check the list of installed files.
Check that it appears in the following format.
/etc/sysconfig/vncservers
/usr/bin/vncserver
/usr/bin/x0vncserver
/usr/lib/systemd/system/[email protected]
/usr/share/man/man1/vncserver.1.gz
/usr/share/man/man1/x0vncserver.1.gz
The important directories and files (to know) are as follows.
- Configuration file:
/etc/sysconfig/vncservers - Directory for passwords and related data:
/root/.vnc/ - Executable:
/usr/bin/vncserver - Password setup executable:
/usr/bin/vncpasswd
Edit the VNC configuration file (/etc/sysconfig/vncservers) with vi.
# VNC를 사용할 세션정보를 입력해야 한다. VNCSERVERS="세션번호:사용자ID" 와 같은 방식으로 입력한다.
# 만약 세션이 여러개일 경우 공백으로 구분한다. Ex) "1:user1 2:user2"
VNCSERVERS="1:user1 2:user2"
# VNC서버가 실행될 때 넘겨줄 인자정보를 입력한다. VNCSERVERS에서 정의한 세션번호를 배열번호로 사용한다.
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"
Set the password. VNC requires a password to be set. (It is stored encrypted in the /root/.vnc/passwd file.)
Run the VNC server. You must pass the session number to run as an argument. (Use a colon (:) when entering the session number.)
Run the firewall configuration and open the PORT. The VNC server uses TCP, and ports are opened as 5900+세션번호. So, for example, if you opened session 1, open TCP port 5901 in the firewall.
Now you can connect from a client. If you want to stop the VNC server, give the session together with the -kill argument as below.
Check list
If the VNC server does not work properly, check it with the methods below.
- Ping test to the IP.
- Check the session list of the running server. (
vncserver -list) - Whether the process is running normally. (
ps -aux) - Check the network status. (
netstate -na) - Check the firewall policy. (
iptables -nvLorsystem-config-firewall) - Check the configuration file. (
vi /etc/sysconfig/vncservers)