bugGNU Screen - Bugs: bug #42142, screen <command> with STY...

 
 

bug #42142: screen <command> with STY set to outside screen session does not behave as expected

Submitter:  Luke Dashjr <lukedashjr>
Submitted:  Fri 18 Apr 2014 01:50:00 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Sep 2015 08:57:21 PM UTC, comment #4: 

Yes, that is what I am doing right now, but it is just a workround. It would be better to actually fix this in screen, especially since the behaviour is very non-obvious and people won't know what's going on without a lot of research. If there's no way to fix it, maybe screen should print something like "Opened a new window in session XYZ"?

Luke Dashjr <lukedashjr>
Sat 05 Sep 2015 08:30:51 PM UTC, comment #3: 

You run your X session in screen, thus all program inside your X session are basically run inside this screen.

I can't change the way how applications inherit environment variables on unix systems.

However seeing that you start your X session inside screen you probably use startx so you can always run "unset STY" before startx or just add unset to your .xinitrc, both should work for your use case.

Amadeusz Sławiński <amade>
Group administrator
Sat 05 Sep 2015 08:13:30 PM UTC, comment #2: 

Except I'm not actually executing the command inside an active screen session. The xterm has merely inherited the STY environment variable from that screen session.

Regardless of what behaviour is expected of the current code, no human/user would ever expect that running `screen` in an xterm is going to silently open a new window in some external screen session.

Luke Dashjr <lukedashjr>
Sat 05 Sep 2015 03:11:04 PM UTC, comment #1: 

It's expected behaviour, executing screen command inside active screen session opens new window

If you want to start new session inside use 'screen -m' it's in documentation.

Amadeusz Sławiński <amade>
Group administrator
Fri 18 Apr 2014 01:50:00 PM UTC, original submission:  

I run my X session in screen, so that I can later attach to it inside the X session itself. However, this sets the STY environment variable, so when I go to use screen inside a terminal, it just quietly exits (or opens a new window in my X screen?), with no indication in my terminal what actually happened.

Expected behaviour is that it realises it's not inside the X screen, and behaves the same way as if STY was not set: create a new screen session with the application.

Also, I observed that inside a screen session, if you change users (eg, with su or sudo) and STY remains set, screen fails with an error:
    /root/.screen/3192.X: No such file or directory

Luke Dashjr <lukedashjr>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by lukedashjr (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-05 amade StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code