Launching PyGTK app from a serial console

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Launching PyGTK app from a serial console

Paul D. DeRocco
I've put pygtk onto a Gumstix Overo board, which uses the XFCE desktop
manager (GTK-based). At the moment, I'm using a Tobi expansion board and a
full-sized monitor, but eventually I want to switch to a Chestnut43 board
with a 4.3" LCD.

At present, I can successfully launch a graphical Python app from a terminal
window on the screen, but on a tiny LCD I want the app to fill the screen,
so I want to launch from something else. If I try launching the Python app
from a serial console, it barfs because it doesn't know what to display it
on.

Can anyone explain to me how PyGTK finds the windowing system so that it can
create its window? Is it something in the environment? I don't see any
likely candidate. Eventually, I may want to use an X server on another
machine to run a development console, in which case I'll still want my PyGTK
app to use the small LCD instead of putting itself up on my X server. But
for now, is there some way I can run Python from a serial console and have
it put up a PyGTK window on the only display?

--

Ciao,               Paul D. DeRocco
Paul                mailto:[hidden email]
 

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: Launching PyGTK app from a serial console

Stuart Axon
Hi Paul,
   You just need to set DISPLAY correctly.    You can check what it's set to in a terminal in XFCE:

$ echo $DISPLAY
:0

Then in the terminal your connected on the serial console, set it to the same thing;

$ export DISPLAY :0


Then test launching an any X app (I tested using gedit + it work).

 
S++

Date: Mon, 5 Aug 2013 22:25:28 -0700
From: "Paul D. DeRocco" <[hidden email]>
To: "PyGTK List" <[hidden email]>
Subject: [pygtk] Launching PyGTK app from a serial console
Message-ID: <[hidden email]>
Content-Type: text/plain;    charset="us-ascii"

I've put pygtk onto a Gumstix Overo board, which uses the XFCE desktop
manager (GTK-based). At the moment, I'm using a Tobi expansion board and a
full-sized monitor, but eventually I want to switch to a Chestnut43 board
with a 4.3" LCD.

At present, I can successfully launch a graphical Python app from a terminal
window on the screen, but on a tiny LCD I want the app to fill the screen,
so I want to launch from something else. If I try launching the Python app
from a serial console, it barfs because it doesn't know what to display it
on.

Can anyone explain to me how PyGTK finds the windowing system so that it can
create its window? Is it something in the environment? I don't see any
likely candidate. Eventually, I may want to use an X server on another
machine to run a development console, in which case I'll still want my PyGTK
app to use the small LCD instead of putting itself up on my X server. But
for now, is there some way I can run Python from a serial console and have
it put up a PyGTK window on the only display?

--

Ciao,              Paul D. DeRocco
Paul                mailto:[hidden email]




------------------------------

_______________________________________________
pygtk mailing list [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


End of pygtk Digest, Vol 126, Issue 3
*************************************



_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: Launching PyGTK app from a serial console

Paul D. DeRocco
> From: Stuart Axon
>
> Hi Paul,
>    You just need to set DISPLAY correctly.    You can check
> what it's set to in a terminal in XFCE:
>
>
> $ echo $DISPLAY
> :0
>
> Then in the terminal your connected on the serial console,
> set it to the same thing;
>
> $ export DISPLAY :0
>
>
> Then test launching an any X app (I tested using gedit + it work).

That's what I've already done. It's properly displaying now. What I'm asking
is how to get rid of the desktop "underneath".

--

Ciao,               Paul D. DeRocco
Paul                mailto:[hidden email]

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: Launching PyGTK app from a serial console

Stuart Axon
In reply to this post by Stuart Axon
If you don't want to run XFCE in it's entirety - you could make your own X session, using something like this

Either way you'll probably want to make your app full screen using window.fullscreen()

 
S++


From: Stuart Axon <[hidden email]>
To: Pygtk mailinglist <[hidden email]>
Sent: Wednesday, August 7, 2013 9:40 AM
Subject: Re: [pygtk] Launching PyGTK app from a serial console

Hi Paul,
   You just need to set DISPLAY correctly.    You can check what it's set to in a terminal in XFCE:

$ echo $DISPLAY
:0

Then in the terminal your connected on the serial console, set it to the same thing;

$ export DISPLAY :0


Then test launching an any X app (I tested using gedit + it work).

 
S++

Date: Mon, 5 Aug 2013 22:25:28 -0700
From: "Paul D. DeRocco" <[hidden email]>
To: "PyGTK List" <[hidden email]>
Subject: [pygtk] Launching PyGTK app from a serial console
Message-ID: <[hidden email]>
Content-Type: text/plain;    charset="us-ascii"

I've put pygtk onto a Gumstix Overo board, which uses the XFCE desktop
manager (GTK-based). At the moment, I'm using a Tobi expansion board and a
full-sized monitor, but eventually I want to switch to a Chestnut43 board
with a 4.3" LCD.

At present, I can successfully launch a graphical Python app from a terminal
window on the screen, but on a tiny LCD I want the app to fill the screen,
so I want to launch from something else. If I try launching the Python app
from a serial console, it barfs because it doesn't know what to display it
on.

Can anyone explain to me how PyGTK finds the windowing system so that it can
create its window? Is it something in the environment? I don't see any
likely candidate. Eventually, I may want to use an X server on another
machine to run a development console, in which case I'll still want my PyGTK
app to use the small LCD instead of putting itself up on my X server. But
for now, is there some way I can run Python from a serial console and have
it put up a PyGTK window on the only display?

--

Ciao,              Paul D. DeRocco
Paul                mailto:[hidden email]




------------------------------

_______________________________________________
pygtk mailing list [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


End of pygtk Digest, Vol 126, Issue 3
*************************************





_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: Launching PyGTK app from a serial console

Paul D. DeRocco
> From: Stuart Axon
>
> If you don't want to run XFCE in it's entirety - you could
> make your own X session, using something like this
> https://wiki.ubuntu.com/CustomXSession
>
> Either way you'll probably want to make your app full screen
> using window.fullscreen()

Thanks for the link. I'll see what I can come up with.

--

Ciao,               Paul D. DeRocco
Paul                mailto:[hidden email]

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/