Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a need to start an application on bootup on the linux console and I do not have a need for any type of login or security. I do not need any ALT-F1,F2,etc virtual consoles but I would like to allow SSH access via the network port for debugging, loading, etc.

The application is a SDL graphics program running with fbcon as the SDL_VIDEODRIVER if that matters. I'm currently using Fedora 10 and 12 but any distro that supports SDL using the fbcon framebuffer would be acceptable.

share|improve this question

migrated from Apr 20 '10 at 4:39

This question came from our site for professional and enthusiast programmers.

The "classic" way to do this is to add an entry to /etc/inittab for the program. With upstart the way to do it has changed, but on F12 that file contains further instructions on how to find out how to do it.

share|improve this answer
Thanks, I'm familiar with inittab and upstart. The app starts ok when I create an upstart file and stick it in event.d however I still get system messages on the console and I see the login prompt for a few seconds before the app starts. I thought there would be a cleaner way. I guess the question should be how do I re-direct the console output somewhere else? I can probably find the answer to that. – amanda Apr 19 '10 at 19:04
Also... keyboard input is not getting to the application. – amanda Apr 19 '10 at 19:06
Sounds like the app isn't starting on the current VT. Try disabling the tty1 event and put your app on VT1 instead. – Ignacio Vazquez-Abrams Apr 19 '10 at 19:09
Not sure I did this right... I disabled the tty1 by commentating out the exec statement. That stopped the login from appearing, but I still have system messages writing over the application and no keys are getting to the app. Not sure what you meant by "put your app on VT1" – amanda Apr 19 '10 at 19:23
Unfortunately I don't know how to force SDL to use a specific VT. – Ignacio Vazquez-Abrams Apr 19 '10 at 19:41

Probably best for your application would be to use Arch Linux, which is very lightweight and by-default comes without any graphical interface. It still uses /etc/inittab, as mentioned by another answer, but you can also just write anything to be done on boot time into /etc/rc.local. The spawning of virtual consoles can also easily be deactivated.

Just a mention as you have the "embedded-linux" tag there and it sounds like you only need a minimum installation (in terms of running services).

share|improve this answer
I've looked at ArchLinux and I think it would be a good fit since I'm not using most of Fedora anyway. But for development it's much easier to deal with Fedora. Do you know if ArchLinux supports fbcon? – amanda Apr 19 '10 at 19:05
Why should it not support it? You can see default Arch Kernel config here: as you can see the relevant configs for the framebuffer console are set. I run my console in 1600x1200 but I do not use use specific fb applications. P.S.: If you want I can test sth for you at home, tell me a typical SDL app to run and I will give it a shot. – ypnos Apr 19 '10 at 20:16
I'm always leery when I switch distros about what the new one supports. The CONFIG defaults look promising and the fact that you can run at 1600x1200 sounds like it works. Oh wow... thanks for the offer to try to run a SDL app but it's more work to setup SDL than I would ask someone to go through. You would need to compile SDL and then the app... as far as I know there are no "canned" apps. Just knowing that your running your console with it makes me think it will be fine. Thanks! – amanda Apr 19 '10 at 20:42

You must log in to answer this question.