[Tutor] *nix-specific Python Scripting

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Thu May 12 21:37:03 CEST 2005


William O'Higgins wrote:
> It is a simple check to see if the X server is running (this is
> inelegant, but it works - if you have a better way, I'd love to know
> about it, but I would like to be able to do things like this in Python -
> so I might better write scripts with it).

Checking for startx doesn't work if the server is started via xdm (or 
kdm or gdm). Another solution would be to check for the DISPLAY 
environment variable, though that solution has problems of it's own.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Tutor mailing list