0

On a POSIX-compliant system, how do one detect if X is running and if it's usable for the application.

Anders
  • 6,188
  • 4
  • 26
  • 31

1 Answers1

1

Check if $DISPLAY has a value, and try to connect the the server at that address.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358