29 lines
551 B
Plaintext
29 lines
551 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# kroot
|
||
|
#
|
||
|
# Wrapper for X11 programs which use root window; useful for KDE 3
|
||
|
# desktops
|
||
|
|
||
|
if [ $# -lt 1 ]; then
|
||
|
echo "Usage: kroot <program>"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
trap "xrefresh" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO
|
||
|
|
||
|
vroot=`/opt/kde3/bin/dcop kdesktop KDesktopIface isVRoot 2> /dev/null`
|
||
|
|
||
|
if [ "x$vroot" == "xfalse" ]; then
|
||
|
/opt/kde3/bin/dcop kdesktop KDesktopIface setVRoot true &> /dev/null
|
||
|
fi
|
||
|
"$@" &
|
||
|
pid=$!
|
||
|
if [ "x$vroot" == "xfalse" ]; then
|
||
|
/opt/kde3/bin/dcop kdesktop KDesktopIface setVRoot false &> /dev/null
|
||
|
fi
|
||
|
|
||
|
wait $pid
|
||
|
|
||
|
exit 0
|