Linuxlore

Probably more than just Linux

  • Home
  • About

Auto naming terminal tabs

Author: Paul Tansom

avatar

I use Ubuntu on the whole for my desktops and servers and the more recent versions have Byobu which customises Screen rather nicely. I am still running 8.04 LTS on one server at the moment which is too old to have Byobu in the standard repositories (yes it is on my todo list to upgrade!), but one of the most useful features is quite easy to implement without Byobu.

When I have multiple terminal tabs open with various local and remote (via SSH) command lines running it is nice to know which is which. Byobu thoughtfully changes the title as you log in, but Screen does not (I have both configured to automatically launch when I log in). One line added to my .bash_profile does the trick though:


printf "\033]0;${USER}@$(hostname) - screen\007"
screen -xRR

The first printf line is the one that does the trick and tells me who I’ve logged in as and to what machine, as well as reminding me I’m in Screen. The second screen line simply starts Screen if it is not already running, or connects to the existing instance if it is.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

This entry was posted on Monday, September 12th, 2011 at 11:01 am and is filed under Computers, Linux, Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

  • Categories

    • Computers (38)
      • Linux (14)
        • Ubuntu (6)
      • Microsoft (13)
        • Windows (12)
          • Windows 7 (3)
      • Retro (3)
      • Web (8)
    • Family (1)
    • General (9)
    • Sailing (4)
    • Theatre (1)
  • What I'm Doing...

    • ...and there's another #watercoolermoment spent on the phone! 2 days ago
    • Typical, sit down for a cuppa & the phone goes & doorbell rings; now I have a cold cup of tea, lucky I drink green! #watercoolermoment 2 days ago
    • Debian image downloaded, all I need is a @Raspberry_Pi to go with it! Can I get ahead in the queue because I have 2 kids to use it with? ;) 5 days ago
    • More updates...
  • Tags

    ADSL Amiga Amstrad Arnor Atom Blosxom Commodore CPC Debian dual screen Firefox HantsLUG HP HTML Inland Revenue Langstone Linux mail monitor office OpenOffice OS/2 Planet printers process Protext reorganisation Retro Rombo RSS sail sci-fi seal Sinclair Spectrum time management Tudor Ubuntu USB Vista wiki Windows wireless XP ZX81
  • Categories

  • Links

    • /aptanet/
    • PLSA
    • Sailsite Forums
    • Son's site – Aaron
    • Son's site – Scott
    • Tudor SC
    • Wild Langstone
Avatars by Sterling Adventures

Copyright © 2012 - Linuxlore | Entries (RSS) | Comments (RSS)

WordPress theme designed by web design