系统:xubuntu16.04
xfce4官网教程 https://xfce.org/
1.界面操作
xfce关闭桌面锁定(Automatically lock)
方法:
桌面Applications–>Settings–>Power Manager, Security标签,“Automatically lock the session”–>“Never”
xfce关闭桌面待机
桌面Applications–>Settings–>Power Manager, Display标签,“Blank after”–>“Never”
2.终端运行
- 思路:在系统中找到这个设置的配置文件,在如下目录(这里以root目录为例):
/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
修改这个配置文件的内容即可
修改后如下:
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-power-manager" version="1.0">
<property name="xfce4-power-manager" type="empty">
<property name="power-button-action" type="empty"/>
<property name="lock-screen-suspend-hibernate" type="empty"/>
<property name="logind-handle-lid-switch" type="empty"/>
<property name="blank-on-ac" type="int" value="0"/>
<property name="blank-on-battery" type="empty"/>
<property name="dpms-enabled" type="empty"/>
<property name="dpms-on-ac-sleep" type="uint" value="0"/>
<property name="dpms-on-ac-off" type="0"/>
<property name="dpms-on-battery-sleep" type="empty"/>
<property name="dpms-on-battery-off" type="empty"/>
<property name="brightness-switch-restore-on-exit" type="int" value="1"/>
<property name="brightness-switch" type="int" value="0"/>
</property>
</channel>
注:Ubuntu系统关闭系统锁屏和待机
(只对ubuntu有效)
// 关闭息屏,最后0是代表关闭锁屏,将0替换为60代表60s后自动息屏,以此类推。
gsettings set org.gnome.desktop.session idle-delay 0
// 关闭锁屏,false表示关闭,true表示打开
gsettings set org.gnome.desktop.screensaver lock-enabled false
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
参考博客:
https://blog.csdn.net/qq_23327993/article/details/114538630
https://www.cnblogs.com/hookjoy/p/4784361.html