4 ms·
I use "screen" a lot, but I wish it had a better name. It helps if you search for "gnu-screen", but not much. Here's a tip that has saved me once or twice. If
by mblakele 18y ago
I use "screen" a lot, but I wish it had a better name. It helps if you search for "gnu-screen", but not much.
Here's a tip that has saved me once or twice. If you start a long-running process, but forgot to use screen or nohup, bash lets you 'disown -h' its jobspec.
- silentbicycle 18y agoOne day I took the time to work this out for my .screenrc, and it's served me well since: # Set up my status line at the bottom of every frame caption always "%{gb} %{ck}%m-%d %C %{gb} %{gb}%?%-Lw%?%{ck}%n*%f %t%?(%u)%?%{gb}%?%+Lw%?" All of the %{gb} things are color codes. It looks like this: http://shenani.gen.nz/~scott/screen-statusbar.png http://shenani.gen.nz/~scott/screen-statusbar.png Binding ! @ # etc. to select 10, 11, 12, ... is handy, too.
- mblakele 18y agoThat's good. Here's what I'm using: hardstatus alwayslastline hardstatus string "%n: %H (%h) %t" For bindings, I find '10 '11 etc to be efficient enough. But I also make heavy use of :number to reorder my windows so that I know which one is which. There's also shift-A, to give them meaningful labels in the ctrl-A " list.
- joeyo 18y agoThere are more .screenrcs (including my own) in this thread: http://news.ycombinator.com/item?id=425890 http://news.ycombinator.com/item?id=425890
- thingie 18y agoThe biggest problem with screen is that it breaks ordinary virtual terminal scrollback, which is something that I can live with, but…
- derwiki 18y ago"Ctrl-a [" will put you enter the copy buffer mode and let you scroll up
- thingie 18y agoSure, but that's only a poor substitute. I can't just press shift + pg [up,down] or drag scrollbar in the terminal emulator or use mouse wheel.
- terminus 18y agoYeah I know, Shift+PG[up, down] not being usable is kinda a bummer but as a bonus you can use / to search the scrollback buffer plus all the vi movement keys are available.
- greyboy 18y agoDoes this not work for you? From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.... Q: My xterm scrollbar does not work with screen. A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. 'vi'). You can tell screen not to use these initialisations by adding the line termcapinfo xterm ti@:te@ to your ~/.screenrc file.
- thingie 18y agoNo, it becomes chaotic and unusable when I have more screen windows and switch among them :-) I would not complain, if I knew such an easy way to make it work, really. :-)
- ovi256 18y agoI might be slow about screen, but how is it different from running several tabs in Terminal on Mac OS X for example ? I can see it being useful in ssh through : you can have it emulate tabs through a single ssh connection.
- bcl 18y agoscreen is persistent over dropped connections. Lets say you are doing some long running operations on a remote server and your connection drops. With screen you can log back in and run 'screen -r' to resume the session.