[dev] [st] Strange behavior with screen

From: Joe <joe.on.list_AT_gmail.com>
Date: Thu, 20 Feb 2020 02:18:07 +0100

Hi, I noticed something wrong in using "screen" with st terminal.

Some details about my system:

GNU/Linux - Slackware Current (64bit + multlib)

$ screen --version
Screen version 4.08.00 (GNU) 05-Feb-20


st versions with I reproduced the issue:
- stable 0.8.2
- git

Window manager dwm:

$ dwm -v

ncurses installed version 6.2

I reported that package version because it provides terminfo
precompiled files for st:

By st Makefile, or by manually compile st.info terminfo file shipped
with st sources, 4 of the above files are overwritten, so finally I
let ncurses ones under /usr/share/terminfo and install the suckless
provided under my home dir
(I edited Makefile removing "tic" command):

mkdir ~/.terminfo
tic -sx st.info -o ~/.terminfo

$ tree .terminfo/
└── s
    ├── st
    ├── st-256color
    ├── st-meta
    └── st-meta-256color

The interesting file il "st-256color", it is the default TERM name as
found in st config.h. If we launch st and:

$ echo $TERM

$ infocmp |head -n1
# Reconstructed via infocmp from file: /home/joe/.terminfo/s/st-256color

So I'm using st with its terminfo st-256color file provided by its sources.

Ok, after this preamble, let's talk about the issue:

1. open st (I press Alt+Shift+Enter under dwm ;) )
look at TERM var it should be st-256color
I'm using st git version here.

2. launch screen
look at TERM var in my case I have screen-256color (from .screenrc)

3. detach screen session by press Ctrl-a and "d"

$ screen
[detached from 7736.pts-1.master]

$ screen -list
There is a screen on:
        7736.pts-1.master (Detached)
1 Socket in /home/joe/.screen.

4. now try to "resume" the detached screen session by the command:

$ screen -r

[screen caught signal 11. (core dumped)]

5. that's the error I receive. Let's look at screen status:

$ screen -list
There is a screen on:
        7736.pts-1.master (Dead ???)
Remove dead screens with 'screen -wipe'.
1 Socket in /home/joe/.screen.

It appears may be "Dead"... Not good! :(

I tried to force TERM var to some other value like "st"
$ TERM=st && echo $TERM

$ infocmp |head -n1
# Reconstructed via infocmp from file: /home/joe/.terminfo/s/st

$ screen
[detached from 7760.pts-1.master]

$ screen -list
There is a screen on:
        7760.pts-1.master (Detached)
1 Socket in /home/joe/.screen.

$ screen -r
[detached from 7760.pts-1.master]

As you can see the issue is disappeared.
What happens if I try to use the st-256color file provided by ncurses package?

$ mv .terminfo/s/st-256color .terminfo/s/st-256color.bk

$ TERM=st-256color && echo $TERM

$ infocmp |head -n1
# Reconstructed via infocmp from file: /usr/share/terminfo/s/st-256color

$ screen
[detached from 7789.pts-1.master]

$ screen -list
There is a screen on:
        7789.pts-1.master (Detached)
1 Socket in /home/joe/.screen.

$ screen -r
[detached from 7789.pts-1.master]

In this case st TERM is found in /usr/share/terminfo/s/st-256color
This file is provided by ncurses package, it isn't the one included in
st sources.
So I suspect something could be wrong using st with st-256color
terminfo file provided by git master branch and screen program.

The issue could also be related to screen, but I don't notice it using
other terminals like xterm, or also st as explained, just by using an
alternative terminfo file.

I'd be grate if you can test the above command to confirm the issue
and in case, take a look inside st sources to fix it.

If some other info is needed, let me know!
Thanks in advance!
Bye! :)
Received on Thu Feb 20 2020 - 02:18:07 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 20 2020 - 03:00:08 CET