- Corrected some caret check logic, updated autostart for xkeysnail

This commit is contained in:
Ben Reaves
2020-04-25 03:26:46 -05:00
parent f0f152e21f
commit 2eb5a33b93
6 changed files with 26 additions and 14 deletions

View File

@@ -0,0 +1,5 @@
# /etc/sudoers.d/limitedadmins
%{username} ALL=NOPASSWD: /bin/systemctl restart xkeysnail
%{username} ALL=NOPASSWD: /bin/systemctl start xkeysnail
%{username} ALL=NOPASSWD: /bin/systemctl stop xkeysnail
%{username} ALL=NOPASSWD: /bin/systemctl status xkeysnail

View File

@@ -11,5 +11,6 @@ if systemctl -q --user is-enabled keyswap; then
systemctl --user disable keyswap
fi
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
mkdir -p /tmp/kinto
cp /home/{username}/.config/kinto/kinto.py /tmp/kinto/kinto.py

View File

@@ -2,7 +2,7 @@
Name=Kinto_xkey
GenericName=Kinto_xkey
Comment=Make Linux Type Like it's a Mac
Exec=/usr/bin/xhost +SI:localuser:root
Exec=/bin/bash -c "/usr/bin/xhost +SI:localuser:root && sudo /bin/systemctl restart xkeysnail"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

View File

@@ -4,7 +4,7 @@ Description=xkeysnail
[Service]
Type=simple
KillMode=process
ExecStartPre=/sbin/runuser -l {username} -c /home/{username}/.config/kinto/prexk.sh
ExecStartPre=/usr/bin/xhost +SI:localuser:root;/sbin/runuser -l {username} -c /home/{username}/.config/kinto/prexk.sh
ExecStart=/usr/bin/sudo /bin/bash -c '/home/{username}/.config/kinto/xkeystart.sh "/tmp/kinto/kinto.py"'
ExecStop=/usr/bin/sudo /usr/bin/killall xkeysnail
Restart=on-failure