[TAG] Dedicated Linux application
Thomas Adam
thomas_adam16 at yahoo.com
Mon Mar 8 04:35:38 MSK 2004
--- Jon Aldrich <jonald at ionet.net> wrote:
> I am in the process of developing a linux app (for gaming). I want the
> final product to reside on a linux box that, after booting,
> automatically
> runs the application. What is the preferred method for doing this?
You don't even say whether it is a graphical or console (text) based game.
> 1) An 'auto login' for a special user on one of the system consoles,
> who's
> user profile starts the application.
You could add something like this to the user's ~/.bashrc
```
[ $(tail -n2 ~/.xsession) = "the_name_of_my_game" ] && {
startx &
}
'''
which says that if the penultimate line starts with your game program name
then launch X, otherwise don't bother. Why the penultimate line? Because
the last line in ~/.xsession is ALWAYS an "exec call" to your window
manager.
> 2) Start the app with an inittab entry.
No. Doing this is deprecated and will cause all kinds of weird errors.
What happens say, if X crashes? Each time X tries to start (based on the
run-level X starts in) the game will also try to load, and so you get a
feedback loop. In the case od Debian, X is started throughout runlevels
2-5.
> 3) Something else?
I would just have it launched from within the user's ~/.xsession file (see
above).
> The app will produce graphics output and get user input, so it can't run
> as
> just a backgroud type daemon. It will run on a secure, dedicated network
The user will have to launch it though.
> Is there an info source or HOWTO for this sort of "bringing to market,
> implementation" kind of topic?
Not that I know of.
> One other small question. Is it possible to display a flash screen of
> some
> sort during the boot sequence and pipe the boot data to the bit bucket?
> Sort of a "boot -quiet" option.
You as a programmer ought to know that one! Again, unless we know what
language you have implemented it in, how can we help you?
-- Thomas Adam
=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor" -- http://linuxgazette.net
"<shrug> We'll just save up your sins, Thomas, and punish
you for all of them at once when you get better. The
experience will probably kill you. :)"
-- Benjamin A. Okopnik (Linux Gazette Technical Editor)
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
More information about the TAG
mailing list