Too many open shells

As an old gentoo user, installing a new machine isn’t really a thing to worry about.

But as I am using many ssh sessions at once the problem is set up. What host am I using right now? A solution would be naming the konsole sessions (assumed you are using KDE)

Konsole rename

But as a console warrior denying X?

A solution would be modifying the bash prompt: export PS1=”(chroot) $PS1″ – you can replace ‘(chroot)’ with everything that fits your needs.

Prompt

Author:

6 thoughts on “Too many open shells”

  • How about screen?
    The install-cds all have screen installed – so you could just ssh once, start your screen and run the shells in your screen-session.

  • I’ve rebooted the wrong machine lots of times because of this. My solution:

    export PS1=’\[33[01;37m\][\u@33[35m\h\[33[01;37m\]] \[33[01;32m\]\w \n\[33[01;34m\]$ \[33[00m\]’

    Then I change the color (in this case purple) for every machine. Works great.

  • Great idea :) In addition you could hack the shutdown-script to ask for a confirmation if you are logged in via SSH…

  • I don’t know if the following stuff is of any use .. but here it is anyway :)

    I’m running the screen on my workstation and ssh out to the servers. That got a little confusing, so I hacked around in my .bashrc and wrote this setup:

    Everytime I ssh out to a box, the box changes the name of the screen-tab to $REMOTE_USER@$REMOTE_HOST .. and after I close the session, the tab is renamed to $LOCAL_USER.

    HTH

Leave a Reply

Your email address will not be published. Required fields are marked *