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

how to determine from script if/where X is running

  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 determine if/where I should popup a window or
if I just need to send text to the console.

Thinking about it, is there any reliable way to find out how are different
users logged into the box? ssh,console,running X.

thanks for help

Reply to: