歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Ubuntu遠程管理(xrdp設置)(含其他)

Ubuntu遠程管理(xrdp設置)(含其他)

日期:2017/3/3 11:55:46   编辑:Linux技術
安裝及設置xrdp
touch ~/installXrdp.sh 
cat > ~/installXrdp.sh <<EOF

#!/bin/bash

echo "root:root123"|chpasswd
sed -i "s,PermitRootLogin.*,PermitRootLogin yes,g" /etc/ssh/sshd_config
service ssh restart
cp /etc/apt/sources.list /etc/apt/sources.list_ori
sed -i "s,us.archive.ubuntu.com,cn.archive.ubuntu.com,g" /etc/apt/sources.list   
apt-get update
apt-get -y upgrade 
apt-get install -y xrdp vnc4server xubuntu-desktop 
apt-get clean
echo "xfce4-session" >~/.xsession
service xrdp restart
EOF

chmod +x ~/installXrdp.sh
~/installXrdp.sh
在/etc/xrdp/xrdp.ini追加以下內容,使得斷開連接後再次重連時還能進入之前的桌面環境
參考地址http://c-nergy.be/blog/?p=4471
[xrdp8]
name=Reconnect
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5910
首次連接是選擇sesman-Xvnc



後續連接時選擇Reconnet即可訪問之前的界面



也可以在首次登陸時記錄一下端口號(無需修改/etc/xrdp/xrdp.ini文件)



後續訪問是仍然選擇 sesman-Xvnc,但端口號填寫之前記錄的那個端口



其他:
安裝必要組件
apt-get install -y vim openssh-server
apt-get install language-pack-zh-hans  #最好在界面中操作,系統設置-語言支持
apt-get clean
安裝谷歌輸入法
apt-get install -y fcitx-googlepinyin 
apt-get clean

安裝subline
Copyright © Linux教程網 All Rights Reserved