VectorLinux
July 25, 2014, 04:14:34 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: auto run applications on tty1 tty2 tty3 tty4  (Read 1599 times)
stevodude
Member
*
Posts: 2



« on: June 02, 2008, 04:48:26 am »

This is probably a silly question, but I have the following and want to do the following:

Network server running 4 musicpd daemons ( 4 zones, 4 sound cards)
Laptop running vector5.9lite (150Mhz, 196mb ram, 8gb hdd, wireless) and ncmpc client.

now I can boot the laptop and logon manually
  tty1 with user1 and run ncmpc -c -h 10.0.0.5 -p 6601 (in a shell script called mp1. )
  tty2 with user1 and run ncmpc -p 6602 ( mp2. )
  tty3 with user1 and run ncmpc -p6 603 ( mp3. )
  tty4 with user1 and run ncmpc -p 6604 etc

so all I need to do is ctrl/alt F1,F2,F3 or F4 to select my 'audio zone'.

now what I want to do is when I turn  on the laptop to automagically boot and login the 4 terminals and run the 4 seperate mpx scripts matching the numbers to terminals.

I hope I am making myself clear.

can I do this?

current I think I can autologon tty1 with editing /etc/inittab and adding autologin like so:

1:2345:respawn:/sbin/mingetty --autologin clarksws tty1

can I do this for 2:2345 - 4:2345?

and can I call a ~/.bashrc to check what tty is running then run the correct mpx script?

or is it easier to create 4 users and a seperate bashrc for each user?

thanks for looking, and I've been using VL for a few years now on and off, and so far it just gets better & better.
« Last Edit: June 02, 2008, 04:52:08 am by stevodude » Logged
stevodude
Member
*
Posts: 2



« Reply #1 on: June 03, 2008, 02:28:53 am »

I have it working now... almost...

4 users names mp1 - mp4 autologin terminal's tty1 - tty4 running ncmpc connecting to mpd server daemons 1 - 4.

Only tty4 does not login, but tty1-3 work perfectly.

so anyone can turn on the laptop ctrl/alt/f1 - f4 to play list for any 'zone' in the house :-).

if anyone want's details i'll post tomorrow.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!