Tag: xserver

Java无法使用“localhost:10.0”作为DISPLAYvariables的值连接到X11窗口服务器

我有一个脚本使用java来连接到本地端口10.0端口显示X11 但我总是这个错误 java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:62) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:178) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:142) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:112) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.Toolkit$2.run(Toolkit.java:849) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841) at ij.io.Opener.openJpegOrGif(Opener.java:367) at ij.io.Opener.openImage(Opener.java:220) […]

wkhtmltopdf:无法连接到X服务器

我一直在使用wkthmltopdf在我的Linuxnetworking服务器上即时将html转换为pdf文档。 该程序最初需要X11或类似的X服务器才能正常运行,但是通过开发人员的许多请求,让它在没有GUI的服务器上运行,我确信它在静态版本中运行虚拟X服务器。 我一直在使用该程序的静态(独立)版本,它的效果很好! 我会把可执行文件放在一个文件夹中,然后运行: ./wkhtmltopdf file1.html file2.pdf 不过,我想在整个系统上安装这个程序。 我使用了apt-get install wkhtmltopdf (昨天刚刚安装),由于我在64位系统上运行,我还需要apt-get install ia32-libs 。 安装后我可以find这样的版本: wkhtmltopdf –version 输出: Name: wkhtmltopdf 0.9.9 License: Copyright (C) 2008,2009 Wkhtmltopdf Authors. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the […]