限制 x11vnc 中的键盘快捷键
如何限制 x11vnc 中的键盘快捷键选项? 例如,我想限制 Alt+F4、Alt+x、Ctrl+Q 等。
-skip_keycodes 选项在这里有什么帮助吗?
How can I restrict keyboard shortcut options in x11vnc?
for example, I want to restrict Alt+F4, Alt+x, Ctrl+Q, etc.
Is -skip_keycodes option of any help here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在窗口管理器中配置此类快捷方式。这样,此类快捷方式就不会传递给应用程序,您应该能够处理它们。
但是,由于您似乎希望应用程序始终运行(您希望阻止用户关闭它),因此编写一个像这样的简单脚本可能是一个好主意:
这样,如果应用程序崩溃或关闭,它被重新启动。 (要小心那些自行分叉或与终端分离的应用程序!)
另一方面,如果您只需要一个浏览器,则可以尝试使用 Opera 浏览器的 kiosk 模式。另请参阅维基百科上的信息亭软件。
更新:所以你正在使用 Gnome...我不使用 Gnome,但在 SuperUser 上快速搜索给出了我这个答案:
但是...您确定要在那里运行 Gnome 环境吗?您真的希望用户能够从您的 Gnome 界面运行和配置任何内容吗?也许您更喜欢另一个更简约的窗口管理器。哪一个?我不确定,必须看看有哪些替代方案并尝试其中的一些。根据应用程序的不同,甚至可以在没有窗口管理器的情况下运行它。
我不知道您要解决什么类型的问题,但也许在网页中使用 VNC 小程序来访问一个应用程序可能不是最好的解决方案。当然,这取决于问题是什么以及用户是谁。
You can probably configure such shortcuts in your window manager. That way, such shortcuts won't be passed to the application, and you should be able to handle them.
But, since you seem to want an application running all the time (you want to prevent users from closing it), then it might be a good idea to write a simple script like this:
That way, if the application crashes or is closed, it is restarted. (be careful about applications that fork themselves or detach from the terminal!)
On the other hand, if you just want a browser, you can try using the kiosk mode from Opera browser. See also kiosk software at Wikipedia.
Update: So you are using Gnome... I don't use Gnome, but a quick search at SuperUser gave me this answer:
But... Are you sure you want a Gnome environment running there? Do you really want users to be able to run and configure anything from your Gnome interface? Maybe you would prefer another more minimalistic Window Manager. Which one? I'm not sure, must look what are the alternatives and try some of them. Depending on the application, it might even be possible to run it with no window manager at all.
I don't what kind of problem you are trying to solve, but maybe using a VNC applet in a webpage in order to have access to one application might not be the best solution. Of course, it depends on what is the problem and who are the users.