Ticket #3345 (new defect)

Opened 5 years ago

Last modified 4 years ago

Subshell not working in GNU screen

Reported by: michalzuber Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.8.13
Keywords: subshell Cc: egmont@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Tried on Arch LInux and OSX, but subshell doesn't work if in GNU screen

Screencast: https://www.youtube.com/watch?v=hMVAVZCj8lI
Arch bug report: https://bugs.archlinux.org/task/42873

$ env
TERM_PROGRAM=iTerm.app
TERM=xterm-256color
SHELL=/bin/bash
HISTSIZE=5000
CLICOLOR=1
TMPDIR=/var/folders/xn/2cw7yp3573z4jr69frj4_b700000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-mPjxcw/Render
HISTFILESIZE=5000
USER=mike
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-I9rIWN/Listeners
Apple_Ubiquity_Message=/tmp/launch-Vxo4Zm/Apple_Ubiquity_Message
CF_USER_TEXT_ENCODING=0x1F5:0:0
PAGER=less
LSCOLORS=GxFxCxDxBxegedabagaced?
PATH=/usr/local/mysql/bin:/opt/phpunit/bin:/opt/local/bin:~/bin:/opt/newsbeuter/bin:/opt/local/sbin:/opt/elasticsearch/bin:/opt/links/bin:~/Downloads/android/sdk/platform-tools:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
LOCALE=UTF-8
PWD=/Users/mike
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-riF24S/unix_domain_listener
EDITOR=vim
LANG=en_US.UTF-8
ITERM_PROFILE=Default
PS1=\[\033k\033
\]\u@\h:\w\$
HISTIGNORE=&:ls:[bf]g:exit:config:netrc:clear
HISTCONTROL=ignoreboth
SHLVL=1
HOME=/Users/mike
COLORFGBG=7;0
ITERM_SESSION_ID=w0t0p0
LESS=-i-P%f (%i/%m) Line %lt/%L
LOGNAME=mike
VISUAL=vim
LC_CTYPE=en_US.UTF-8
SECURITYSESSIONID=186a5
_=/usr/bin/env

$ cat .bashrc
#
# ~/.bashrc
#
# http://stefaanlippens.net/my_bashrc_aliases_profile_and_other_stuff

# If not running interactively, don't do anything
# $- != *i* ? && return

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then

test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)"
eval "$(dircolors -b)"

fi

# Set terminal colors
# http://it.toolbox.com/blogs/lim/how-to-fix-colors-on-mac-osx-terminal-37214
alias ls='ls --color=auto -Fh'
if [ "$(uname)" == "Darwin" ]; then

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced?
alias ls='ls -GFh'

fi

if [ "$(uname)" == "Linux" ]; then

alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'

fi

export PS1='\u@\h:\w\$ '

export LANG="en_US.UTF-8"
export LOCALE="UTF-8"
export LC_CTYPE="en_US.UTF-8"

export HISTSIZE=5000
export HISTFILESIZE=5000
export HISTIGNORE="&:ls:[bf]g:exit:config:netrc:clear"
export HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend
shopt -s cmdhist
shopt -s cdspell
# Make bash check its window size after a process completes
shopt -s checkwinsize

if [ -f /opt/local/etc/bash_completion ]; then

source /opt/local/etc/bash_completion

fi

[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion

[ -r /usr/share/git/completion/git-prompt.sh ] && . /usr/share/git/completion/git-prompt.sh

# http://hints.macworld.com/article.php?story=20031015173932306
PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME%%.*}: ${PWD/#$HOME/~}\007"'
case "$TERM" in

screen*)

# https://stackoverflow.com/a/2069095
export PS1='\[\033k\033
\]'$PS1
;;

xterm-256*)

# https://stackoverflow.com/a/2069095
export PS1='\[\033k\033
\]'$PS1
;;

esac

alias ll='ls -Fhla'
alias lsize='ls -FShla'
alias vi='vim'
alias ss='ssh -C'
alias cp='cp -v'
alias mv='mv -v'
alias rm='rm -iv'
alias grep='grep --color=auto'
# alias grep='grep -n --colour=auto --exclude-dir=\.svn --exclude-dir=\.git'
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
alias xlock='xlock -mode blank'

Change History

comment:1 Changed 5 years ago by egmont

Seems to me that the "screen" utility doesn't support the "alternate screen" feature, necessary for subshell support. Consider using tmux instead.

comment:2 Changed 5 years ago by egmont

  • Cc egmont@… added

comment:3 Changed 5 years ago by and

Th_is it no_t reprodu_cible for me,
using gen_too, mc-4.8.13 with gl_ib-2.40.2,slang,nls,with_out X and scr_een-4.0.3.
scr_een sessi_on with TE_RM=screen-256color and mc subsh_ell works we_ll.

Maybe Mi_chal using a spe_cial .scre_enrc or .bas_hrc, not_hing we know yet.
If not th_ere m_ust be a dif_ferent between AR_CH and GEN_TOO.

comment:4 Changed 5 years ago by and

har_d to by_pass s_pam_bayes. :(

comment:5 Changed 4 years ago by god12

subshell works fine for me on ubuntu in screen with fish shell.

Note: See TracTickets for help on using tickets.