[CentOS] Screen

Fri Oct 30 19:10:10 UTC 2015
Matt Garman <matthew.garman at gmail.com>

If you're just getting starting with a screen multiplexer, I'd suggest
starting with tmux.  My understanding is that GNU screen has
effectively been abandoned.

I used GNU screen for at least 10 years, and recently switched to
tmux.  As someone else said, in GNU screen, if you want to send ctrl-a
to your application (e.g. shell or emacs), you can do ctrl-a followed
by a "naked" a.  I found this becomes so second nature, for the rare
time I'm not in screen/tmux, I habitually do the Ctrl-a a sequence!

tmux's default "action" sequence is Ctrl-b.  Even without my history
of Ctrl-a muscle memory, I think I'd find Ctrl-b awkward.  I briefly
tried to get used to it so I could live without a custom tmux config
file, but just couldn't do it.  So, here's my small ~/.tmux.conf file:

# remap Ctrl-b to Ctrl-a (to emulate behavior of GNU screen)
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# use vi-like keybindings
set-window-option -g mode-keys vi

# emulate GNU screen's Ctrl-a a sequence to jump to beginning of
# line
bind a send-prefix

On Fri, Oct 30, 2015 at 6:39 AM, xaos <xaos at darksmile.net> wrote:
> Andrew,
> Don't do it man. Don't remap screen key sequences.
> I had the same issue. This is how I ultimately solved it.
> I mentally trained myself to think of screen
> as a room that I need to do a Ctrl-A in order to get in there.
> So, for bash, It is NOT a big deal anyway. Train your fingers to do a
> Ctrl-A then a
> It is just one extra keystroke.
> I got used to it within a week.
> -George
> On 10/30/15 7:13 AM, Scott Robbins wrote:
>> On Fri, Oct 30, 2015 at 10:53:29AM +0100, Andrew Holway wrote:
>>> Hey
>>> I like to use Ctrl+A and Ctrl+E a lot to navigate my insane big bash one
>>> liners but this is incompatible with Screen which has a binding to
>>> Ctrl-A.
>>> Is it possible to move the screen binding so I can have the best of both
>>> worlds?
>> If you only make simple use of screen, then there's always tmux.  It uses
>> ctl+b by default, and one of the reasons is the issue you mention.
>> (If you have a lot of complex uses of screen, then it becomes a bigger
>> deal
>> to learn the new keyboard shortcuts, but many people just use it's attach
>> and deteach feature, and relearning those in tmux takes a few minutes.)
>> If you are interested in trying it, I have my own very simple page with
>> links to a better page at http://srobb.net/screentmux.html
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos