如何心跳X11屏幕保护程序? [英] How to heartbeat X11 screensaver?

查看:41
本文介绍了如何心跳X11屏幕保护程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

X11 有一个屏幕保护机制,可以通过 xset 命令控制.无需调用外部命令来禁用或心跳屏幕保护程序,从我的 X11 应用程序内部,我怎样才能心跳屏幕保护程序机制以防止它关闭显示器?

X11 has a screensaver mechanism that can be controlled by xset command. Without having to invoke the external command to disable or heartbeat the screensaver, from inside my X11 application, how can I heartbeat the screensaver mechanism so to prevent it from shutting down the monitor?

推荐答案

如果这是在现代 Linux 系统上,首选的 FreeDesktop 方法是 ping DBus 接口,特别是 org.freedesktop.ScreenSaver.SimulateUserActivity() 或公开界面的其他部分,具体取决于您的需要.

If this on a modern Linux system, the preferred FreeDesktop method is to ping the DBus interface, specifically org.freedesktop.ScreenSaver.SimulateUserActivity() or another part of the exposed interface, depending on your needs.

这篇关于如何心跳X11屏幕保护程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆