LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bedrock Linux (https://www.linuxquestions.org/questions/bedrock-linux-118/)
-   -   screen, blackbox, possible cross-strata oddness (https://www.linuxquestions.org/questions/bedrock-linux-118/screen-blackbox-possible-cross-strata-oddness-4175645739/)

jr_bob_dobbs 01-07-2019 03:09 PM

screen, blackbox, possible cross-strata oddness
 
I installed void in a QEMU VM. Once I rebooted into the system and set networking up, I installed xorg, xterm, windowmaker, screen and bash. I was able to run startx without problems.

Bedrocked it.

Fetched a Debian strata. Installed bash, screen, xorg and blackbox.
To reiterate: blackbox Debian, windowmaker void. Void init.
Set .xinitrc to run blackbox.

Blackbox came up OK. In blackbox, ran xterm.

Typed "screen". Got error message, "Must be connected to a terminal."

Typed "strat debian screen." Got error message, "Cannot make directory '/run/screen': Permission denied.

Typed "strat void screen". Got error message, "Must be connected to a terminal."

Used su to become root. Made directory /run/screen, set it 755 and sticky. became normal non-root user again. This time, "strat debian screen" worked.

If one types screen while still in the console (don't run startx), things are different. Void's screen command works fine. Debian's says "Cannot open your terminal '/dev/tty1' - Please check."

If one edits .xinitrc to run windowmaker, which is provided by void, not debian, one can then, in a term, run screen and "strat debian screen" with no problems.

In terms of all the cross-strata action going on, is this correct behavior under bedrock?

Thank you.

edit: If one reboots, so that /run/screen is not there, running debian's screen does fail in windowmaker.

ParadigmComplex 01-07-2019 04:51 PM

I think either you or someone else mentioned this on IRC. I debugged most of it since then, but didn't quite finish and get around to replying back about it. I've been swamped with helping new users and support requests all over the place.

I think Void's windowmaker vs Debian's blackbox is a red herring. If Debian happened to also pull in bash and xterm as dependencies somewhere, it's possible that the WM choice implicitly chose the xterm stratum which implicitly chose the shell stratum. If that's the case, when you ran "screen" in windowmaker, you were probably running debian's screen, not void's. You didn't list what happens with "strat void screen" in windowmaker. My guess is the same as in Void's blackbox. My guess is the WM doesn't make a difference here.

I couldn't reproduce the /dev/tty1 or "must be connected to a terminal" issues through normal usage. Reading around, it seems like both happen if you try to attach to a screen session with another user (e.g. root). Might be something you accidentally did when trying to debug the /run/screen stuff as root. It seems like there's a number of ways to fix this. See:

https://stackoverflow.com/questions/...0-please-check
https://stackoverflow.com/questions/...a-linux-contai

Debian's screen uses "/run/screen" while Void's uses "/run/screens" with an extra "s" at the end. This means any init hooks to create the /run/ directory will only do it for the one from the init stratum. This is why Debian's screen gives that error when using Void's init. Debian's screen package comes with a "/etc/init.d/screen-cleanup" script which creates its directory. I'm not sure where Void's is created. It's setuid, so maybe it makes it itself.

Work-arounds for the "/run/screen" issue include getting screen from the init stratum (which you tried, but I think got side tracked by an unrelated issue) or using SCREENDIR. See "man screen".


All times are GMT -5. The time now is 10:23 AM.