So can you not check for BOTH a non-empty DISPLAY *and* check the process table (via ps or whatever is handy) for the X process? | [reply] |
In general, no. Because in general, the X server (which DISPLAY is pointing at) may not even be running on the local machine. You'd have to have some way of checking for a running X server process on some other machine on the network, which itself is in general a "hard" problem. You'd do better just to check if you can make an X connection directly to the specified X server.
| [reply] |
In general, no. Because in general, the X server (which DISPLAY is pointing at) may not even be running on the local machine.
But then again I'm interested in making the GUI version start automatically only if the/a X server is running on the local machine (unless explicitly stated differently by the user on the cmd line).
| [reply] |