LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-22-2011, 04:22 PM   #1
Thomaz
LQ Newbie
 
Registered: Jul 2010
Posts: 7

Rep: Reputation: 0
[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.
 
Old 04-22-2011, 06:38 PM   #2
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 209

Rep: Reputation: 66
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`
 
  


Reply

Tags
interactive, linux, script, startup, tty


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu How to run Python script on Login? warnetgm Linux - General 14 03-13-2012 07:11 PM
Running /sbin/rc from non-interactive script? marco1475 Linux - Software 1 06-23-2009 05:43 PM
BASH - How to open an interactive script from a non interactive script..... OldGaf Programming 4 06-29-2008 05:34 PM
Running script (probably python) Bob Jones Linux - Software 1 09-29-2007 02:20 AM
python script to automatically login to yahoo pankaj99 Programming 1 09-17-2006 11:15 PM


All times are GMT -5. The time now is 06:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration