GNU Screen: Better way to cut and paste?

5

1

I've been using GNU Screen for close to 3 years and find it immensely useful. For such a robust and flexible program I find its cut and paste functionality a little basic.

Has anyone found a better way to use the cut and paste features besides the default settings? These include:

  • Better cut/paste and hardstatus integration
  • More recall than only the previously cut text
  • Easier keybindings

Gentoo Craig

Posted 2010-07-25T21:38:58.277

Reputation:

1I'm not confident this has anything to do with programming. – None – 2010-07-25T21:42:39.267

2Screen has cut and paste? I just use the copy/paste features of my terminal program. – Greg Hewgill – 2010-07-25T21:44:51.870

1if you ask one single specific question you might get an answer. this is all over the map, and any one of these might take a long time to give a good answer to. – iconoclast – 2011-06-07T02:54:06.860

1

@GregHewgill Read this question and its answers for more about scrolling, copying & pasting in screen

– Doug Harris – 2012-01-12T18:23:59.840

1

@DougHarris: Also see http://stackoverflow.com/questions/70614/gnu-screen-survival-guide/70765#70765 for the commands that I actually use in screen. Turns out I use the "copy" feature for scrollback, but not copying.

– Greg Hewgill – 2012-01-12T18:27:04.017

Answers

1

I've changed my /etc/screenrc for setting I prefer.

Here are the lines related to the hardstatus.

hardstatus on
backtick 1 3600 1 /bin/uname -n
hardstatus alwayslastline "%{= dg} %-Lw%{+b}%n+%f %t%{-}%+Lw%< %=[%1` %l] [%0c]"

I still use the default keybindings, but these can also be changed in the configuration file. The main resource are man screen (for shortcuts and the configuration file) and the web for the examples.

Some mnemonics for default shortcuts:

  • c-a c-c create
  • c-a c-n next
  • c-a c-p previous
  • c-a c-d detach
  • c-a x where x is [0-9] goes to the screen x
  • c-a [ copy
  • c-a ] paste

Kru

Posted 2010-07-25T21:38:58.277

Reputation: 178

0

I've simply avoided it or dug out the manual if I had to use it. I don't think tmux fares any better when it comes to c&p either.

XTL

Posted 2010-07-25T21:38:58.277

Reputation: 190

0

Both recall and keybindings can be changed in your .screenrc, which should be found in your home folder (~), if you don't have one you should be able to copy one from /etc/skel

theflyingfool

Posted 2010-07-25T21:38:58.277

Reputation: 21