graphical program without a windowmanager.. is it possible?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
graphical program without a windowmanager.. is it possible?
Hi everyone,
Right now I'm trying to write a simple client GUI for a cheap, small footprint, computer. I want to run a simple graphical user interface for data entry (think something like those auto-checkout terminals at the grocery store). I want to leave off the GNOME/KDE for the obvious memory freeup, as well as the decresed likelihood of the computer being successfully hacked/broken by the general public if the program itself crashes to a prompt instead of a GUI.
I've heard that any program can invoke X and run a GUI if it has its own .xinitrc file, but I haven't had much luck finding info on that. Is there any traction with the .xinitrc stuff? Also, how would I be able to program widgets into the interface if there is no KDE library? I've never done graphical programming before, so I please explain stuff so that I can understand, since I'm coming from square one.
Yes, you can run X without a window manager: remove ~/.xinitrc and run 'xinit' frm a console and you should get a black screen with a white xterm in the top left corner. From that xterm you can run whatever you want. If you like, you can put whatever you want to run when X starts into the ~/.xinitrc file (for example, I use Fluxbox as my window manager, so I have 'exec fluxbox' in my .xinitrc, but I could just as easily have put 'exec firefox' in there). Run 'startx', and when the .xinitrc 'script' exits, X also exits. It should be fairly trivial for a script to alter the .xinitrc file and call startx to get a single program X session.
As long as the libraries are installed (QT, GTK etc) you can use their widgets - KDE or GNOME don't have to be running. If you don't even want the libraries installed, I believe it's possible to statically link GTK or QT, but that will increase memory requirements if you have more than one program which uses each library running. I can't think of any reason you would actually want to do this, though.
yes i think x will run as long as any child program is running and it doesn't have to be a window manager
i think with xinit as ilikejam has said he is seeing the default x window manager and not an absence of a window manager altogether.
one of the hurdles to get over without a window manager is getting focus for input
it is possible to do this programmatically with Qt -- not sure about gtk+
i wonder about the usability of just any program run without a window manager and not designed specifically to do so.. i imagine very few programs out of the box will work this way
you might want to read these: http://www.linux.com/howtos/Kiosk-HOWTO-1.shtml http://kiosk.mozdev.org/
it may not be necesarry to not use a window manager but rather use a simple one and have it be locked so it will only do what you want
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.