当显示器只是噪声时,DISPLAY / A / dev / null等同

前端之家收集整理的这篇文章主要介绍了当显示器只是噪声时,DISPLAY / A / dev / null等同前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在运行一个java应用程序,它创建一个可视化显示它正在做的一些事情,而它正在做它.但是,我想在一个没有显示附加的脚本中运行它.在当前的环境中,甚至没有设置一个DISPLAY环境变量.我试图简单地将我的DISPLAY设置为:0.0.但这不存在.我真的不在乎显示器.我只是想让应用程序静默地处理文件.

由于我不能只是关闭显示屏(不是我的应用程序),所以我想要摆脱显示的需要.

有没有黑洞,我可以发送DISPLAY到?相当于/ dev / null?

我在网上搜索了一下,但是我可以想到使用的词语:“显示”“null”“忽视”等都是两个通用的,让我得到一个答案.

这是一个较大的脚本的中间,所以我希望其余的输出stdout可用.

解决方法

有一个名为 Xvfb的无头X服务器.它基本上是您需要的,因为它接受X客户端,但基本上与其中的数据无关.从那个链接页面(略改写):

Xvfb,the X virtual framebuffer,is a display server implementing the X11 display server protocol.

In contrast to other display servers,Xvfb performs all graphical operations in memory without showing any screen output.

From the point of view of the client,it acts exactly like any other X display server,serving requests and sending events and errors as appropriate. However,no output is shown.

This virtual server does not require the computer it is running on to have a screen or any input device. Only a network layer is necessary.

如果找不到,那么另一个可能性就是使用一台配备完整的CygWin安装的备用电脑. CygWin带有一个完整的X服务器,您可以将应用程序连接到(并且忽略它).您甚至可以将其设置为公司/ dev / null DISPLAY.

但是我先看看Xvfb.

原文链接:https://www.f2er.com/css/217167.html

猜你在找的CSS相关文章