4

Every time I reboot my linux machine I have to set up 5 or 6 terminals and Im trying to find a way to do this automatically. Bind a script to a shortcut or on startup that starts several terminals (extra point if theyre tabbed) and have each terminal ssh to different servers.

Any idea on how to do this? Using Ubuntu.

1

4 Answers 4

1

You could just run gnome-terminal -x command

Alternatively, I have something like this setup with terminator. I documented the process.

This allows you to do some interesting things with terminals. (You can ignore the compiz voodoo, but it is very good for making multiple terminals and having them autostart certain things)

1

This sounds like a perfect job for a terminal multiplexer like tmux or screen.

Set up your .tmux.conf to start with however many windows open, running the specific applications that you require.

See my answer here for details on how to accomplish this in tmux:

https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened/5753059#5753059

0

System | Preferences | Startup Applications | Starttup Programs | Add

Name: SSH to $HOSTNAME
Command: gnome-terminal -e "ssh $HOST"

Add --tab to the command as desired.

0

I do it like this:

  1. position the terminals manually, use xwininfo to get the geometry parameters
  2. store the terminal commands along with -geometry in a file (urxvt -font terminus ...)
  3. use wmctrl -s to select the correct virtual desktop
  4. run the shell script with the terminal commands from ~/.xinitrc or bind it to a key

You must log in to answer this question.