summaryrefslogtreecommitdiffstats
path: root/move/tree/startkde_move
blob: a455ee5805a68ec5ca2d5f9b63dce41ef8286bae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

#- exit cleanly on SIGUSR1, so that our init can see a clean shutdown and automatically reboot
reboot () {
    exit 0
}
trap 'reboot' SIGUSR1

while true; do
    wait4x || exit 1
    xwait -permanent &
    xdim=`xdpyinfo | perl -ne 'print $1 if /dimensions:\s*(\d+)/'`
    qiv --root /image/move/BOOT-$xdim-MOVE.jpg
    /etc/X11/xdm/Xsession KDE   #- call it with KDE parameter to keep background image
    sudo killall X
    sleep 2
done