Start i3 falls es als Bootloadereintrag übergeben wurde

This commit is contained in:
Simon Rieger 2023-05-31 19:30:44 +02:00
parent ff9b3b87d0
commit 7bf9fd9f85

View file

@ -1,4 +1,16 @@
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
# Lade die Bootparameter in den Variablen
for wort in $(cat /proc/cmdline)
do
echo "Parameter ${wort%=*} = ${wort#*=}"
if ! export ${wort%=*}=${wort#*=}; then echo "cannot export ${wort}!!!"; fi
done
# Falls autostartdesktop auf i3 gesetzt wird, wird i3 statt sway gestartet
if [ "${autostartdesktop}" == "i3" ]; then
echo "exec i3" > ~/.xinitrc
startx
else
# First make sure dbus is started # First make sure dbus is started
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
export DBUS_SESSION_BUS_ADDRESS="$(dbus-daemon --session --fork --print-address)" export DBUS_SESSION_BUS_ADDRESS="$(dbus-daemon --session --fork --print-address)"
@ -52,4 +64,5 @@ if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
#XDG_CURRENT_DESKTOP=sway dbus-run-session sway #XDG_CURRENT_DESKTOP=sway dbus-run-session sway
exec sway exec sway
fi fi
fi