[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to determine from script if/where X is running

On Wed, 26 Mar 2008 18:50:07 +0100, Sven Joachim wrote:
> Most programs simply check for the DISPLAY environment variable.  This
> is not totally reliable as it can be changed at will, but if the user
> messes around with that variable, it is considered his fault.  And
> you're in good company.

Though DISPLAY is only set if your process is running from within X. If
you need to find a running X from the console (though you won't be able
to attach to it) try 'ps'.

Stephen Patterson :: steve@patter.mine.nu :: http://patter.mine.nu/
GPG: B416F0DE :: Jabber: patter@jabber.earth.li 
"Don't be silly, Minnie. Who'd be walking round these cliffs with a gas oven?"

Reply to: