bugGNU Screen - Bugs: bug #37437, -X option ignores specified user...


bug #37437: -X option ignores specified user in multiuser environment

Submitted by:  Lars Noodén <larsnooden>
Submitted on:  Mon 24 Sep 2012 05:40:35 PM UTC  
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.0.3
Fixed Release:  None Planned Release:  None
Work Required:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 28 Feb 2013 08:45:36 AM UTC, comment #4:

wfm wheezy on mac-mini and Raspberry pi

$ ssh me@remote-ip -t "screen -x myscreen -X stuff 'flite -t \"connecting you\"'`echo -ne '\015'`"

requires libncurses-dev

Jonathan Chetwynd <peepo>
Wed 27 Feb 2013 07:08:57 PM UTC, comment #3:

can't help with a patch, but as I just raised this issue on the mailing list as: screen -x myname -X stuff 'mycommand' \n
I'd like to test, and report, please advise when ready

Jonathan Chetwynd <peepo>
Mon 04 Feb 2013 03:58:16 PM UTC, comment #2:

Oops, formatting fail (no preview button!?). Let's try again:

Taj Morton <tajmorton>
Mon 04 Feb 2013 03:55:30 PM UTC, comment #1:

I just ran into this the other day as well. The following patch fixes the bug:

--- screen.c-orig 2013-02-03 13:44:35.039601124 -0800
+++ screen.c 2013-02-03 13:44:13.463601460 -0800
@@ -1069,6 +1069,10 @@
char *sty = 0;

+ if (multi)
+ real_uid = multi_uid;
/* attach_tty is not mandatory */
if ((attach_tty = ttyname(0)) == 0)
attach_tty = "";

Taj Morton <tajmorton>
Mon 24 Sep 2012 05:40:35 PM UTC, original submission:

In a multiuser environment, it seems that the -X option simply ignores the specified user and looks for the session in the current user's environment.


As user1, start a session and turn on multiuser mode

screen -S myscrn
^A:multiuser on
^A:acladd user2

As user2, test the session with ls, then try to use stuff.

screen -S user1/myscrn -ls
screen -S user1/myscrn -X stuff "shutdown"

stuff fails to send characters to the screen session specified by -S What should happen is that user1's screen session receive input from 'stuff'

Lars Noodén <larsnooden>


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

Attach Files:

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 peepo (Posted a comment)
  • -email is unavailable- added by tajmorton (Posted a comment)
  • -email is unavailable- added by larsnooden (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3