On Fri, Feb 25, 2011 at 13:05, Samuel Thibault <sthiba...@debian.org> wrote: > Otavio Salvador, le Fri 25 Feb 2011 13:01:59 +0000, a écrit : >> if pidof X > /dev/null; then >> echo "X is running" >> else >> echo "X isn't running" >> fi > > Errr, surely not :)
heh. > What Anton wants is to know whether X is currently at the front or not. > And you can't rely on DISPLAY being set (since you could be from sudo su > -), and you can't rely on stdin being the VT (since you could be from > screen). At best you could test whether the console is in text or > graphical mode. I see. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinwvt4x2b49x8wttuaqpzuysudrkbn0-8-yc...@mail.gmail.com