[wxPython] setting the DISPLAY?

Hello list,

<newbie Q alert>

Is there a way to set the display?
I've searched the tutorial, reference and list archives without success. i hope that isn't because this being inclusive of ms-win means such a feature is unsupported!
if it isn't, is there a way to do it by dropping down to wxGTK?

in the interim i tried os.putenv('DISPLAY','machine:0')
but os.getenv('DISPLAY') does not return a changed value!
which seems at variance with the library ref...

</newbie Q alert>

thanks,
Chris Quinn

Is there a way to set the display?
I've searched the tutorial, reference and list archives without success.
i hope that isn't because this being inclusive of ms-win means such a
feature is unsupported!
if it isn't, is there a way to do it by dropping down to wxGTK?

Putting it in the environnment before invoking Python works for me:

    DISPLAY=storm:2 python demo.py

in the interim i tried os.putenv('DISPLAY','machine:0')

This also works for me from within the interactive interpreter:

import os
os.putenv("DISPLAY", "storm:2")
import demo

I think the key is that the DISPLAY needs to be set *before* the core wx
module is imported, as that is where gtk+ is initialized and checks the
value of DISPLAY. Also, the content of sys.argv is sent to gtk_init so it
should be settable there too, but it didn't work for some reason when I just
tried it...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Can I ask a really dumb question, just what do you mean by set the display? I
notice the example about storm:2 but it didn't make any sense to me. Could
someone explain please.

Thanks

Richard Terry

···

On Thursday 01 August 2002 3:32 am, Christopher Quinn wrote:

Hello list,

<newbie Q alert>

Is there a way to set the display?
I've searched the tutorial, reference and list archives without success.
i hope that isn't because this being inclusive of ms-win means such a
feature is unsupported!
if it isn't, is there a way to do it by dropping down to wxGTK?

in the interim i tried os.putenv('DISPLAY','machine:0')
but os.getenv('DISPLAY') does not return a changed value!
which seems at variance with the library ref...

</newbie Q alert>

thanks,
Chris Quinn

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Can I ask a really dumb question, just what do you mean by set the

display? I

notice the example about storm:2 but it didn't make any sense to me. Could
someone explain please.

In X Window environments with multiple displays (either several physical
screen buffers, or perhaps when several virtual screens are in use for
multiple sessions), each display has to have separate identification. The
usual notation is "host:display.screen", where the screen number can be
omitted. Nowadays a remote login to another system will usually set the
DISPLAY environment variable automatically to show the correct display.

You must be a Windows user :wink: Hope this helps.

regards

···

----- Original Message -----
From: "richard terry" <rterry@gnumed.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, August 01, 2002 5:33 PM
Subject: Re: [wxPython] setting the DISPLAY?

-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------

Actually I'm in Mandrake 8.2, just a dumb user. Do you mean the equivalent of
different desktops, eg I have four set accessable by clicking on their names
on the task bar, and different apps run on the desktop I start them on.

Or is it like with my Win4Lin which I use in Linux where I can run it full
screen and shift back and forth between a full screen windows and Linux by
hitting a function key.

thanks

···

On Saturday 03 August 2002 11:44 pm, Steve Holden wrote:

----- Original Message -----
From: "richard terry" <rterry@gnumed.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, August 01, 2002 5:33 PM
Subject: Re: [wxPython] setting the DISPLAY?

> Can I ask a really dumb question, just what do you mean by set the

display? I

> notice the example about storm:2 but it didn't make any sense to me.
> Could someone explain please.

In X Window environments with multiple displays (either several physical
screen buffers, or perhaps when several virtual screens are in use for
multiple sessions), each display has to have separate identification. The
usual notation is "host:display.screen", where the screen number can be
omitted. Nowadays a remote login to another system will usually set the
DISPLAY environment variable automatically to show the correct display.

You must be a Windows user :wink: Hope this helps.

regards
-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Well, it's more like Win4Lin than the desktops, which are all a part of the
same virtual display. But you might choose to run (e.g.) the VNC server,
which allows remote users to create their own X Windos session running on
its own virtual display. *That* would have a different display designation.

regards

···

-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------

----- Original Message -----
From: "richard terry" <rterry@gnumed.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Saturday, August 03, 2002 9:59 AM
Subject: Re: [wxPython] setting the DISPLAY?

Actually I'm in Mandrake 8.2, just a dumb user. Do you mean the equivalent
of
different desktops, eg I have four set accessable by clicking on their names
on the task bar, and different apps run on the desktop I start them on.

Or is it like with my Win4Lin which I use in Linux where I can run it full
screen and shift back and forth between a full screen windows and Linux by
hitting a function key.

thanks

On Saturday 03 August 2002 11:44 pm, Steve Holden wrote:

----- Original Message -----
From: "richard terry" <rterry@gnumed.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, August 01, 2002 5:33 PM
Subject: Re: [wxPython] setting the DISPLAY?

> Can I ask a really dumb question, just what do you mean by set the

display? I

> notice the example about storm:2 but it didn't make any sense to me.
> Could someone explain please.

In X Window environments with multiple displays (either several physical
screen buffers, or perhaps when several virtual screens are in use for
multiple sessions), each display has to have separate identification. The
usual notation is "host:display.screen", where the screen number can be
omitted. Nowadays a remote login to another system will usually set the
DISPLAY environment variable automatically to show the correct display.

You must be a Windows user :wink: Hope this helps.

regards
-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users