lainchan / λ

single purpose operating system

roll · 2024-02-04 13:43
i have an idea for a project and i'd like some help and ideas on how to accomplish it. my idea is having a single purpose operating system, that is, an operating system that lets the user run one and only one program. it's irrelevant what that program is, what's relevant is that the user shouldnt have access to anything else, as opposed to a "normal" OS where the user can open, say, the terminal, a text editor or a web browser and do whatever he likes. i assume this is already a solved problem. i remember, for example, that when i did my driving license exam years ago they made us use some computers that were running a Java application to respond to the questinos and whatnot. there was no way to exit this application. obviously i wouldnt program an OS from scratch, i would use Linux or something else as the foundation for this, but I'd like to know how can i turn it into a "closed" system if that makes sense.
vector · 2024-02-04 14:56
>>38260 They don't use a special OS, they just trap you in the program, I feel like the easiest way is just to modify suckless tabbed and strip away everything until it's just a host for a single window. You would also want a shell script to run it on launch and shutdown the pc if it closes.
pop · 2024-02-04 15:04
There are two universally accepted approaches to your problem - The easy, standard way: Use some standard kernel like Linux and build a minimal OS around it (for instance, using Yocto or Buildroot). If you intend to run a GUI, then figure out how to run your software in some kiosk mode WM/DE - The very hard way: Use unikernels. You can build an entire OS stripped to the bare minimum, designed from scratch for the sole purpose of running your desired application. It's usually a total overkill, but if your target hardware is resource constrained... it might be worth the effort
Church · 2024-02-04 16:03
This is probably what you're thinking of right https://en.wikipedia.org/wiki/Kiosk_software
Ein · 2024-02-05 00:49
>>38260 You could just run any linux distro with auto login turned on for the only user account you set up. Have it open up the one program you want to use using startx and xinit on log in, and only have the bare minimum amount of packages required to run that one program installed. When you exit the program you can just have a script that shuts down the computer.
push · 2024-02-05 10:48
So you want to re-invent DOS before preemptive multitasking?
Pris · 2024-02-05 22:33
>>38260 bastion host. example: kernel + init + txt-mode prog on cd-r. obv need x or wayland for graphics. sky's the limit
Rick Deckard · 2024-02-06 01:24
>>38263 >The very hard way: Use unikernels There are some "frameworks" for creating unikernels, e.g. MirageOS: https://mirage.io/. Not sure how much it simplifies.
Marly Krushkhova · 2024-05-03 23:29
>>38260 I am sure other Unix systems have this, I know that OpenBSD has user classes which let you configure limitations for types of users, including a limit to the amount of processes a user can run. You could couple this with a chroot environment to ensure a user could only execute what you have given them. Principle of least privilege through and through, and I'm sure you'd achieve whatever it is you've set out to do.
Sorry · 2024-05-04 06:16
That is called an "emacs" forcing posts to be longer doesn't mean they will be better for it
Emmanuel · 2024-05-04 11:16
>>39022 It stops the random string of characters that were getting spammed, anon. Also, saying "emacs" isn't a particularly great post. Also, it's incorrect because emacs supports both multiple windows where you can run multiple programs at once, as well as running background programs. So, not only was your commentary retarded and incorrect, but your sentiment was wrong as well.
Colmerauer · 2024-05-04 11:34
>>39029 I understand you are autistic and do not understand irony, but in defense of emacs, one could have a "handicapped" emacs that doesn't have the ability to run any external program.