Comment by π hack-wizard
Re: "I'd like to set up my non-GUI Debian 12 system so that itβ¦"
@mbays @freezr I've considered that, but... Switching windows in tmux involves a lot more keypresses - ctrl+b p/n for instance, it feels so inelegant versus alt+arrow to swap between TTYs. That said, I see where you're coming from, as I'd need to log into each TTY and I suspect having multiple shell instances and logins would potentially have resource and security implications. I'm expecting usually using 3-4 of them regularly, maybe 5-6 at most. Given this is on a uConsole with a Raspberry Pi 4 Compute module with 4GB ram, do you really think tmux would be less resource intensive for this scenario? Or is there another factor I'm not aware of?
2025-05-08 Β· 1 year ago
5 Later Comments β
π hack-wizard [OP] Β· 2025-05-09 at 01:08:
Actually I just figured it out, added this to my .bashrc
π» Nexy Β· 2025-05-09 at 01:35:
@hack-wizard I always play changing things in the .bashrc.
the thing i do its change the prompt text to have nicer colors, I make some alias permanent there and I make it open neofetch automatically when I open the terminal.
You can do a program you like and just at the end of the .bashrc put "./warever.sh" and that thing will open automatically when you start the PC for example.
π§οΈ candycanearter [βοΈ] Β· 2025-05-09 at 03:41:
the part in the article about setting up a agetty systemd dropin file to autologin with specific arguments
π Ashnar Β· 2025-05-10 at 13:05:
Going to try something like that too now. Looks interesting.
π norayr Β· 2025-05-13 at 20:33:
if you didn't have tty variable, you could do 'w' and see which tty 'w' ran from.
Original Post
I'd like to set up my non-GUI Debian 12 system so that it automatically launches a specific program in each TTY I log into. Eg: htop on TTY1, mc on TTY2, etc, but I'm not sure exactly what to set up and where. Any advice would be very appreciated.