
tightvnc 远程开机
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.
TightVNC是基于VNC协议的非常方便的远程桌面应用程序。 TightVNC主要用于Linux系统,以便使用GUI管理远程桌面环境。 在本教程中,我们将研究如何正确安装和配置以运行带有TightVNC的桌面环境,例如KDE,GNOME,XFCE等。
安装Ubuntu,Debian,Mint,Kali (Install Ubuntu, Debian, Mint, Kali)
We can use the following command to install deb
based distributions.
我们可以使用以下命令来安装基于deb
的发行版。
$ sudo apt install tightvncserver

安装CentOS,Fedora,RHEL (Install CentOS, Fedora, RHEL)
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.
现在,我们需要为VNC会话指定一个桌面环境。 实际上,我们尚未创建VNC会话,但将创建一个新会话来创建默认配置文件。 我们通过提供VNC会话的密码来运行以下命令。
$ vncserver

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
.
我们可以看到,在VNC服务器启动期间,指定了一个密码,该密码将被询问给要连接此VNC服务器的VNC客户端。 然后,我们想创建一个仅查看密码的问题。 仅查看密码可用于仅查看VNC会话,但无法控制它。 使用数字1创建新的VNC服务器会话,这意味着服务器端口为5901
,也称为ubuntu:1
。
xstartup配置文件 (xstartup Configuration File)
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
.
所有与VNC Server相关的配置都保存在名为xstartup
的文件中,该文件位于用户的主目录.vnc
文件夹中。 让我们打印默认配置。 在这种情况下,VNC配置文件位于/home/ismail/.vnc/xstartup
。
$ cat .vnc/xstartup

为KDE设置桌面环境(Set Desktop Environment For KDE)
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
.
当我们启动VNC服务器或会话以创建默认配置文件时。 我们需要杀死它,我们可以使用-k
选项和会话ID杀死VNC服务器。 在此示例中,我们将终止会话ID 1
。
$ vncserver -kill :1

启动服务器或会话(Start Server or Session)
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.
VNC服务器以端口号5900
开头,并以会话ID逐一计数。 例如,如果我们给了会话ID 3,则端口号将配置为5903
。 我们可以连接VNC客户端,下面的教程对此进行了详细说明。
Best VNC Viewer Clients For Linux
192.168.115.123:5901

翻译自: https://www.poftut.com/how-to-install-and-access-tightvnc-remote-desktop-in-linux/
tightvnc 远程开机