fix readme

This commit is contained in:
2026-06-17 14:36:32 +03:00
parent da3d9ef7b5
commit 70513c1136
8 changed files with 149 additions and 8 deletions
+4
View File
@@ -6,10 +6,14 @@ After=network.target
Type=simple
User=buttontask
Group=buttontask
SupplementaryGroups=video render input
WorkingDirectory=/opt/buttontask/current
Environment=BUTTONTASK_ROOT=/opt/buttontask
Environment=BUTTONTASK_CONFIG=/opt/buttontask/config/config.json
Environment=QT_QPA_PLATFORM=eglfs
Environment=QT_QPA_EGLFS_INTEGRATION=eglfs_kms
Environment=QT_QPA_EGLFS_HIDECURSOR=1
Environment=XDG_RUNTIME_DIR=/tmp/runtime-buttontask
ExecStart=/opt/buttontask/current/ButtonTask --config /opt/buttontask/config/config.json
Restart=on-failure
RestartSec=3
@@ -0,0 +1,14 @@
# Device-specific touch input. Copy to /etc/systemd/system/buttontask.service.d/override.conf
# and replace event1 with the correct event number for your touchscreen.
#
# Find the touchscreen event number:
# grep -l -E 'ABS_X|ABS_MT_POSITION' /sys/class/input/event*/device/capabilities/abs 2>/dev/null \
# | sed 's|.*/input/event||;s|/device.*||'
#
# sudo mkdir -p /etc/systemd/system/buttontask.service.d
# sudo cp .../override.conf.example /etc/systemd/system/buttontask.service.d/override.conf
# sudo systemctl daemon-reload && sudo systemctl restart buttontask
[Service]
Environment=QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event1
Environment=QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1
+9 -2
View File
@@ -2,11 +2,18 @@
# tightly-scoped helper scripts as root, without a password.
#
# Install:
# sudo install -m 0440 buttontask.sudoers /etc/sudoers.d/buttontask
# sudo tee /etc/sudoers.d/buttontask > /dev/null << 'EOF'
# buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-netconfig
# buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-update
# buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-service
# EOF
# sudo chmod 0440 /etc/sudoers.d/buttontask
# sudo visudo -cf /etc/sudoers.d/buttontask # validate
#
# The scripts themselves must be root-owned and not writable by others:
# sudo chown root:root /opt/buttontask/scripts/bt-*
# sudo chmod 0755 /opt/buttontask/scripts/bt-*
buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-netconfig, /opt/buttontask/scripts/bt-update, /opt/buttontask/scripts/bt-service
buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-netconfig
buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-update
buttontask ALL=(root) NOPASSWD: /opt/buttontask/scripts/bt-service