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

2008-03-27 Thread Raimund Steger
Hi, I am not sure if I understand the situation completely, but * like other Debian /etc/acpi scripts, you could run through /tmp/.X11-unix/X[0-9] which will point to locally running X servers, at least those that use UNIX sockets. * to directly reach the X server on the currently selected V

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

2008-03-27 Thread Martin Kraus
On Wed, Mar 26, 2008 at 06:38:31PM +0100, Sven Joachim wrote: > Hello Martin, > > On 2008-03-26 16:25 +0100, Martin Kraus wrote: > > > Hello, > > is there a standard way in debian to determine on what VT and display is X > > running? Say I have a script that does something and I need to return

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

2008-03-27 Thread Bob McGowan
Martin Kraus wrote: Hello, is there a standard way in debian to determine on what VT and display is X running? Say I have a script that does something and I need to return output to the user, but the user can be in linux console or in X or X doesn't have to be running etc. So I need to determin

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

2008-03-27 Thread Patter
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. Th

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

2008-03-26 Thread Sven Joachim
Hello Martin, On 2008-03-26 16:25 +0100, Martin Kraus wrote: > Hello, > is there a standard way in debian to determine on what VT and display is X > running? Say I have a script that does something and I need to return output > to the user, but the user can be in linux console or in X or X does