summaryrefslogtreecommitdiff
path: root/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/zaurusd/files/zaurus-hinge.matchbox-portrait')
-rw-r--r--recipes/zaurusd/files/zaurus-hinge.matchbox-portrait29
1 files changed, 29 insertions, 0 deletions
diff --git a/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait b/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
new file mode 100644
index 0000000000..291617cd02
--- /dev/null
+++ b/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+ if [ -x ${ZD_BINDIR}/xrandr ]; then
+ if ! ( xrandr | awk '{print $4}' | grep -q left )
+ then
+ ${ZD_BINDIR}/xrandr -o left
+ fi
+ fi
+ # just to be extra safe
+ sleep 1
+
+ echo "panel_user = [$panel_user]"
+
+ if ! test -e "/tmp/gpe-panel.session-$panel_user"
+ then
+ cp /home/$panel_user/.matchbox/mbdock.session "/tmp/gpe-panel.session-$panel_user"
+ else
+ rm "/tmp/gpe-panel.session-$panel_user"
+ fi
+
+ if test -n "$panel_user"
+ then
+ echo "Running panel as user [$panel_user]"
+ ps aux | grep "$panel_user" | grep -q "mbinputmgr " || su $panel_user -c ${ZD_BINDIR}/mbinputmgr &
+ else
+ # A failsafe can't hurt
+ echo "Warning: Running mbinputmgr as root!"
+ ps aux | grep -q "mbinputmgr " || ${ZD_BINDIR}/mbinputmgr &
+ fi