简体   繁体   中英

How to make GNU-Screen share 1 Screen for all Users?

How can I start a Screen that is accesable as Root-User and Default-User? Because now when I start a Screen as Default-User with the command:

screen -dmS test java $JAR nogui

After executing the command and logging in into Root-User and try to use

screen -x test

It will say, it doesn't exist, because Screen are User-Bound, AFAIK.

So is there a way that the screen is shared to all users ? So I can attach the Screen by the Screen name from any user.

You can enable multiuser, and add the permitted user to your list, like this:

# userA opens a screen
screen -S test

# set multiuser
Ctrl-A :multiuser on

# add the user to join your session to the ACL list:
Ctrl-A :acladd root

then

# root get the screen by userA
screen -x userA/test

This and this are recommend.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM