Windows10使用Xrdp远程桌面连接Ubuntu主机【不稳定】 |
您所在的位置:网站首页 › ubuntu重启之后无法进入界面 › Windows10使用Xrdp远程桌面连接Ubuntu主机【不稳定】 |
一、安装桌面环境
Ubuntu 服务器通常使用命令行进行管理,并且默认没有安装桌面环境。如果你正在运行 Ubuntu 桌面版,忽略这一步。 在 Ubuntu 源仓库有很多桌面环境供你选择。一个选择是安装 Gnome,它是 Ubuntu 20.04 的默认桌面环境。另外一个选项就是安装 xfce。它是快速,稳定,并且轻量的桌面环境,使得它成为远程服务器的理想桌面。 运行下面任何一个命令去安装你选择的桌面环境: 安装 Gnome sudo apt update sudo apt-get upgrade sudo apt install ubuntu-desktop安装ubuntu-desktop时,选择第一个选项 二、安装 XrdpXrdp 被包含在默认的 Ubuntu 软件源中。想要安装它,运行: sudo apt install xrdp一旦安装完成,Xrdp 服务将会自动启动。你可以输入下面的命令,验证它: sudo systemctl status xrdp输出将会像下面这样: ● xrdp.service - xrdp daemon Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-05-22 17:36:16 UTC; 4min 41s ago ... 三、利用FinalShell登陆远程桌面$sudo apt-get remove xfce4 卸载相关软件 $sudo apt-get remove xfce4* 自动卸载不必要的软件 $sudo apt-get autoremove 系统清理 $sudo apt-get clean 卸载xubuntu $sudo apt-get remove xubuntu* 同样需要卸载不必要的软件 $sudo apt-get autoremove 注意事项:xubutnu附带的应用也会删除,就是xfce或xubuntu下常用的软件也会被卸载。 3、卸载gnome # 卸载gnome sudo apt-get remove gnome -y # 卸载 gnome-shell sudo apt-get remove gnome-shell -y # 彻底卸载删除gnome的相关配置文件 sudo apt-get purge gnome -y # 卸载臃肿的服务组件 sudo apt-get remove snapd -y # 卸载依赖组件 sudo apt-get autoremove -y # 清理安装gnome时候留下的缓存程序软件包 sudo apt-get autoclean sudo apt-get clean # 重启系统 sudo reboot sudo shutdown -r now 六、ubuntu20.04 关闭图形界面关闭用户图形界面,使用xshell登录。 sudo systemctl set-default multi-user.target sudo reboot开启用户图形界面。 sudo systemctl set-default graphical.target sudo reboot 七、解决重启后桌面环境不能使用root账户登录Ubuntu安装桌面环境,桌面简介大方,和win旗鼓相当,消耗性能小。 在命令环境下运行如下命令: apt-get update //更新软件库 apt-get upgrade //升级软件 apt-get install ubuntu-desktop //安装Ubuntu桌面系安装时间有点长,需要耐心等待。 reboot重启后发现桌面环境不能使用root账户登录. 重启然后使用Ctrl + Alt + F1 进入命令行使用root登陆 运行命令 sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf //打开50-ubuntu.conf在末尾添加 greeter-show-manual-login=true //允许切换用户登陆 allow-guest=false //禁用Guest完整代码 [Seat:*] user-session=ubuntu greeter-show-manual-login=true allow-guest=false保存重启(在VI模式下编辑完成后使用Esc键切换到末行模式,然后输入:wq退出编辑)发现root用户登陆后还是有警告 修改/root/.profile文件 (图形界面下修改请勾选显示隐藏文件) 将mesg n 替换为 tty -s && mesg n 完整代码 # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi tty -s && mesg n || true保存后重启即可完美在桌面环境登陆root Windows10使用Xrdp远程桌面连接Ubuntu主机_zhwangye的博客-CSDN博客 Ubuntu Server 20.04 安装桌面(图形界面) 以及 远程桌面 Ubuntu远程桌面连接——基于xrdp_ubuntu连不上xrdp_三只佩奇不结义的博客-CSDN博客 15.windows 远程桌面连接Ubuntu20.04(xrdp)_windows远程ubuntu20.04桌面_其木王·王子的博客-CSDN博客 Ubuntu安装桌面环境_51CTO博客_ubuntu 安装桌面 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |