[sf-perl] determining console or xwindows mode

Richard Reina gatorreina at gmail.com
Sun Feb 28 19:13:42 PST 2010


Perfect. Thank you. It looks like both suggestions will work.

2010/2/28 Quinn Weaver <quinn at fairpath.com>

> If you're running under X, the DISPLAY environment variable should be set.
> So do:
>
> if ($ENV{DISPLAY}) {
>    ...
>
> --
> Quinn Weaver Consulting, LLC
> Full-stack web design and development
> http://quinnweaver.com/
> 510-520-5217
>
>
>
> On Feb 28, 2010, at 6:22 PM, Richard Reina <gatorreina at gmail.com> wrote:
>
>  I have a program that must run differently in xwindows then it would on a
>> linux console.  I was wondering if there's a function to determine if a
>> program is running in a linux console or in xwindows so that upon execute it
>>  can make the necessary accommodations?
>>
>> Thanks,
>>
>> Richard
>> _______________________________________________
>> SanFrancisco-pm mailing list
>> SanFrancisco-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>>
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20100228/cc1c7c68/attachment.html>


More information about the SanFrancisco-pm mailing list