Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions root/defaults/startwm.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/usr/bin/env bash

# fd 3 is opened by svc-de/run and follows SELKIES_DEBUG, stay quiet without it
[ -e /proc/self/fd/3 ] || exec 3>/dev/null

# Start DE
if [ "${SELKIES_DESKTOP,,}" == "true" ]; then
exec dbus-launch --exit-with-session /usr/bin/openbox-session > /dev/null 2>&1 &
exec dbus-launch --exit-with-session /usr/bin/openbox-session >&3 2>&3 &
OPENBOX_PID=$!
sleep 1
selkies-desktop
kill $OPENBOX_PID
else
exec dbus-launch --exit-with-session /usr/bin/openbox-session > /dev/null 2>&1
exec dbus-launch --exit-with-session /usr/bin/openbox-session >&3 2>&3
fi
11 changes: 7 additions & 4 deletions root/defaults/startwm_wayland.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# fd 3 is opened by svc-de/run and follows SELKIES_DEBUG, stay quiet without it
[ -e /proc/self/fd/3 ] || exec 3>/dev/null

# Start DE
ulimit -c 0
export XCURSOR_THEME=breeze_cursors
Expand Down Expand Up @@ -28,7 +31,7 @@ if [ "${PELORUS,,}" == "true" ]; then
kill $ATSPI_PID
kill $LABWC_PID
kill $PELORUS_PID
' > /dev/null 2>&1
' >&3 2>&3
else
dbus-run-session bash -c '
/usr/libexec/at-spi2-registryd &
Expand All @@ -38,18 +41,18 @@ if [ "${PELORUS,,}" == "true" ]; then
labwc
kill $ATSPI_PID
kill $PELORUS_PID
' > /dev/null 2>&1
' >&3 2>&3
fi
else
if [ "${SELKIES_DESKTOP,,}" == "true" ]; then
labwc > /dev/null 2>&1 &
labwc >&3 2>&3 &
LABWC_PID=$!
sleep 1
export WAYLAND_DISPLAY=wayland-0
export DISPLAY=:0
selkies-desktop
kill $LABWC_PID
else
labwc > /dev/null 2>&1
labwc >&3 2>&3
fi
fi
8 changes: 8 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-de/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/with-contenv bash

# session output goes to fd 3, opened here while still root because abc
# cannot open /dev/stdout itself but inherits the descriptor
if [[ "${SELKIES_DEBUG,,}" == "true" ]]; then
exec 3>&1
else
exec 3>/dev/null
fi

# wayland entrypoint
if [[ "${PIXELFLUX_WAYLAND,,}" == "true" ]]; then
SOCKET_PATH="${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-1}"
Expand Down
Loading