2 of 2 simplified code example, fixed syntax

GNOME 3.14+ launch new gnome-terminal and set title

To the disappointment of many, tab/window title can't be set anymore with --title

I use bash. I have had a few aliases I have used to connect to remote servers with.

alias c:prod='gnome-terminal --hide-menubar --profile=Production \
--title="Production Server" -e "ssh <url>" &'

I found a workaround for GNOME 3.14+ to set title which works well in the command line once put in .bashrc

function set-title() {
  if [[ -z "$ORIG" ]]; then

However, this only seems to be effective if placed and called in the remote server's .bashrc i.e. I can only change the title after login.

It has no effect, whatsoever if I attempt to change the title of the new window before connecting:

alias c:prod='gnome-terminal --hide-menubar --profile=Production \
-e "bash -c \"source ~/.bashrc;set-title Production;ssh <url>\"" &'

Setting window title on the remote feels wrong, when the terminal is running on my box, and I cannot make it work on servers either where my user does not happen to have a home directory to put a .bashrc in.

Is there a forest I can't see for the trees?