Public feed #381406

Someone

public shellscript v1 · immutable
Raw Edit
·published 2007-03-04 20:49 UTC
rendered paste body
#!/bin/bashif ! echo $0 | grep "bash" > /dev/null ; then \        echo 'Type ". startX" instead.'else        XSCREEN=0        isused=1        while [ "$isused" == "1" ] ; do                isused=0                file=/tmp/.X${XSCREEN}-lock                if [ -e $file ] ; then                        if ps `cat $file` > /dev/null ; then                                isused=1                                XSCREEN=$[ $XSCREEN + 1 ]                        fi                                        fi        done        startx -- :${XSCREEN} -nolisten tcp > ~/.x.out 2>&1 &        exit 0fi