Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用它的参数 -display 制作了诸如“进入睡眠”、“打开窗口”、“关闭窗口”等 cron 命令来弹出 xmessage。通常 -display :0.0 会产生所需的结果,但有时我会使用多个 X 屏幕(:0.1、:0.2 ..),因此我会错过这些消息。
有没有办法找出哪个 X 会话处于活动状态,就像那个用户当时正在查看那个会话一样?
尝试使用命令who -t,甚至只是w
这些命令将为您提供有关控制台和 X 服务器的信息