I'm designing an app that will be deployed/installed to a linux machine (perhaps Archlinux, but could be any distro and in fact I would actually prefer something lightweight and inside the Debian family if at all possible). This machine will not be a "general purpose" or multiple application machine: it's sole purpose is to run my app at startup and close my app at shutdown. No other end-user apps would be installed on this machine.

I'm looking for a way to:

  • When the user powers on the machine, instead of the normal Ubuntu/OS startup --> BIOS --> splash screen --> login process, they just see a splash screen for my app (while the system and app boots up) and then my app loads with its own look and feel
  • While using the machine, they cannot access any other apps, shells or other part of the operating system; all they have access to is my app
  • When running, the app takes up the entire screen and its window cannot be minimized or resized
  • The app (as software) cannot be turned off or killed while running, except...
  • Turning off the machine (physically powering it down) shuts down the app gracefully and shuts down the underlying OS as well

Hence, the end user never knows that the machine is running on top of linux; to them, the app is the only thing "living" on the machine.

This has to be possible seeing that Android is just a wrapper around Linux, and there are thousands of other devices that just run a single app and nothing more.

This will likely be a C binary that launches a Java desktop application as the actual app.

Any ideas as to how I can accomplish the items mentioned above?

  • This approach is doable, but not using Debian. Consider researching LFS – eyoung100 May 14 '14 at 14:50
  • 2
    This is actually much, much easier to accomplish on Arch, LFS, Slackware or Gentoo. You'll spend more time removing unwanted things from other distros than you will setting up any of these. (I'd recommend Arch as it will give you the biggest head-start, but I'm also rather biased). With a cleverly written xinitrc and autologin setup (along with Plymouth, or something similar), this should be very simple to accomplish. – HalosGhost May 14 '14 at 14:54
  • Thanks @HalosGhost (+1) - I like the idea of both Arch and LFS, and will probably go in the direction of Arch. Beyond xinitrc and autologin, are there any other considerations that I'm not seeing here? Any general advice? Any chance I could get you to leave an answer with a generalized (high level) step-by-step approach to how you would go about doing this? Thanks again! – zharvey May 14 '14 at 15:12
  • I posted an answer which is fairly general, but should offer some helpful links and strategy for your setup. – HalosGhost May 14 '14 at 16:24

I would strongly recommend Archlinux for this task. It manages to strike the delicate balance between installing very few "end-user" applications by default and still leaving a sensible system upon which you can build.

As for steps to take to accomplish your goal, after you have Arch installed, fine-tune what services you want to run at startup (off the top of my head, it sounds like you might want less ttys). After that, install and configure X (that link also has a link to starting X at login, which you will want). If you want a splash screen on-boot, you'll need to setup something like Plymouth. And, finally, systemd tends to handle physical shutdowns (pressing a power button on consumer hardware a single time, for example) pretty gracefully. However, it may be worth considering adding a shutdown function to the app you'll be running.

Your $HOME/.xinitrc might be very basic if you do not need a lot of functionality. E.g.:

exec /path/to/your/program/here

Not the answer you're looking for? Browse other questions tagged or ask your own question.