4

I use terminator as a terminal, zsh shell and oh my zsh, on both my laptop and my server, for what it's worth, I created an alias named vps to connect to my vps using ssh.

Currently terminator background color is black, could it be made lets say white when connected to vps, although it's pretty easy to tell when I'm connected to the vps and when I'm not, still it would be nice if such thing is possible.

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
Lynob
  • 6,775

1 Answers1

2

One method is to use different profiles for the Terminator windows - for example, you could have this as the profile at ~/.config/terminator/config:

 # This is a comment
 [global_config]
   focus = system

 [keybindings]
   full_screen = <Ctrl><Shift>F11

 [profiles]
   [[default]]
     font = Fixed 10
     background_color = "#000000" # A comment
     foreground_color = "#FFFFFF" # Note that hex colour values must be quoted
     scrollback_lines = '500' #More comment. Single quotes are valid too
     cursor_blink = True
   [[ssh]]
     font = Fixed 10
     background_color = "#0000BB" # A comment
     foreground_color = "#FFFFFF" # Note that hex colour values must be quoted
     scrollback_lines = '500' #More comment. Single quotes are valid too
     cursor_blink = True
     #exit_action = restart #Stops the terminal from closing after the command has been run

Then you could open the terminator window, selecting the profile with:

terminator -p ssh

You could also run the command directly with the -e option - e.g.

terminator -p ssh -e "ssh vps"

For this you may want to uncomment the exit_action = restart line, so the terminal does not exit immediately after the command is run.

For more on how to edit make/edit Terminator profiles, run man terminator_config - you can easily change the background colour by editing the background_color line - you will need to quote it.

Wilf
  • 30,732