Windows 遠程桌面連接Ubuntu16.04圖像界面


1.安裝xrdp 

sudo apt-get install xrdp

2. 安裝vnc4server 

 sudo apt-get install vnc4server 

3. 安裝xubuntu-desktop  

sudo apt-get install xubuntu-desktop

注意: 這一步可能會出現錯誤,形如:

Reading package lists... Done
Building dependency tree 
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
xubuntu-desktop : Depends: gtk2-engines-pixbuf but it is not going to be installed
Depends: xubuntu-artwork but it is not going to be installed
Depends: xubuntu-core but it is not going to be installed
Depends: xubuntu-default-settings but it is not going to be installed
Recommends: apt-offline but it is not going to be installed
Recommends: brltty-x11 but it is not going to be installed
Recommends: libreoffice-style-elementary but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

出現這個問題的原因是apt-get包管理器無法找到依賴項,所以無法安裝依賴項的安裝包。解決辦法如下:

vim /etc/apt/sources.list

添加以下阿里雲的源:

deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

保存退出

然后在更新一下本地緩存

sudo apt-get update

出現該問題的原因是:

當使用apt-get安裝應用時,默認配置的官網源,非常不全,導致無法自動解決依賴,而且下載的異常緩慢。所以,只需要把默認源改為正確的就可以了。這里推薦使用阿里的apt源。如果你買過阿里雲的服務器,那么ubuntu系統默認也是阿里自家的apt源,非常完整而且在國內下載很快,基本在500KB/s 左右。

4.向xsession中寫入xfce4-session   

echo “xfce4-session” >~/.xsession 

5. 開啟xrdp服務   

sudo service xrdp restart 

6. 設置允許遠程訪問

 進入系統-》首選項-》桌面共享,或者直接搜索桌面共享,如圖所示

 

遠程連接效果:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM