Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subshell not working in GNU screen #3345

Closed
mc-butler opened this issue Nov 23, 2014 · 7 comments
Closed

Subshell not working in GNU screen #3345

mc-butler opened this issue Nov 23, 2014 · 7 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress res: worksforme The bug reported in the ticket cannot be reproduced ver: 4.8.13 Reproducible in version 4.8.13

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3345
Reporter michalzuber (michalzuber86@….com)
Mentions egmont@….com (@egmontkob)
Keywords subshell

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' 
@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 23, 2014 at 15:21 UTC (comment 1)

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

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 23, 2014 at 15:21 UTC (comment 2)

  • Cc set to egmont@….com

@mc-butler
Copy link
Author

Changed by and on Feb 15, 2015 at 15:23 UTC (comment 3)

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.

@mc-butler
Copy link
Author

Changed by and on Feb 15, 2015 at 15:26 UTC (comment 4)

har_d to by_pass s_pam_bayes. :(

@mc-butler
Copy link
Author

Changed by god12 (god12@….hut.fi) on Nov 9, 2015 at 10:40 UTC (comment 5)

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

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jan 10, 2025 at 16:55 UTC (comment 6)

  • Milestone Future Releases deleted
  • Status changed from new to closed
  • Resolution set to worksforme

Add altscreen on to your $HOME/.screenrc to enable alternate screen.

Subshell works for me in screen on RHEL, please reopen if you have a reproducer for the current version.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 10, 2025 at 17:02 UTC (comment 7)

  • Description edited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress res: worksforme The bug reported in the ticket cannot be reproduced ver: 4.8.13 Reproducible in version 4.8.13
Development

No branches or pull requests

1 participant