[opensuse] Bash & automatic screen
I love "screen" but sometimes I forget to run it before I leave something running. Therefore I can't close the session or resume it from another location. Is there a smart way to make it run and resume an existing session or start a new if there's no session, when I start bash? /J -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I love "screen" but sometimes I forget to run it before I leave something running. Therefore I can't close the session or resume it from another location. Is there a smart way to make it run and resume an existing session or start a new if there's no session, when I start bash?
Could you put screen in your .bashrc? That way, it would start as soon as you login... -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 28 June 2007 14:29, aragonx@dcsnow.com wrote:
I love "screen" but sometimes I forget to run it before I leave something running. Therefore I can't close the session or resume it from another location. Is there a smart way to make it run and resume an existing session or start a new if there's no session, when I start bash?
Could you put screen in your .bashrc? That way, it would start as soon as you login...
Well, the approach might work, if you're careful, but .bashrc is absolutely _not_ the file to use. If this were to work, it would be either .bash_login or .bash_profile. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 28 June 2007 14:29, aragonx@dcsnow.com wrote:
I love "screen" but sometimes I forget to run it before I leave something running. Therefore I can't close the session or resume it from another location. Is there a smart way to make it run and resume an existing session or start a new if there's no session, when I start bash?
Could you put screen in your .bashrc? That way, it would start as soon as you login...
Well, the approach might work, if you're careful, but .bashrc is absolutely _not_ the file to use. If this were to work, it would be either .bash_login or .bash_profile.
Quite right. I had a bout of temporary insanity. :( -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 28 June 2007 14:05, Jan Karjalainen wrote:
I love "screen" but sometimes I forget to run it before I leave something running. Therefore I can't close the session or resume it from another location. Is there a smart way to make it run and resume an existing session or start a new if there's no session, when I start bash?
/J
You don't say what terminal emulator you're using, but if you use Konsole, it has a "Screen" session type already defined. You can always configure a set of tabs for the kinds of sessions you like, mixing Screen and straight shells, if you like, or all Screens or whatever. Then that configuration can be automatically reconstituted whenever you log in, if you like. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Konsole is what I'm using. But Konsole doesn' t seem to try reconnection to an existing session. I'll see what I can come up with after playing with .bash_profile. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 28 June 2007 14:56, Jan Karjalainen wrote:
Konsole is what I'm using. But Konsole doesn' t seem to try reconnection to an existing session. I'll see what I can come up with after playing with .bash_profile.
Two things: 1) .bash_profile or .bash_login are likely to prove problematic. They're invoked to get your entire KDE session going, not just for the interactive shells in, say, Konsole. I'd suggest using the "pstree" command to see the "family history" of processes that make up a working KDE session. 2) You can reconfigure / redefine or define your own Konsole sessions. You should be able to make a variant of the existing Screen that re-attaches (or whatever it is you do with Screen). And don't overlook the possibility of a simple shell script to set up the kind of Screen session you need. All in all, I'd steer clear of the .bash_* files, since they're likely to be invoked for purposes and at times that would be inappropriate to get Screen involved. Good luck. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
aragonx@dcsnow.com
-
Jan Karjalainen
-
Randall R Schulz