[sf-perl] determining console or xwindows mode
sphink at gmail.com
Wed Mar 3 00:34:05 PST 2010
On Tue, Mar 2, 2010 at 8:35 PM, David Alban <extasia at extasia.org> wrote:
> caveat: you can be running under X and not have your $DISPLAY set.
> not optimal, but it happens.
> consider also checking for X11 libs and/or an X server process in the
> process table.
If DISPLAY is not set, then you wouldn't want to run in "X mode"
anyway. In the first place, you probably can't, since I'm guessing "X
mode" probably talks to the X server at some point. But even if not, I
will sometimes intentionally unset DISPLAY in order to force things
into text mode. (Usually because I am using SSH to port-forward some X
client through a slow link, and I don't want my emacs processes to
take several minutes to open up their graphical windows.)
More information about the SanFrancisco-pm