vnc提供遠(yuǎn)程桌面服務(wù),下面介紹下詳細(xì)安裝步驟
執(zhí)行apt-get update更新下
apt-get update
安裝桌面環(huán)境
sudo apt install xfce4 xfce4-goodies
安裝vncserver
apt install tightvncserver
啟動(dòng)vncserver服務(wù)并初始化
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
這時(shí)候遠(yuǎn)程登錄看到桌面環(huán)境是一片空白
配置下vncserver的參數(shù)
vncserver -kill :1
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
vim ~/.vnc/xstartup
增加以下內(nèi)容
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
增加執(zhí)行權(quán)限
chmod +x ~/.vnc/xstartup
重新啟動(dòng)vncserver服務(wù)之后重新鏈接查看,成功看到桌面環(huán)境
vncserver -kill :1
vncserver
連接信息
看到如下界面成功配置