vnc提供遠程桌面服務,下面介紹下詳細安裝步驟
執行apt-get update更新下
apt-get update
安裝桌面環境
sudo apt install xfce4 xfce4-goodies
安裝vncserver
apt install tightvncserver
啟動vncserver服務并初始化
root@wxj-virtual-machine:~# vncserver
You will require a password to access your desktops.
Password:
Verify:?
Would you like to enter a view-only password (y/n)?
xauth:? file /root/.Xauthority does not exist
New 'X' desktop is wxj-virtual-machine:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/wxj-virtual-machine:1.log
這時候遠程登錄看到桌面環境是一片空白
配置下vncserver的參數
vncserver -kill :1
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
vim ~/.vnc/xstartup
增加以下內容
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
增加執行權限
chmod +x ~/.vnc/xstartup
重新啟動vncserver服務之后重新鏈接查看,成功看到桌面環境
vncserver -kill :1
vncserver
連接信息
看到如下界面成功配置