Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: screen issues on lish
PostPosted: Fri Sep 26, 2008 9:01 pm 
Offline
Senior Newbie

Joined: Sat Jul 23, 2005 5:34 pm
Posts: 8
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


Top
   
 Post subject:
PostPosted: Fri Sep 26, 2008 9:24 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
From screen(1):

Quote:
C-a a
(meta)

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


And further down the man page:

Quote:
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".


Top
   
 Post subject: Thanks
PostPosted: Fri Sep 26, 2008 9:52 pm 
Offline
Senior Newbie

Joined: Sat Jul 23, 2005 5:34 pm
Posts: 8
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


Top
   
 Post subject:
PostPosted: Fri Sep 26, 2008 10:13 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
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.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Fri Sep 26, 2008 10:20 pm 
Offline
Senior Newbie

Joined: Sat Jul 23, 2005 5:34 pm
Posts: 8
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


Top
   
 Post subject:
PostPosted: Fri Sep 26, 2008 11:20 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
rjs wrote:
I'll leave it alone. I ask a question, I get a man page and a install ssh.


Teach a man to fish...

Quote:
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.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sat Sep 27, 2008 1:06 am 
Offline
Senior Newbie

Joined: Sat Jul 23, 2005 5:34 pm
Posts: 8
sweh wrote:

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


Top
   
 Post subject:
PostPosted: Sat Sep 27, 2008 1:29 am 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
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?


Top
   
 Post subject:
PostPosted: Sat Sep 27, 2008 2:29 am 
Offline
Senior Newbie

Joined: Sat Jul 23, 2005 5:34 pm
Posts: 8
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


Top
   
 Post subject:
PostPosted: Sat Sep 27, 2008 6:26 am 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
http://www.catb.org/esr/faqs/smart-questions.html


Top
   
 Post subject:
PostPosted: Sat Sep 27, 2008 9:59 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
rjs wrote:
sweh wrote:

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.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group