"Andrey Falko" <[EMAIL PROTECTED]> writes:
> How about something like this: retval=`ps aux | grep tty | grep X | awk
> '{print $2}'`
>
> Or retval=`cat /tmp/.X0-lock`
>
> Or even better:
>
> if [[ -e "/tmp/.X0-lock" ]];thenYup, both of those should work from cron or anywhere. In my case and probably many other as well, I could shorten the ps approach to: ps aux|grep '[X] :0' But looking for /tmp/.X0-lock is probably the most reliable. Thanks -- [EMAIL PROTECTED] mailing list

