misc/mc problem

For a week or a couple of weeks, after upgrade of misc/mc port, I can't start mc from ordinary user, only from root. I tried doing it from different shells. The error states:
Code:
common.c: unimplemented subshell type 1
read (subshell_pty...): No error: 0 (0)
May be something wrong was during upgrade with it's configuration files? Where can I look for the solution?
 
What shell are you using as normal user?

Code:
echo $SHELL

You may have to kill all of the current shell sessions under that user. You can use pgrep to find all PIDs of the shell running and then kill them off.

Then check and see if you are able to start mc.
 
As I've mentioned, I'd tried different shells. The default one for that user is /bin/sh, also I've tried to start from the default one: /usr/local/bin/bash, /bin/csh, /bin/tcsh. All with the same error.
For the root default is /bin/csh.
 
mc-4.8.15 (as a package and as a port with default options) and pdksh v5.2.14.2 99/07/13.2, no problemo. Doesn't help at all, but.... solidarity?

Juha
 
I guess the issue is related to the subshell. Now I have compiled misc/mc with the options
Code:
DOCS          : off 
EDITOR        : off 
ICONV         : on
NCURSES       : off 
NLS           : on
SFTP          : on
SLANG         : on
SMB           : off 
SUBSHELL      : off 
X11           : off
and it woks with sh as login shell. It might be that the command line below the file manager window is out of function now. I have never used it. May be this is of some help.

EDIT: The command line below the file manager stiil works similar compared to mc installed as binary in a jail. The test was just a ping to the host. I have no idea about the purpose of the SUBSHELL option.
 
Suppose, SUBSHELL means working command line prompt after Ctrl+O. It have not worked for ordinary user (or in /bin/sh terminal window?) for quite a long time, so I used to it. But I need it for root!
Dilemma: to have subshell in root session and not to be able to even start misc/mc in /bin/sh for ordinary user, OR not to have subshell for any users, but to be able to start it.
Or to change shell for ordinary users…
 
Dear YuryG,
thank you for the information. Now I understand the problem. A work around would be to change the login shell for normal users to /bin/csh. It might help to modify the patch /usr/ports/misc/mc/files/patch-upstreamticket2742-detect-csh-as-tcsh-by-name.patch to add support of /bin/sh. I think woodsb02 knows what to do. If you have time you can file a problem report at http://www.freebsd.org/support/bugreports.html. I will try to help, too.
 
Dear YuryG,
how about using Ctrl+Z to put misc/mc in the background? With fg misc/mc is put in the foreground again. This would not require the subshell. This method works for me with misc/mc started from a terminal. I forgot that option yesterday. Of course there might be a difference compared to the subshell funtion.
 
Dear YuryG ,
now I have an additonal work arround.
Dilemma: to have subshell in root session and not to be able to even start misc/mc in /bin/sh for ordinary user
You can keep the subshell for root and let the users start misc/mc by mc -u, may be set an alias in their profiles. Then root has misc/mc with subshell and the users can use misc/mc but without subshell. May be this is an option.
 
Hello YuryG,
first thank you for the problem report. I think now you have compiled misc/mc with subshell disabled. I have had enabled it now to dig in the problem. While digging I found the -u option in mc(1). It seems to work only when the subshell is active.
 
I'm on FreeBSD 11-CURRENT, mc(1) 4.8.15 was installed with pkg[(8).
I tested it with sh, csh and bash (fresh logins). It works in all, but in sh the subshell does not work.
 
When I got this error
Code:
common.c: unimplemented subshell type 1
I read this thread and changed the shell used by KDE's Konsole to the statically linked /usr/local/bin/bash from the ports. But still getting the error.
There is no error under su though.
Is it possible to run mc without having to add -u under FreeBSD?
 
As far as I could get, changing console is not that workarounds. It needs user SHELL to be not sh. Try to change launcher command (if that is possible in KDE).
Kind of work-around: launch mc with a command (or make an alias):
SHELL=/bin/csh mc
 
No, you need user system shell to be not sh. Either enter cited command in KDE launcher (not sure how), or change SHELL for the user via pw. Simply making KDE to start terminal with some other shell doesn't help.
 

SirDice

Administrator
Staff member
Administrator
Moderator
This probably helps, from /usr/local/doc/mc/doc/FAQ:
Code:
6.6 When I use Ctrl-O I don't get a subshell.  How do I fix this?

   Only bash, tcsh and zsh can be used as subshell.  Use one of those
   shells as your default shell, and it will be used as subshell in GNU
   Midnight Commander.

6.7 Ctrl-O doesn't work at all.  What happens?

   Ctrl-O works if either the subshell is used or the terminal can save
   the output of the commands so it can be restored.  If neither is
   true, there is absolutely nothing interesting behind the panels!

   Only few terminals support screen saving.  It's xterm, rxvt and other
   xterm-like terminals and virtual terminals on Linux and FreeBSD.
 
I am not sure I understand the terminology.
In my installation the login shell has been replaced globally for all users from sh to bash.
Why does MC still not work without -u?
 
Top