用PVE安装ubuntu,用win10远程操作的ubuntu,想好用点,只能自己优化了,优化内容如下
1.vi编辑器优化(不优化会按键错乱)
2.开启远程桌面功能
默认的RDP功能,需要Ubuntu系统登录才能用,我PVE每天都关机的,这不符合使用要求,只能安装XRDP了
安装流程:
(1)终端:
看看是否运行中
如果没有 启动下
- sudo systemctl start xrdp # 启动xrdp
- sudo systemctl enable xrdp # 开机启动xrdp
复制代码
3.优化远程桌面显示
- export GNOME_SHELL_SESSION_MODE=ubuntu
- export XDG_CURRENT_DESKTOP=ubuntu:GNOME
- export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
复制代码
保存后 重启服务
- sudo systemctl restart xrdp.service
复制代码
如果黑屏直接重启就好了
弹出验证窗口问题解决
- su root
- cd /etc/polkit-1/localauthority/50-local.d/
- vi 45-allow-colord.pkla
复制代码
- [Allow Colord all Users]
- Identity=unix-user:*
- Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
- ResultAny=no
- ResultInactive=no
- ResultActive=yes
复制代码
- vi 46-allow-update-repo.pkla
复制代码
- [Allow Package Management all Users]
- Identity=unix-user:*
- Action=org.freedesktop.packagekit.system-sources-refresh
- ResultAny=yes
- ResultInactive=yes
- ResultActive=yes
复制代码
ubuntu18 安装xrdp后黑屏解决
- sudo apt-get install xserver-xorg-core
- sudo apt-get -y install xserver-xorg-input-all
- sudo apt-get install xrdp
- sudo apt-get install xorgxrdp
- sudo systemctl restart xrdp.service
复制代码
可选
最后加入
- unset DBUS_SESSION_BUS_ADDRESS
- unset XDG_RUNTIME_DIR
复制代码
Xrdp 体验优化 减少/解决画面卡顿
- tcp_send_buffer_bytes=4194304
- tcp_recv_buffer_bytes=6291456
复制代码
tcp_send_buffer_bytes, tcp_recv_buffer_bytes 两个参数默认被注释了,注释默认值(32768),根据实际情况进行调整。
调整系统参数
临时生效
- sudo sysctl -w net.core.rmem_max=12582912
- sudo sysctl -w net.core.wmem_max=8388608
复制代码
重启后保留
- net.core.rmem_max = 12582912
- net.core.wmem_max = 8388608
复制代码
然后执行
重启 xrdp 服务生效
- sudo systemctl restart xrdp
复制代码
4.开SSH功能
- sudo apt install openssh-server -y
复制代码
改下:
root可直接登录
重启服务
5.换源加速
- sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
复制代码
换成
- deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
- deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
- deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
- deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
复制代码
- sudo apt update && sudo apt upgrade -y
复制代码
6.关闭自动锁定
设置-隐私-屏幕-息屏延时-从不
设置-隐私-屏幕-自动锁屏-关闭 |
|