From 1b1fa2180567bbbc574c99d9f3808538ee1a9e97 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Dec 04 2022 21:19:39 +0000 Subject: Add the livesys for sway --- diff --git a/libexec/livesys/sessions.d/livesys-sway b/libexec/livesys/sessions.d/livesys-sway new file mode 100755 index 0000000..c340647 --- /dev/null +++ b/libexec/livesys/sessions.d/livesys-sway @@ -0,0 +1,30 @@ +#!/bin/bash +# +# live-sway: sway specific setup for livesys +# SPDX-License-Identifier: GPL-3.0-or-later +# + +SWAY_SESSION_FILE="sway.desktop" + +# set up autologin for user liveuser +if [ -f /etc/sddm.conf ]; then +sed -i 's/^#User=.*/User=liveuser/' /etc/sddm.conf +sed -i "s/^#Session=.*/Session=${SWAY_SESSION_FILE}/" /etc/sddm.conf +else +cat > /etc/sddm.conf << SDDM_EOF +[Autologin] +User=liveuser +Session=${SWAY_SESSION_FILE} +SDDM_EOF +fi + +# Show harddisk install on the desktop +sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop +mkdir /home/liveuser/Desktop + +# echoing type liveinst to start the installer +echo "echo 'Please type liveinst and press Enter to start the installer'" >> /home/liveuser/.bashrc + +# fixing the installer non opening bug +# this should ideally go into the /home/liveuser/.profile but SDDM won't source that +echo "xhost si:localuser:root" >> /home/liveuser/.bashrc