M7350/oe-core/meta/recipes-graphics/mini-x-session/files/mini-x-session
2024-09-09 08:52:07 +00:00

33 lines
654 B
Bash

#!/bin/sh
#
# Very simple session manager for Mini X
#
# Uncomment below to enable parsing of debian menu entrys
# export MB_USE_DEB_MENUS=1
if [ -e $HOME/.mini_x/session ]
then
exec $HOME/.mini_x/session
fi
if [ -e /etc/mini_x/session ]
then
exec /etc/mini_x/session
fi
MINI_X_SESSION_DIR=/etc/mini_x/session.d
# Execute session file on behalf of file owner
for SESSIONFILE in $MINI_X_SESSION_DIR/*; do
set +e
USERNAME=`stat -c %U $SESSIONFILE`
sudo -b -i -u $USERNAME $SESSIONFILE&
set -e
done
# Default files to run if $HOME/.mini_x/session or /etc/mini_x/session
# dont exist.
matchbox-terminal&
exec matchbox-window-manager