screen issues on lish

Anyone know what the trick is for exiting a screen session in lish? Exiting takes you back out to the lish prompt and entering again leaves you stuck in your linode screen sessions. I realize that lish is a screen session, but we need it to not affect internal screen sessions. Must be a trick…..

Thank you,

--rjs

10 Replies

From screen(1):

> C-a a

(meta)

Send the command character (C-a) to window. See escape command.

And further down the man page:

> escape xy

Set the command character to x and the character generating a literal command character (by triggering the "meta" command) to y (similar to the -e option). Each argument is either a single character, a two-character sequence of the form "^x" (meaning "C-x"), a backslash followed by an octal number (specifying the ASCII code of the character), or a backslash followed by a second character, such as "\^" or "\". The default is "^Aa".

Appreciate the man page. I'm not quite sure I understand.

screen -S manpage -d -m /manpage/sh manpage.sh

And to exit "ctrl-a d" which exits to bash without killing the screen sessions.

Any suggestions on a change that would allow exit to bash and not lish?

Thanks

–rjs

If you ssh to the virtual console on the Linode host machine, you get Lish or a screen session - there is no bash to exit to. This is really meant for emergencies, like when you lock yourself out while tinkering with your firewall, or you break sshd.

If you want a shell other than Lish, you have to ssh to your Linode directly.

I'll leave it alone. I ask a question, I get a man page and a install ssh. Does it ever occur to anyone that just maybe there are reasons for using the console access?

And no, lish console access was "not" designed for emergency usage. There are numerous reasons for it's necessity just as it is to run various screen sessions.

I didn't want another shell, I didn't ask for an ssh installation. And for your information quite a few only use the lish access. This is why I rarely visit support forums. A man does not live by post counts alone, but by every word and expression he typeth.

Thanks.

–rjs

@rjs:

I'll leave it alone. I ask a question, I get a man page and a install ssh.

Teach a man to fish…

> This is why I rarely visit support forums. A man does not live by post counts alone, but by every word and expression he typeth.

And with an attitude like yours, I'm sure every support forum you rarely visit is so much happier as a result!

But, hey, if you want to be spoonfed, c-a a d (see, control-a a sends the control a to your screen session and not the lish one, which then gets the 'd', so your screen gets disconnected and not the lish one). Which two seconds of thought, after having been told about c-a a (first response to you!) would have given you.

Here's another hint for you… we (with very few exceptions), in this forum, are merely users of the system. We answer questions out of the goodness of our heart. Don't bitch and moan if you don't get the answer you want. Try learning stuff, instead.

But, oh no, you have to come over with big attitude.

Good luck starving next time 'cos you couldn't be bothered to learn how to fish.

@sweh:

But, hey, if you want to be spoonfed, c-a a d (see, control-a a sends the control a to your screen session and not the lish one, which then gets the 'd', so your screen gets disconnected and not the lish one). Which two seconds of thought, after having been told about c-a a (first response to you!) would have given you.

So your answer to my question is c-a ad or the standard "ctrl a d" switch to detach correct? In other words, your c-a a d is ctrl a d?

Thanks

–rjs

Or, as the first answer also pointed you towards, on your system you can change the default screen command character from ctrl-a to something else by adding the escape command to /etc/screenrc or ~/.screenrc. This can make it more clear which layer of screen session you are commanding.

But seriously, in three years here you make absolutely zero attempt to answer anyone elses questions, and you get pissed about the answers you got?

To those that want a direct answer without fishing or going fishing, being taught by the master fishers etc.. and all that other.. etc.. without ever getting a direct answer or answers that are incorrect or just send you to a man page, here is how an answer might look to a question. The only answer at all to the question was answer number 1. However, and in my opinion, if that is all your going to do, you might as well go watch Oprah.

====

If you have a bash script and ctrl a d (detach) kicks you out to lish prompt, you can take..

screen -S manpage -d -m manpage.sh

alter it directly as such so that the ctrl is set to something other than ctrl-a

screen -S manpage -d -m -e ^Pp manpage.sh

The above -e ^Pp addition alters the standard ctrl-a to ctrl-p and allows a ctrl p d to exit your screen sessions started in the background (-d -m) to bash. This fixes the issues with the standard ctrl-a d sending you out to the lish prompt.

On this particular linode, and with this bash script, ctrl-a d does not work and sends you out to the lish prompt instead of bash on detachment. You don't want to kill the process on multi=server that requires all services be started in a certain order. No need for /etc/screenrc changes either for this issue.

Thank you,

–rjs

http://www.catb.org/esr/faqs/smart-questions.html

@rjs:

@sweh:

But, hey, if you want to be spoonfed, c-a a d (see, control-a a sends the control a to your screen session and not the lish one, which then gets the 'd', so your screen gets disconnected and not the lish one). Which two seconds of thought, after having been told about c-a a (first response to you!) would have given you.

So your answer to my question is c-a ad or the standard "ctrl a d" switch to detach correct? In other words, your c-a a d is ctrl a d?

Thanks

–rjs
See what I mean about fishing…. I said "c-a a d" - that's three combos; "control-a" followed by "a" followed by "d" will detach a screen running under a screen.

You really need to learn how to read.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct