Add host groups (one tmux window per group) and lightdm --autologin

SOCKTOP_GROUPS splits hosts into ';'-separated groups, each its own tmux
window with an optional @layout. The carousel walks group overview -> each
pane zoomed -> next group overview. SOCKTOP_HOSTS still works as one group.

install.sh --autologin writes a lightdm.conf.d drop-in; uninstall removes it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jasonwitty
2026-08-28 09:53:39 -07:00
co-authored by Claude Fable 5
parent c5b8d04b84
commit 818b09762e
6 changed files with 184 additions and 51 deletions
+32 -1
View File
@@ -5,7 +5,8 @@
# ./install.sh --xignore ...and tell X to ignore the touch panel
# ./install.sh --i3 ...and add i3 autostart lines
# ./install.sh --noblank ...and stop the screen blanking
# ./install.sh --xignore --i3 --noblank full wall-display setup
# ./install.sh --autologin ...and make lightdm log this user straight into i3
# ./install.sh --xignore --i3 --noblank --autologin full wall-display setup
#
# Safe to re-run: an existing config file is never overwritten, and the i3 edit
# is skipped if already present.
@@ -17,17 +18,20 @@ ETC="$PREFIX/etc"
CONF="$ETC/socktop-swipe.env"
XCONF=/etc/X11/xorg.conf.d/99-ignore-touch-socktop-swipe.conf
BCONF=/etc/X11/xorg.conf.d/10-no-blanking-socktop-swipe.conf
LCONF=/etc/lightdm/lightdm.conf.d/50-autologin-socktop-swipe.conf
SRC="$HOME/src/lisgd"
here=$(cd "$(dirname "$0")" && pwd)
do_xignore=no
do_i3=no
do_noblank=no
do_autologin=no
for a in "$@"; do
case "$a" in
--xignore) do_xignore=yes ;;
--i3) do_i3=yes ;;
--noblank) do_noblank=yes ;;
--autologin) do_autologin=yes ;;
*) echo "unknown option: $a" >&2; exit 2 ;;
esac
done
@@ -147,6 +151,33 @@ EOF
relogin=yes
fi
# --- optional: lightdm autologin --------------------------------------------
if [ "$do_autologin" = yes ]; then
# A wall display must come back by itself after a power cut. Without this a
# reboot leaves the panel at the greeter with nothing autostarted.
# SECURITY: anyone with physical access to the screen gets this user's
# session. Only use it on a display whose user account is nothing but the
# dashboard. Debian's lightdm-autologin PAM stack needs no extra group.
if [ ! -d /etc/lightdm ]; then
echo "!! /etc/lightdm not found; skipping autologin (not lightdm?)" >&2
else
session=i3
[ -e /usr/share/xsessions/$session.desktop ] ||
echo "!! /usr/share/xsessions/$session.desktop missing; check autologin-session in $LCONF" >&2
echo "==> enabling lightdm autologin for $(id -un) into '$session'"
sudo mkdir -p /etc/lightdm/lightdm.conf.d
sudo tee "$LCONF" >/dev/null <<EOF
# Installed by socktop-swipe (--autologin). Wall display: come back unattended
# after a reboot. Remove this file to restore the login prompt.
[Seat:*]
autologin-user=$(id -un)
autologin-user-timeout=0
autologin-session=$session
EOF
echo " wrote $LCONF (takes effect at next boot)"
fi
fi
# --- optional: i3 autostart -------------------------------------------------
if [ "$do_i3" = yes ]; then
i3conf="$HOME/.config/i3/config"