Automatically change profile based on context

Bug #623420 reported by deactivated account
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Terminator
Confirmed
Wishlist
Unassigned

Bug Description

Something for the wishlist -

Example:
  When I log into a "live" machine, I switch my terminator profile to one which has red text, and a slightly different background colour. This reminds me that it is a live machine and prevents me from testing code as if it were my local machine.

Desired Functionality:
  There should be a way to change profiles automatically, either on running of commands like "su" or "ssh", or by the content of last printed line (e.g. mo@mymachine is default profile, but if the line starts with mo@arghlive it should be live profile).

Chris Jones (cmsj)
Changed in terminator:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
becatlibra (benjamin-brokenpoet) wrote :

I was looking into a way to script the profile changes as well. I was hoping to have the colors of the session adjusted by a cron job so that at night, I could use different ones. Considered using sed to mod the default profile so that new windows use a different profile however being able to script it to adjust live would be ideal.

Revision history for this message
Kejope (kejope) wrote :

Brainstorming:

Set environment variable:
export TERMINATOR_PROFILE=blahblah
terminator

or, to override that:
terminator --profile=blahblah

or, more generally, set environment variable and override parameter for loading a custom config file, instead of the default.

Revision history for this message
Chris Jones (cmsj) wrote :

However something like this works, it needs to be cross-platform. Poking around inside the environment of other processes is unlikely to work well. If anything we'd be better off signalling through terminal escape codes, but they are very limited in scope and availability.

Revision history for this message
Szymon Piszczek (szymon-piszczek) wrote :

Brainstorming:
IMHO it would be more safe to change colors via Your bash / other shell settings on the remote machine -- think what would happen if sometimes You might be forced to use other terminal emulator to ssh... Especially in emergency -- working from other computer than Your pretty workstation...

Some times ago (on uniwersity) I had one .bashrc file with colour of prompt defined in
case `hostname` in
...
esac

manner.

Revision history for this message
anthonyjschulte@gmail.com (anthonyjschulte) wrote :

Hi!

I'm from the future! (We still use terminator in the future)

I made this-- it isn't great, but it does what you want in about the simplest way possible.

https://github.com/GratefulTony/TerminatorHostWatch

It's probably not good for high-security applications since the profile applier is easily fooled.

 echo fooled@you:~; sleep 10

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.