summaryrefslogtreecommitdiffstats
path: root/move/tree/halt_reboot
blob: d31032fe674e33ad186ab7a3dc1b37de63ce1647 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

sudo killall -USR1 startkde_move

if [ $UID == 0 ]; then
    user=`getent passwd 501 | perl -ne 'print $1 if /([^:]+):/'`
    su $user -c 'dcop kdesktop default logout'
else
    dcop kdesktop default logout
fi