From: Grant on 9 Apr 2010 01:22 On Fri, 09 Apr 2010 03:12:12 +0200, Harald Meyer <meyersharald(a)googlemail.com> wrote: >unruh wrote: > >> When I want to for example look at mail, I tend to do >> ssh workmachine >> and when I come out of pine, I just continue working on that terminal >> without exiting, until I next want to look at mail. > >If I got that right, you are already on workmachine, but think you're on >homebox and connect from workmachine to workmachine again. Why don't you >include the hostname in the prompt? Yes, that's what I do here. Though I'm on win desktop I ssh into a few different linux boxes and each has the 'user(a)machine:$PATH$ _' prompt. Grant. -- http://bugs.id.au/
From: Marc Haber on 9 Apr 2010 12:30 unruh <unruh(a)wormhole.physics.ubc.ca> wrote: >Or is there something other than exit which >will take me out of an ssh session, but will not close the shell window >when I get down to the last level? I have a similiar problem with a different root. I usually have a Window in my lower left corner where the ssh to the box where the screen with the IRC client is on. That window isn't decorated, it is present on all desktops, it has a smaller font and a number of other specialties. It is therefore a nuisance when I accidentally close it. If only konsole would have a switch like "when the application running inside the window terminates, immediately start it again", my issue would have been solved, and yours as well. Greetings Marc -- -------------------------------------- !! No courtesy copies, please !! ----- Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/ Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
From: Chris F.A. Johnson on 9 Apr 2010 12:32 On 2010-04-09, Marc Haber wrote: > unruh <unruh(a)wormhole.physics.ubc.ca> wrote: >>Or is there something other than exit which >>will take me out of an ssh session, but will not close the shell window >>when I get down to the last level? > > I have a similiar problem with a different root. I usually have a > Window in my lower left corner where the ssh to the box where the > screen with the IRC client is on. That window isn't decorated, it is > present on all desktops, it has a smaller font and a number of other > specialties. > > It is therefore a nuisance when I accidentally close it. > > If only konsole would have a switch like "when the application running > inside the window terminates, immediately start it again", my issue > would have been solved, and yours as well. while :; do <COMMAND>; done -- Chris F.A. Johnson, <http://cfajohnson.com> Author: Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
From: J G Miller on 9 Apr 2010 12:55 On Fri, 09 Apr 2010 16:32:01 +0000, Chris F.A. Johnson wrote: > while :; do <COMMAND>; done But this can result in a problem if you really do need to terminate the process. I would therefore suggest a slightly modified approach to this if you only need one instance of the process per user -- lock_file="/tmp/${user}/run/command_name" touch "${lock_file}" while [ -e "${lock_file}" ] do sleep 2 command_name done Then if you need to stop the process, remove the lock file, and then send the signal a 1, 15, or 9 signal as appropriate.
From: Bit Twister on 9 Apr 2010 13:01
On Fri, 09 Apr 2010 18:30:01 +0200, Marc Haber wrote: > I have a similiar problem with a different root. I usually have a > Window in my lower left corner where the ssh to the box where the > screen with the IRC client is on. That window isn't decorated, it is > present on all desktops, it has a smaller font and a number of other > specialties. > > It is therefore a nuisance when I accidentally close it. Since I run xterm, it's a piece of cake to change fore/background colors to warn me about that root terminal. All my other terminals are a different color. Case statement in a script could even change colors based on target machine. It is not that hard to have the login script kickoff a second terminal upon login. |