LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   [Help] Running an interactive (python) script in tty1 before login (https://www.linuxquestions.org/questions/linux-software-2/%5Bhelp%5D-running-an-interactive-python-script-in-tty1-before-login-876562/)

Thomaz 04-22-2011 03:22 PM

[Help] Running an interactive (python) script in tty1 before login
 
Hello everyone,

I would like to run an interactive python script in tty1 on startup. This script requires user input outputs relevant data.
I also need this script to be run as root as it accesses USB devices (and has to detach kernel drivers).

It is an infinite-loop script, so I also want to be able to ctrl+alt+F to tty2 to actually login if needed.

If that's relevant, I'm using Ubuntu 10.04.
(I heard it is as it does not use inittabs)

Thanks in advance.

jthill 04-22-2011 05:38 PM

Ubuntu uses upstart. Google upstart inittab. You can run any program in lieu of getty or agetty or whatever it spawns on open ttys. If you want to pop a new console on the fly you can run `openvt /sbin/getty 57600 - linux`


All times are GMT -5. The time now is 11:23 AM.