2

What I'm trying to do is spawn a detached screen session, but as part of the command line that creates it - also modify the ACL list.

So right now I have

screen -dmS MySession "SomeProgram" "SomeArguments"

If I want to modify the ACL of MySession to give another user access to it, I'd have to run a second screen command to run a 'screen' command on that session.

What I need to do is modify the ACL as part of the initial command line used to spawn the session. Is there a way to do this?

PhonicUK
  • 123
  • 7

1 Answers1

4

Put the ACLs in a seperate screenrc and load that with -c:

e.g.: /opt/multi-screen-rc

multiuser on
acladd user1
acladd user2

Then run like this:

screen -c /opt/multi-screen-rc -dmS MySession /usr/bin/foo bar baz
fuero
  • 9,591
  • 1
  • 35
  • 40