VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: auto run applications on tty1 tty2 tty3 tty4  (Read 2093 times)

stevodude

  • Member
  • *
  • Posts: 2
auto run applications on tty1 tty2 tty3 tty4
« on: June 02, 2008, 05: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, 05:52:08 am by stevodude »
Logged

stevodude

  • Member
  • *
  • Posts: 2
Re: auto run applications on tty1 tty2 tty3 tty4
« Reply #1 on: June 03, 2008, 03: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