#!/bin/sh if [ "$1" = "--wait" ]; then xprop -root -f LTSP_COMMAND_WAIT 8u -set LTSP_COMMAND_WAIT "true" shift fi CMD=$1 shift unset ARGS for i in "$@"; do i=$(echo $i|sed -e '/ /s/^/"/' -e '/ /s/$/"/') ARGS="$ARGS $i" done xprop -root -f LTSP_COMMAND 8u -set LTSP_COMMAND "$CMD $ARGS"