Somebody once said:
>On Thu, Nov 18, 2004 at 03:02:14PM -0700, Jared Anderson wrote:
>> Just curious of the most effective way to determine if X is running in
>> a shell script. I have used a few ugly methods of such, but they are
>> ugly: the most recent is no longer effective while using radeonfb
>> driver and splashutils. Any useful input would be appreciated!!
>
>Do you mean running on the system, or if the script is being run under
>X? If it's the latter, try something like this:
>
>if [ ! -z "$DISPLAY" ]
>then
> # X is running
>else
> # X is not running
>fi
>
Running on the system.
That is what I have been doing, checking if DISPLAY was empty, but now the DISPLAY variable is being set before X is started. I believe this recently changed when I migrated from vesafb to radoeonfb or the version of splashutils, but not sure.
Sometimes emerge -u world is a bit too powerful. ;)
--
my$.02
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss