No such thing as a small change | |
PerlMonks |
Re^2: Detect Environmentby Crackers2 (Parson) |
on Dec 09, 2009 at 17:01 UTC ( [id://811968]=note: print w/replies, xml ) | Need Help?? |
Another option is to check if the DISPLAY env var is set, and open up graphical if it is. I think that's the behaviour things like emacs use for example. It does mean that if you open a console from your GUI and then start the program from there, it'll open up with the GUI, which seems to be slightly different from what you describe although more intuitive. (Update: "You" in the above means the OP of course, not almut)
In Section
Seekers of Perl Wisdom
|
|