blob: dca655a91391777ca218fe3b2a6620e9cca7c857 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2#
3# Very simple session manager for Mini X
4#
5
6# Uncomment below to enable parsing of debian menu entrys
7# export MB_USE_DEB_MENUS=1
8
9if [ -e $HOME/.mini_x/session ]
10then
11exec $HOME/.mini_x/session
12fi
13
14if [ -e /etc/mini_x/session ]
15then
16exec /etc/mini_x/session
17fi
18
19MINI_X_SESSION_DIR=/etc/mini_x/session.d
20if [ -d "$MINI_X_SESSION_DIR" ]; then
21 # Execute session file on behalf of file owner
22 find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do
23 set +e
24 USERNAME=`stat -c %U $SESSIONFILE`
25 # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
26# su -l -c '$SESSIONFILE&' $USERNAME
27 sudo -b -i -u $USERNAME $SESSIONFILE&
28 set -e
29 done
30fi
31
32# This resolution is big enough for hob2's max window size.
33xrandr -s 1024x768
34
35# Default files to run if $HOME/.mini_x/session or /etc/mini_x/session
36# dont exist.
37
38matchbox-terminal&
39exec matchbox-window-manager