Would there be a significant performance benefit to running a Python GUI without X Windows via this method? http://www.karoltomala.com/blog/?p=679
That plus a pyGame GUI toolkit like PGU seems like a great way to start in your own custom GUI environment without a bunch of X overhead. For example, it would be nice to be able to boot into something optimized for launching your (similarly custom-GUI'd) programs with limited input, like a small touchscreen or a TV/WiiMote combo, or boot a Pi directly into something intended to be standalone like a software synth, surveillance system, information kiosk, etc. But, I'm pretty newbish to most programming outside of web development, so I'm not sure what's realistic there.
Python GUI without running startx?
14 posts
- Posts: 4
- Joined: Thu Jun 07, 2012 5:05 am
Well if you have a Pi to play with why not give it a try and let us all know 
Texy
Texy
"!.8inch TFT LCD + Switch Shield v2" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=43286
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=43286
50p goes to the Foundation
- Moderator
- Posts: 1418
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England
Still waiting on it to arrive! It's shipped, though.
- Posts: 4
- Joined: Thu Jun 07, 2012 5:05 am
It depends on what your Python program was doing, but I don't think you would notice any performance boost by running it without LXDE in the background.
- Posts: 302
- Joined: Tue Jan 10, 2012 12:59 pm
Even without the overhead issue, LXDE has a lot of fiddly bits that you don't want to be bother with for a game or a kiosk.
If you didn't want to write the windowing system from scratch, then you could ditch LXDE and use the X window system without a desktop/window manager. It would be rather sparse and your Python program would have to do more work keeping track of the windows, but certainly less so than if you did the whole thing in Python.
If you didn't want to write the windowing system from scratch, then you could ditch LXDE and use the X window system without a desktop/window manager. It would be rather sparse and your Python program would have to do more work keeping track of the windows, but certainly less so than if you did the whole thing in Python.
Sounds like an interesting proposal though, I'd be interested to see how this goes.
- Posts: 5
- Joined: Mon Jul 23, 2012 10:30 pm
don used gui withouyt X. be cause you drink poison when try to wroute hooks method from keys on clear python..
No Fate!
- Posts: 37
- Joined: Tue Jul 17, 2012 1:09 pm
- Location: Ukraine
Hi
If you want to embark on the non X GUI then I think it's worth having a read of this review of pygame based GUIs. It might give you some ideas. http://www.pygame.org/wiki/gui
Cheers
Tim
If you want to embark on the non X GUI then I think it's worth having a read of this review of pygame based GUIs. It might give you some ideas. http://www.pygame.org/wiki/gui
Cheers
Tim
- Posts: 79
- Joined: Sat Nov 05, 2011 11:31 pm
You do get a proformance boost and more importantly you get to set the display mode
(under X window whatever mode you chose i.e 256 colours gets converted to whatever x window is running which results in more overhead again)
But if proformance is what your after why not use the SDL libary with C++
I'm learning in python and enjoying myself but when i've done a couple of games i'm going to be switching to C++.
(under X window whatever mode you chose i.e 256 colours gets converted to whatever x window is running which results in more overhead again)
But if proformance is what your after why not use the SDL libary with C++
I'm learning in python and enjoying myself but when i've done a couple of games i'm going to be switching to C++.
- Posts: 48
- Joined: Wed May 16, 2012 12:14 pm
This can help:
https://benosteen.wordpress.com/2012/04 ... x-windows/
It is posible a web-browser with out x window, with webkit.
https://benosteen.wordpress.com/2012/04 ... x-windows/
It is posible a web-browser with out x window, with webkit.
- Posts: 3
- Joined: Thu Oct 25, 2012 12:44 pm
I am also very interested to know how you get on as this is exactly what i am looking to do..
I have got auto login pass through to LXDE but want to just have the x-server run and the initial python script start..
I've had a couple of replies to a similar thread i started a while ago but have been concentrating on my wxpython wrapper for the omx player and have not tried any of the suggestions yet..
viewtopic.php?f=27&t=17893&p=181114#p181114
Good to know i'm not alone at trying to achieve this..
Cheers
I have got auto login pass through to LXDE but want to just have the x-server run and the initial python script start..
I've had a couple of replies to a similar thread i started a while ago but have been concentrating on my wxpython wrapper for the omx player and have not tried any of the suggestions yet..
viewtopic.php?f=27&t=17893&p=181114#p181114
Good to know i'm not alone at trying to achieve this..
Cheers
- Posts: 3
- Joined: Thu Oct 25, 2012 12:44 pm
Good news: First Raspberry PI (directfb) binaries for Raspbian --> http://directfb.org/index.php?path=Main%2FNews&entry=2012-10-07-0.dok
- Posts: 1
- Joined: Tue Nov 06, 2012 2:41 pm
SDL supports non-X11 use, so it should be possible to configure pygame to launch fullscreen without using X.
Edit - try this python code:
import os
os.environ['SDL_VIDEODRIVER']="fbcon" # could be "directfb", try "aalib" for extra fun
#pygame code goes below
Edit - try this python code:
import os
os.environ['SDL_VIDEODRIVER']="fbcon" # could be "directfb", try "aalib" for extra fun
#pygame code goes below
- Posts: 20
- Joined: Sun May 13, 2012 1:19 pm