Is it possible to create a GUI application, where user can interact with it, but cannot switch to any other program (terminal, desktop, etc). Example of such applications would be something running on a public kiosk, where you will like the user to be able to use your application, but not mess around with the computer in any other way.
If this is not entirely possible, how much "harder" it can be made for the user to switch the application, and cause any potential damage to the system ?
PS: I am ok with running the program under a separate user account, chroot, etc if need be.
You could start the X server without a window manager (or a specially configured lightweight one) running nothing but your application. This example will use xterm
, replace it with your application.
To do this, create the file ~/.xinitrc
and add something like this:
exec xterm
Now log in via TTY and enter the following comamnd:
startx
This should launch an X server with only xterm
running.
You can also disable switching to TTY by adding the following to your xorg.conf
:
Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
Playing along these lines will land you where you want to be.
If you need a window manager, OpenBox might be a good choice since it is extremely configurable (you can remove all standard keyboard shortcuts, such as ALT+F4, etc.)
To use OpenBox, install it with sudo apt-get install openbox
and put exec openbox-session
in your ~/.xinitrc
, then add your application to ~/.config/openbox/autostart
.
No comments:
Post a Comment