新聞中心
如何在搬瓦工Ubuntu 18.04部署安裝 VNC 和 Gnome 實現(xiàn)遠程桌面環(huán)境教程

網(wǎng)站建設哪家好,找創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、小程序設計、集團企業(yè)網(wǎng)站建設等服務項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了鹿城免費建站歡迎大家使用!
安裝VNC服務器
步驟1:更新系統(tǒng)軟件包列表
sudo aptget update
步驟2:安裝VNC服務器
sudo aptget install tightvncserver
步驟3:設置VNC密碼
vncpasswd
輸入密碼后,系統(tǒng)會生成一個密鑰文件,請妥善保管該文件,以便在連接時使用。
安裝Gnome桌面環(huán)境
步驟1:添加Gnome桌面環(huán)境倉庫
sudo addaptrepository ppa:gnometeam/gnome
步驟2:更新系統(tǒng)軟件包列表
sudo aptget update
步驟3:安裝Gnome桌面環(huán)境
sudo aptget install gnomepanel gnomesettingsdaemon metacity nautilus gnometerminal
配置VNC連接Gnome桌面環(huán)境
步驟1:編輯VNC配置文件
sudo nano /etc/xrdp/startwm.sh
將以下內(nèi)容添加到文件中:
#!/bin/sh Uncomment the following two lines for using Gnome as the default desktop instead of Xfce4. See also /etc/X11/Xsession.d/99xstartup in case you want to use another DE. export XDG_CURRENT_DESKTOP=GNOME export XDG_CONFIG_DIRS=/etc/xdg/xdgubuntu:/etc/xdg uncomment the following line if you want to have your own .Xauthority file: export XAUTHORITY=$HOME/.Xauthority start Gnome Display Manager: gdm3 & xterminalemulator geometry 80x24+10+10 ls title "$VNCDESKTOP Desktop" & # comment this line if you don't want to start Xterm automatically exec /usr/bin/gnomesession session=gnomefallback & # comment this line if you want to use Xfce4 instead of GNOME3 as default desktop environment
保存并關閉文件。
啟動VNC服務并測試連接
步驟1:啟動VNC服務并設置為開機自啟動
sudo systemctl start vncserver@:1.service # replace "1" with the desired display number (e.g., 2 for second display) sudo systemctl enable vncserver@:1.service # replace "1" with the desired display number (e.g., 2 for second display)
步驟2:使用VNC客戶端連接到Ubuntu 18.04桌面環(huán)境(使用RealVNC或TightVNC)并輸入之前設置的密碼,如果一切正常,您應該能夠看到Gnome桌面環(huán)境。
問題與解答:
Q1:為什么無法通過VNC客戶端連接到Ubuntu 18.04桌面環(huán)境?
A1:請確保您已正確安裝和配置了VNC服務器和Gnome桌面環(huán)境,檢查防火墻設置是否允許VNC連接,并確保使用的VNC客戶端版本與Ubuntu兼容,檢查您的網(wǎng)絡連接是否正常,如果問題仍然存在,請嘗試重新啟動VNC服務并重新連接。
網(wǎng)站名稱:如何在搬瓦工Ubuntu18.04部署安裝VNC和Gnome實現(xiàn)遠程桌面環(huán)境教程
分享網(wǎng)址:http://www.5511xx.com/article/dhidgoo.html


咨詢
建站咨詢
