【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


总结

相关推荐
用户4107192013257 小时前
用 systemd 从零做一个系统健康巡检服务:脚本、沙箱与磁盘满排查实战
linux·ubuntu
Linux-lucky8 小时前
46-Linux学习之旅之LVS负载均衡与keepalived高可用
linux·运维·学习·ubuntu·负载均衡·lvs
wzg201612 小时前
ubuntu通过docker镜像部署安装onlyoffice
linux·ubuntu·docker
Sw1zzle14 小时前
Go入门(零):Linux Ubuntu 22.04 安装 Go
linux·ubuntu·golang
时空无限14 小时前
ubuntu 26.04 sudo 连不上主机卡住然后失败问题处理
linux·服务器·ubuntu
qq7621182214 小时前
Ubuntu20.04
ubuntu
承渊政道15 小时前
Linux网络学习【五种IO模型与⾮阻塞IO】
linux·网络·学习·ubuntu·io模型·非阻塞io
kiros_wang17 小时前
通用工具模块封装:防抖节流、参数校验公共工具类
linux·运维·ubuntu
honsor17 小时前
以太网温湿度传感器|动环监控核心采集设备,协议、组网、Zabbix接入实战
linux·服务器·ubuntu
十碗阳春面17 小时前
阿里云 Ubuntu 22.04 部署 Flarum 论坛:从空白服务器到中文界面、公网 IP 访问
服务器·ubuntu·阿里云