Skip to content

Commit

Permalink
core/steam: handle power key
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Jan 25, 2025
1 parent 22341b8 commit 9ce4337
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ RUN useradd -m core && \
usermod -aG nopasswdlogin core && \
printf "[Autologin]\nUser=core\nSession=plasma.desktop\nRelogin=false\n\n[General]\nNumlockOnWaylandEnable=true" | sudo tee /etc/sddm.conf.d/10-autologin.conf && \
sed -i '0,/^[^#]/s//auth sufficient pam_succeed_if.so user ingroup nopasswdlogin\n&/' /etc/pam.d/sddm-autologin && \
printf "[Unit]\nDescription=Fix Steam directory permissions\nAfter=graphical.target\n\n[Service]\nType=oneshot\nExecStart=/bin/chown core:core /home/core/.local/ /home/core/.local/share /home/core/.local/share/Steam\n\n[Install]\nWantedBy=graphical.target" | sudo tee /etc/systemd/system/fix-steam-perms.service && sudo systemctl enable fix-steam-perms.service
printf "[Unit]\nDescription=Fix Steam directory permissions\nAfter=graphical.target\n\n[Service]\nType=oneshot\nExecStart=/bin/chown core:core /home/core/.local/ /home/core/.local/share /home/core/.local/share/Steam\n\n[Install]\nWantedBy=graphical.target" | sudo tee /etc/systemd/system/fix-steam-perms.service && sudo systemctl enable fix-steam-perms.service && \
sed -i -z 's/#HandlePowerKey=poweroff\n#HandlePowerKeyLongPress=ignore/HandlePowerKey=suspend\nHandlePowerKeyLongPress=poweroff/' /etc/systemd/logind.conf

# minimize image size by squashing OS to 1 layer.
FROM scratch
Expand Down

0 comments on commit 9ce4337

Please sign in to comment.