How to execute a command under Linux after booting without a TTY session?

2

1

I'm creating a kiosk PC at the moment and I'm wondering if this is possible:

When the PC is started and Linux Debian boots and I wonder if it's possible to start the command startx respectively xinit /home/kiosk/.xinitrc -- /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.2FksDI7OqU without starting a TTY session.

Background is, I don't want people to be able to get a shell via CTRL + ALT + F1-F6.

I know I could disable them via /etc/inittab but then I can't start my X session.

Any suggestions?

JohnnyFromBF

Posted 2013-01-31T16:10:41.020

Reputation: 4 298

1

There are kiosk-style distributions (or configurations) around, perhaps the quite old) http://www.linuxdoc.org/HOWTO/Kiosk-HOWTO.html is of help. Or search for others.

– vonbrand – 2013-01-31T19:07:22.333

Answers

2

you can modify your ServerFlags section in xorg.conf without the need to fiddle with inittab:

Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection

sparkie

Posted 2013-01-31T16:10:41.020

Reputation: 2 110

0

I don't have a system which runs inittab anymore, but I believe it would simply be a matter of removing the shells for the runlevel which runs X (ie remove 5 from the entries in inittab)

This could work because in order to boot X, many systems switch the runlevel to 5. Of-course, it does assume your system handles runlevels a particular way. (And, indeed, another part of the solution may be to tell init to launch to runlevel 5 rather then an runlevel 2/3 depending on the distro )

davidgo

Posted 2013-01-31T16:10:41.020

Reputation: 49 152