summaryrefslogtreecommitdiff
path: root/packages/zaurusd/files/zaurus-hinge.matchbox-portrait
blob: bd04d328cc7d22a71067b759139fdca9b98cb0ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

  if [ -x ${ZD_BINDIR}/xrandr ]; then
    ${ZD_BINDIR}/xrandr -o left 
  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