Results 1 to 10 of 10

Thread: Terminal title after ssh

  1. #1
    Join Date
    May 2013
    Beans
    4

    Terminal title after ssh

    Hi guys,
    I am looking for a way to change the title of my tabs when i am SSHing into a different server.
    I have about 200 servers and i can have about 20 of those open at once.
    I was wondering if there was a simple way to automatically change the title of each tab as i ssh to a new server.
    ATM i am just right clicking and using the Set title.. option.

    Is there a way that i can automate this without editing the .bashrc on every server?

  2. #2
    Join Date
    Jul 2005
    Location
    England
    Beans
    13,532

    Re: Terminal title after ssh

    Are you sure it's not the .bashrc file in the client that needs editing, rather than every server.

    I do not know for certain, and am not using SSH at the moment, so I am just throwing this out as a possibility.
    DISTRO: Xubuntu 12.04-64bit --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo

  3. #3
    Join Date
    May 2013
    Beans
    4

    Re: Terminal title after ssh

    Well all the solutions i have found through Google are saying you will need to edit .bashrc on the remote server as it will run during initialisation of bash on connection and will run the command to change the title bar.

    I need something that will do it from the client side.

  4. #4
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Terminal title after ssh


  5. #5
    Join Date
    May 2013
    Beans
    4

    Re: Terminal title after ssh

    Thank, but no joy

    That script would work but it assumes that the remote server has bash install.
    I am remoting to FreeBSD servers and they done all have bash installed.

    Plus that script will over write any .bash_profiles you have setup

  6. #6
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Terminal title after ssh

    Then you should switch to Konsole or some other terminal emulator that allows dynamic titles. I don't think it's possible to achieve what you want using Gnome Terminal.

  7. #7
    Join Date
    May 2013
    Beans
    4

    Re: Terminal title after ssh

    Isn't Konsole for the KDE environment though?
    Isn't there one for Gnome?

  8. #8
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Terminal title after ssh

    You can use Konsole on Gnome. I much prefer it to the default terminal that comes with Gnome.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  9. #9
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Terminal title after ssh

    Installing Konsole will pull a lot of dependencies but you won't have to change your DE session.

  10. #10
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Terminal title after ssh

    You could enable byobu on each server. Then each time you login, you will be taken to a custom screen session with all running tasks waiting for you. By default, byobu displays the login info in the terminal title: user@host (ip.address) - byobu
    Code:
    byobu-enable
    Cheers!
    capture.png
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •