TightVNC is a very handy remote desktop application which is based on VNC protocol. TightVNC is mostly used for Linux systems in order to manage a remote desktop environment with GUI. In this tutorial, we will look at how to install and configure properly to run desktop environments like KDE, GNOME, XFCE, etc. with TightVNC.
We can use the following command to install rpm based distributions.
我们可以使用以下命令来安装基于rpm的发行版。
$ sudo yum install tightvncserver
启动VNC服务器 (Start VNC Server)
Now we need to specify a desktop environment for our VNC session. Actually, we have not created a VNC session yet but we will create a new one to create default configuration files. We run the following command by providing a password for the VNC session.
We can see that during VNC server start a password is specified which will be asked to the VNC clients want to connect this VNC server. Then the question wheter we want to create a view-only password. View-only password can be used to only view VNC sessions but can not control it. New VNC server session is create with the number 1 which means the server port is 5901 which is also called as ubuntu:1.
All VNC Server related configuration is held in a file named xstartup which is located in the user’s home directory .vnc folder. Let’s print the default configuration. In this case, the VNC configuration file is located /home/ismail/.vnc/xstartup.
In order to enable KDE desktop environment with a new VNC session, we need to add the following line to the xstartup file.
为了使KDE桌面环境具有新的VNC会话,我们需要在xstartup文件中添加以下行。
startkde &
为GNOME设置桌面环境 (Set Desktop Environment For GNOME)
In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.
为了使GNOME桌面环境具有新的VNC会话,我们需要在xstartup文件中添加以下行。
gnome-session &
设置XFCE的桌面环境 (Set Desktop Environment For XFCE)
In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.
为了使GNOME桌面环境具有新的VNC会话,我们需要在xstartup文件中添加以下行。
startxfce4 &
设置LXDE的桌面环境 (Set Desktop Environment For LXDE)
In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.
为了使GNOME桌面环境具有新的VNC会话,我们需要在xstartup文件中添加以下行。
lxsession &
杀死VNC服务器或会话 (Kill VNC Server or Session)
As we have started a VNC server or session to create default configuration files. We need to kill it we can kill the VNC server with the -k option and the session ID. In this example, we will kill the session ID 1 .
Now we can start a new server with the command vncserver where the default configured desktop will be fired-up.
现在,我们可以使用命令vncserver启动新服务器,其中将启动默认配置的桌面。
$ vncserver
与VNC客户端连接 (Connect with VNC Client)
VNC servers start with port number 5900 and count one by one with the session ID. For example, if we have given session ID 3 the port number will be configured as 5903 . We can connect with a VNC client which is explained in the following tutorial in detail.