2012-12-19 32 views
5

如何启动可作为根用户和默认用户访问的屏幕? 因为现在当我启动屏幕为默认用户使用命令:如何为所有用户制作GNU-Screen共享1屏幕?

screen -dmS test java $JAR nogui 

执行命令并登录到根用户后,并尝试使用

screen -x test 

它会说,它不存在,因为屏幕是用户绑定的,AFAIK。

那么有没有办法让屏幕共享给所有用户? 所以我可以通过任何用户的屏幕名称附加屏幕。

回答

9

您可以启用多用户,并允许用户添加到列表中,这样的:

# 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 

然后

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

Thisthis的建议。