#!/bin/sh A=/usr/bin/gpe-appmgr D=/usr/lib/psionlx-software sum_of() { set -- $(md5sum "$1"); echo "$1"; } restart_launcher() { killall gpe-appmgr 2>/dev/null || return 0 sleep 1 XA=; [ -f /home/lx/.Xauthority ] && XA=XAUTHORITY=/home/lx/.Xauthority su - lx -c "DISPLAY=:0 $XA gpe-appmgr -d -r > /dev/null 2>&1 &" sleep 10 } # Put Psion's launcher back, if ours is the one in place. if [ "$(sum_of $A)" = "587c1907de63f987399e2a3767dc6919" ] && [ -f $D/gpe-appmgr.psion ]; then cp $D/gpe-appmgr.psion $A.new && chmod 755 $A.new && mv $A.new $A \ && rm -f $D/gpe-appmgr.psion && restart_launcher fi exit 0