I am running a program on a public computer and I want to avoid that other people may shut down it.
I do have the root password.
How to skip the shutdown using some commands?
I have zero idea of this. But there must be a way of doing this.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
@duenni provided a valid answer, you can easily roll your own implementation because basically you need these things:
Tweak X Window server settings to stop responding to the Ctrl+Alt+Backspace combo which shuts that server down. I think recent versions of X.Org come with this key combo disabled anyway.
Inhibit handling of the Ctrl+Alt+Del combo.
This depends on which
init "superprocess" is installed.
With the clasic
/sbin/init from the
sysvinit package this is configured in the
/etc/inittab configuration file.
systemd, which is the default init system in Debian 8 "Jessie", this should supposedly be done by issuing the
# systemctl mask ctrl-alt-delete.target
Disable all "virtual terminals" except the one which is running the X server.
Typically a GNU/Linux system has a bunch (usually 1-4) VTs configured for "textual" logins, and then starts an X server on another VT (usually 7). The user is able to switch between them using the Ctrl+Alt+F<n> combos.
In "the kiosk mode" it makes sense to only have a single VT active and run the X server on it.
Disabling VTs is, again, depends on the
init system — tweaking
/etc/inittab for the
sysvinit and messing with appropriate
.target files for
Run a specialized Window Manager (WM) which runs with the credentials of the specified user on your X server.
Typically, a special piece of software called "Desktop Manager" (DM) is run on the X server. The task of that piece of software is to have a user provide their credentials and then start an "X session" configured for that system (or system-wide) — their preferred Window Manager (WM) or desktop environment (such as KDE, GNOME, XFCE etc).
There exists different implementations of DMs:
slime — to name a few.
An alternative approach, ideally suitable for the "kiosk mode" is to directly run some piece of software on the X server — as if a user has logged in. Debian has such special DM, called
nodm packaged. It's configured to run with the credentials of the specified user, run the specified software (such as a web browser or some dashboard etc) and restart itself if that program exists for some reason. That is, it's in "always on" mode.
if you are about running a browser on your box,
chromium might be a good pick as it provides special configuration knobs to run it in "kiosk mode": mdash see this for one example.
I'm sure this can get your going.
Googling is also your friend as these solutions are already implemented and documented by lots of folks.
What you're looking for is called
There are various methods for achieving this. This also depends on your windowmanager, for example XFCE has a build-in kiosk-mode.