Tiny Core Linux

Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: SamK on September 30, 2011, 04:57:55 AM

Title: Midnight Commander Subshell
Post by: SamK on September 30, 2011, 04:57:55 AM
As there are MC users around here I am hoping someone may have a tip or trick to offer.

Switching between the MC normal interface and the subshell works fine using the keystroke CTL+o.  Extensive use is made of personally created entries in the MC "User Menu" to run tasks.  These automatically open the MC subshell and display the task progress, then automatically close it upon task completion. 

In 90% of cases this behaviour is exactly what I want and have set it up this way in Options-->Configuration-->Pause after run-->Never.

For the remaining 10% of cases it would be convenient to have the subshell display remain open once the task has completed, awaiting a keystroke (i.e. the usual CTL+o) before returning to the usual MC interface diaplay.

Does anyone know a way of doing this?


Note:
I have found an impractical, clumsy way of delaying the closing of the subshell display, by appending a sleep X command at the end of the task entry in the "User Menu".  This is not really suitable as:
Title: Re: Midnight Commander Subshell
Post by: bmarkus on September 30, 2011, 07:00:25 AM
Stock shell doesn't support subshell. Try bash.
Title: Re: Midnight Commander Subshell
Post by: gerald_clark on September 30, 2011, 08:54:17 AM
I just enter 'sh' on the command line and 'exit' when through.
Can't switch back and forth though.
Title: Re: Midnight Commander Subshell
Post by: Rich on September 30, 2011, 09:29:25 AM
Hi SamK
Can you use the busybox  nc  command to listen to some port, then hit  Ctrl-c  when you want
to resume?
nc -l -p 2222
Title: Re: Midnight Commander Subshell
Post by: SamK on October 01, 2011, 03:12:09 AM
As so often seems to be the case, shortly after posting the question I stumbled on to an answer.  It turns out to be exactly the same as the idea from gerald_clark, which works just fine.

Thanks to each of you for your suggestions.