Hi.
I would like to be able to check whether or not X is running at login time. Namely, I'd like to be able to do something like this in ~/.bash_profile.
Code:
if [ "$X_RUNNING" = "" ]; then
echo "X is NOT running..." > x_output.txt
else
echo "X is running..." > x_output.txt
fi
The question is, what kind of environment variable can I use for this purpose (in place of the imaginary X_RUNNING)? Or is there another way? Any help/feedback would be appreciated.
TIA,
Dai