Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

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).

I realize this is an old question, but I use openbox on my system, I have created a custom config file that disables all mouse keyboard shortcuts, and removes borders etc on the applications. In the openbox config i even created some secret shortcuts that can run fx. an xterm for debugging live on the box.

The openbox documentation was very helpful in figuring everything out, I did the config in about 30 minutes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top