windows遠端連線linux-安裝xfce介面,ubuntn添加新使用者

來源:互聯網
上載者:User

標籤:使用者名稱   遇到   終端   idc   add   t許可權   ber   top   自己   

參考:“ 使用xrdp實現windows 遠端桌面連線linux” http://blog.csdn.net/qq_33530388/article/details/64502902; http://www.linuxidc.com/Linux/2017-04/142690.htm

之前一直用mstsc串連windows主機,今天想用此來串連linux主機時,發現 串連不了~!!~ 

自己沒有伺服器,但是想用windows的台式機遠端連線膝上型電腦的linux系統,膝上型電腦的是ubuntn16.04系統,首先在系統上新添加一個使用者,如果不添加的話,使用管理員身份也是可以的,但是當遠端連線是發現並不能串連,螢幕是黑色的。

ubuntn下添加新使用者

某些情況下,Ubuntu 使用useradd 新使用者名稱,在home 檔案夾下面看不到新建立的使用者檔案夾,例如:

[email protected]:/home/kuku# useradd spark  

[email protected]:/home/kuku# passwd spark  

Enter new UNIX password:  

Retype new UNIX password:  

passwd: password updated successfully  

[email protected]:/home/kuku# cd ..  

[email protected]:/home# ls  kuku  

[email protected]:/home#  

發現找不到,spark的檔案夾,因此將採用下面方式重建立立

首先刪除spark使用者

[email protected]:/home# userdel spark  

[email protected]:/home# useradd -r -m -s /bin/bash spark  

[email protected]:/home# passwd spark  

Enter new UNIX password:  

Retype new UNIX password:  

passwd: password updated successfully

[email protected]:/home# ls  kuku  spark  

[email protected]:/home#

則可以看到現在已經建立了新的檔案夾

 

若想給新使用者添加root許可權,則

[email protected]:/home#chmod +w /etc/sudoers 
[email protected]:/home# vim /etc/sudoers

然後儲存!

 

若想刪除某個使用者,則
[email protected]:/home# userdel -r spark 

xrdp安裝配置方法

開啟終端:依次安裝

sudo apt-get install xrdpsudo apt-get install vnc4server tightvncserver
設定xrdp

echo "gnome-session --session=gnome-classic" > ~/.xsession

該命令的作用是由於安裝了 gnome案頭,ubuntu12.04中同時存在unity、GNOME多個案頭管理器,需要啟動的時候指定一個,不然  即使遠程登入驗證成功以後,也只是背景。

 xrdp的配置文檔在/etc/xrdp目錄下的xrdp.ini和sesman.in,一般選擇預設。

重啟 xrdp
sudo /etc/init.d/xrdp restart
運行Windows的mstsc

 
 
即windows 遠端桌面,開啟輸入遠端Ip,串連,輸入使用者密碼 即可遠程linux.

遇到的問題

xrdp支援不了16.04的gnome了,解決辦法是裝個xfce介面, 
sudo apt-get install xubuntu-desktop 
然後: 
echo xfce4-session >~/.xsession

再設定設定檔 
sudo gedit /etc/xrdp/startwm.sh 
在. /etc/X11/Xsession 前一行插入 
xfce4-session 
重啟xrdp 
sudo service xrdp restart

windows遠端連線linux-安裝xfce介面,ubuntn添加新使用者

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.