小编Lib*_*lor的帖子

在systemd用户服务中设置niceness值

我想以 -20 作为非 root 启动 xcape。然而,设置一个好的值 -20 需要 root 权限。所以我想知道这是否可能。我还尝试创建系统服务和设置User=myuser,但 xcape 需要 xorg,DISPLAY因此XAUTHORITY

到目前为止我得到了什么:

[Unit]
Description=xcape: esc on caps lock
PartOf=graphical-session.target

[Service]
Type=simple
Nice=-20
ExecStart=/usr/bin/xcape -t 180 -e 'Caps_Lock=Escape'

[Install]
WantedBy=default.target
Run Code Online (Sandbox Code Playgroud)

linux xorg user nice systemd

9
推荐指数
1
解决办法
9872
查看次数

标签 统计

linux ×1

nice ×1

systemd ×1

user ×1

xorg ×1