【Xrdp联机Ubuntu20.04实用知识点补充】

简单归纳了Xrdp远程连接可能会出现的问题

文章目录


一、网络篇

ip addr show

eth0接口的IP地址

直接显示IP

hostname -I

ifconfig(Ubuntu使用该命令需要配置)

hostname查询主机名称(window&ubuntu通用)

Ubuntu20.04截图快捷键(24版本按PS键即可)

CTRL+SHIFT+PS自由选区截图

PS全屏截图

二、Ubuntu远程联机一段时间后莫名奇妙断开

Ubuntu20.04禁用休眠配置

创建如下配置文件

sudo touch /etc/polkit-1/localauthority/90-mandatory.d/disable-hibernate.pkla

sudo vim /etc/polkit-1/localauthority/90-mandatory.d/disable-hibernate.pkla

添加如下配置

Disable hibernate (upower)

Identity=unix-user:*

Action=org.freedesktop.upower.hibernate

ResultActive=no

ResultInactive=no

ResultAny=no

Disable hibernate (logind)

Identity=unix-user:*

Action=org.freedesktop.login1.hibernate

ResultActive=no

Disable hibernate for all sessions (logind)

Identity=unix-user:*

Action=org.freedesktop.login1.hibernate-multiple-sessions

ResultActive=no

禁用挂起配置

sudo touch /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla

sudo vim /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla

Disable suspend (upower)

Identity=unix-user:*

Action=org.freedesktop.upower.suspend

ResultActive=no

ResultInactive=no

ResultAny=no

Disable suspend (logind)

Identity=unix-user:*

Action=org.freedesktop.login1.suspend

ResultActive=no

Disable suspend for all sessions (logind)

Identity=unix-user:*

Action=org.freedesktop.login1.suspend-multiple-sessions

ResultActive=no

重启

sudo reboot

三、refresh界面频繁刷新

解决"刷新系统软件源需要认证" / "refresh the system repositories" 弹窗

创建文件 /etc/polkit-1/localauthority/50-local.d/46-allow-packagekit.pkla 并写入内容:(sudo vim)

sudo vim /etc/polkit-1/localauthority/50-local.d/46-allow-packagekit.pkla

Allow Refresh Repository all Users

Identity=unix-user:*

Action=org.freedesktop.packagekit.system-sources-refresh

ResultAny=no

ResultInactive=no

ResultActive=yes

四、Authentication is required to create a color profile

创建一个配置文件

sudo vim /etc/polkit-1/localauthority/50-local.d/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

按键:wq退出

参考文章

https://blog.csdn.net/qq_38329811/article/details/121142402


总结

相关推荐
云的牧人3 小时前
Ubuntu 22 redis集群搭建
linux·运维·ubuntu
小猪写代码4 小时前
Ubuntu 文件权限管理
linux·ubuntu
jzzy_hony6 小时前
移植Qt4.8.7到ARM40-A5
qt·ubuntu·arm·终端
davenian9 小时前
< 自用文 OS 有关 > (续)发现正在被攻击 后的自救 Fail2ban + IPset + UFW 工作流程详解
ubuntu·bash·fail2ban·ipset
阿贤Linux10 小时前
设置网卡名称为传统命名方式
linux·ubuntu
GoodG_study12 小时前
windows通过xrdp远程连接Ubuntu黑屏问题解决
linux·ubuntu
一张假钞12 小时前
Windows 11主机Ubuntu 24.04虚机共享目录权限问题
linux·运维·ubuntu
GoodG_study13 小时前
一文教您解决win11运行Ubuntu,wsl相关命令出现系统找不到指定文件的错误提示
linux·ubuntu·wsl
daizhe15 小时前
Mac M4环境下基于VMware Fusion虚拟机安装Ubuntu24.04 LTS ARM版
ubuntu·macos