LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 12-15-2004, 09:15 AM   #1
shishimo
Member
 
Registered: Jun 2003
Distribution: Fedora Core 3, so tasty
Posts: 62

Rep: Reputation: 15
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.

Thanks a lot!
 
Old 12-15-2004, 09:54 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

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.

Dave
 
Old 12-15-2004, 11:29 AM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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
 
Old 12-16-2004, 09:03 AM   #4
shishimo
Member
 
Registered: Jun 2003
Distribution: Fedora Core 3, so tasty
Posts: 62

Original Poster
Rep: Reputation: 15
Thanks! I'll give all of this a shot, sounds like some really good stuff
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
developing graphical program using kdevelop shyam_d_sundar Programming 2 04-28-2005 11:39 AM
linux graphical chess program glock19 Linux - General 7 02-28-2005 11:13 AM
Which graphical program for downloading video and such? phreud_ Linux - Software 2 11-15-2004 08:50 PM
graphical sftp program? bruno buys Linux - Software 1 11-08-2004 05:54 PM
programming graphical program tearinox Programming 6 01-10-2004 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration