1 |
On Sun, Nov 25, 2007 at 08:40:08PM -0600, reader@×××××××.com wrote: |
2 |
> Yup, both of those should work from cron or anywhere. In my case and |
3 |
> probably many other as well, I could shorten the ps approach to: |
4 |
> ps aux|grep '[X] :0' |
5 |
> |
6 |
> But looking for /tmp/.X0-lock is probably the most reliable. Thanks |
7 |
|
8 |
Try xdpyinfo. If $DISPLAY is not set, try xdpyinfo -display :0.0 for |
9 |
the usual main display. ssh -X -Y makes up its own names, but you |
10 |
haev to figure out whether cron programs should even know about the |
11 |
display in general, or the ssh ones in particular. |
12 |
|
13 |
At any rate, try this: |
14 |
|
15 |
if xdpyinfo >/dev/null; then echo "X running"; else echo "No X"; fi |
16 |
|
17 |
-- |
18 |
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._. |
19 |
Felix Finch: scarecrow repairman & rocket surgeon / felix@×××××××.com |
20 |
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933 |
21 |
I've found a solution to Fermat's Last Theorem but I see I've run out of room o |
22 |
-- |
23 |
gentoo-user@g.o mailing list |