'incus console' and 'screen' use the same escape sequences

So I’m merrily poking around in my newly-discovered incus server, creating instances & whatnot, and discovered a somewhat unpleasant surprise, namely, both incus console and gnu screen use the same ctrl-a, q commands to detach from the session. This is sort of fine, unless you’re in a screen session in an instance that you really can’t kill, and you’d really like your incus console back :slight_smile:

I’m confident this is a well-known thing, and easy to fix, because, c’mon, screen is important, but I can’t figure out how to make them play nice. I’m OK with changing commands on one of the two, but that really doesn’t seem to have an obvious solution to me!

So, what’s the best way to fix this, besides using ssh instead of console? :slight_smile:

Yes, is was the reason that tmux was created. :smiley:

Where screen default comes with ctrl-A as meta character, comes tmux default with ctrl-B.

I’m very happy that I switch from screen to tmux, I can feel the “redesign”, the improvements.

Ctrl+A → processed by ˋincus console`
Ctrl+A A → Ctrl+A sent to your pseudoterminal.

So to do Ctrl+A Q in your screen, you have to do Ctrl+A A Q.

I don’t think I understand you correctly! Ctrl+A, A just prints “a” in the terminal. I’m messing around here with holding Ctrl for more characters, but anything besides Ctrl+A, Q just prints characters.

Then it’s Ctrl+A Ctrl+A Q and not Ctrl+A A Q

Hm, same thing (nothing). Well, I discovered that it’s trivial to change the escape sequence for screen, so I just changed it to Ctrl+B instead. However, I really think that screen should get preferential treatment, since it’s been around since you had to buy electrons by the cup, but I can’t find anything about changing incus’s escape sequence. It just feels a little rude, you know? :slight_smile:

(for future searchers, you can change the escape sequence in .screenrc by adding the line escape ^Bb where the upper/lowercase letters are what you want to use)

Well, works for me using Ctrl+A Ctrl+A D (it’s D and not Q to detach from a screen session, at least for me). It’s not really a question of special treatment of a specific command or another, you have to have an escape sequence. Like "\\" returns \ in most programming languages, Ctrl+A Ctrl+A within incus console passes Ctrl+A to the underlying pseudoterminal.

Huh. Well, I believe you :slight_smile: It’s always some damn thing or another over here. The host is a bit…recycled, and due for a wipe/reinstall anyway, and hopefully that brings my machines a little closer to being aligned with reality!

And I’m sure thousands have said this before me, but man, containerizing things is just amazing. I’ve already collapsed 3 VMs down into containers, added 2 new ones for things I’d never gotten around to, and tomorrow is “experiment with combinations of Docker/container/VM/OCI image/etc.” to see what works. My tiny home lab server already has noticeably more resources available.

I just sort of noted that you’re one of the devs, which is sort of funny that you’re helping debug my screen problems on a squirrelly home lab server, so thanks, this project is awesome :slight_smile: