You are not logged in.

#1 2022-05-04 15:21:45

CrispCasper
Member
Registered: 2021-07-28
Posts: 39

tty program selection

got another question about tty specifically how to get the tty's to automaticly start a program for example tty1 normal but tty2 htop and tty3 asciiquarium or something

Offline

#2 2022-05-04 15:34:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,667

Re: tty program selection

Recheck the link from your other thread, there's a reference to automatically starting X11…
Also please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#3 2022-05-04 15:43:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: tty program selection

The way I generally do it is to start a tmux session in my .bashrc, and then have a .tmux.conf that looks something like:

new-session -A -s main -n main ;
new-window "cd ~/fountain && ./main.py -qv -H fountain.lan"

For reference: that starts a small web server on a raspberry-pi zero-W that has the sole purpose of controlling the lights and pump on an ornamental fountain in my yard.
This way, I can connect to the console, and if need be, detach from it or create a new window to do something else without having to stop the program that is running.
This is not the easiest way, or the most obvious way.  But, it is how I do it.

The other thing you can do is to put checks into your ~.bashrc and or $/.profile to check which console on which the script is running and take action acordingly.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2022-05-04 18:08:52

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: tty program selection

Don't cross-post.

You already have an open topic about this issue which is easily answered by just reading the wiki.

Closing.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB