views:

114

answers:

4

I am developing an application that will run on Linux to run fullscreen all the time (no menus or trays or anything will be visible).

The application is going to be developed in Python, not that that matters as far as the window manager, but what I am having a hard time with is choosing a window manager.

I need something with the smallest possible footprint, that will let me run a graphical Python app and have an mplayer window at the same time, at widescreen resolutions (widescreen, 16:10,16:9, etc). Other than that, it doesn't need a lot of features, but the end footprint size is the most important thing I'll be looking at.

What window manager would you recommend?

EDIT: There won't be any interaction with the application needed.

A: 

You probably meant window manager. Display manages are KDM, GDM and the like. Windoe managers, to name, GNOME, Xfce, KDE, ratpoison, fvwm, twm, blackbox are a few. ratpoison gives full screen to the application that is in the foreground but demands heavy keyboard interaction (hence the name ratpoison) and no mouse interaction at all.

vpit3833
I'll look into ratpoison. I forgot to mention there won't be any interaction with this application.
Matt
It looks like ratpoison is for terminal apps only. We need to run mplayer with 720p+ video and perhaps some hardware accelerated graphics inside this.
Matt
If you are asking if MPlayer works under ratpoison, it works. I haven't used ratpoison in recent months, but I have run MPlayer, XPdf, Firefox under ratpoison. The interaction I meant was with the window manager. Since you said there will be a Python app and an MPlayer window, I thought you might switch between the two. http://xwinman.org/others.php has a list some lightweight window managers. Have a look there as well. I liked ratpoison because I did not have to touch the mouse at all.
vpit3833
Just to clarify, GNOME, KDE, and Xfce are not window managers, but rather [desktop environments](http://en.wikipedia.org/wiki/Desktop_environment)
Daenyth
+1  A: 

You don't actually need any window manager or display manager. All you need to do is open your initial window with the same geometry as the root window. I suppose you could even draw directly into the root window if you wanted.

If you are using some display library it probably has an easy way to open a full screen window. For example using a recent enough version of SDL through pygame you can do

pygame.display.init()
surface = pygame.display.set_mode((0,0),pygame.FULLSCREEN,0)

to get a window that fills the entire screen. This will work even if there is no window manager running.

As for mplayer, it accepts the -geometry flag, so you can use something like mplayer -geometry 640x480+20+20 to display the mplayer window 20 pixels from the top 20 pixels from the left and with a size of 640x480 pixels.

Geoff Reedy
It may be better if you could reparent the mplayer window into the python app. With no window manager, I'm not sure how you can guarantee that the mplayer window will display on top of the python window. If you dont reparent, at least be aware of these layering issues.
camh
A: 

I assume you'll be running both your python GUI and mplayer in some sort of geometries combination that shows both at the same time, filling the screen.

As commented, you should not need a window manager to achieve that. You could have your python GUI app get command-line parameters for setting its window geometry and also call fullscreen mplayer with the -geometry parameter. That should fill the screen as expected, without any window decorations.

Now you could have the startx script called for the user running it all and have a custom ~/.xinitrc script doing something like:

#!/bin/sh

exec python my_gui_app --whatever-sets-geom &
exec mplayer -fs video.avi

If yout pyhon app will instead be launching mplayer then just leave the first 'exex' call (remove the '&') and have it call mplayer as desired with the expected dimensions in '-fs' mode.

Please note you may need to use something like the 'xset' program to disable monitor blanking due to energy savings, hide the cursor (although IIRC that's something mplayer does for its own window), and things like that.

Also, somethimes running, for example, GTK apps on a bare X display may end up using an "ugly" theme, so you may need to have the toolkit style configuration taken care of someway.

Miguel Garcia-Lopez
Haven't tested this, but I'm pretty sure you don't want to exec the first one as that will replace the startx process with python, meaning that mplayer will never get run.Please correct me if I'm wrong.
Daenyth
A: 

I am doing something similar on my "set-top box" and I don't use any window manager.

It boots debian, and from inittab I auto-login the user that runs the display. That user's .profile starts X, which runs .xinitrc, which starts my python app that runs as a network server in front of mplayer (running mplayer in -slave mode).

My python app does not have a GUI element - only mplayer runs on the X display. But in your case, it should be no different. As I mentioned in a comment to another answer, you may want to look into how you can reparent mplayer's window to give you greater control over its placement and/or movement/size.

Doing it this way avoided a display manager and a window manager. This simplifies the solution, boots faster and uses a smaller footprint (it runs of an SD card, with heaps of room to spare).

camh