Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need help with x11 device

45 views
Skip to first unread message

mario moro

unread,
Nov 27, 2022, 12:28:50 PM11/27/22
to
in debian
gs version 10.00.0
x11 device is not loaded
it seems it is seen, because strace gives:
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/ghostscript/10.00.0/X11.so", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
but then, it is not diplayed in the devices' list.
Any idea?
thx

ken

unread,
Nov 28, 2022, 9:57:51 AM11/28/22
to
In article <da1479d3-914f-4923...@googlegroups.com>,
rbma...@gmail.com says...
If the x11 device isn't listed when you do gs --help then the binary has
been built without X11 support.

If you want X11 then you're going to have to build from source yourself,
with the X development libraries available. Or bug the package
maintainer about it; it's entirely possible there is a good reason why
they built a Ghostscript package without X11 support.


mario moro

unread,
Nov 28, 2022, 11:34:57 AM11/28/22
to

> If the x11 device isn't listed when you do gs --help then the binary has
> been built without X11 support.
>
> If you want X11 then you're going to have to build from source yourself,
> with the X development libraries available. Or bug the package
> maintainer about it; it's entirely possible there is a good reason why
> they built a Ghostscript package without X11 support.
Thx,
I'm using debian, and installed the related packages, with strace I see that the library X11.so, is located and opened.

James Cloos

unread,
Nov 28, 2022, 12:36:41 PM11/28/22
to
try:

apt install ghostscript-x

-JimC
--
James Cloos <cl...@jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6

mario moro

unread,
Nov 28, 2022, 12:48:05 PM11/28/22
to
Il giorno lunedì 28 novembre 2022 alle 18:36:41 UTC+1 James Cloos ha scritto:
> try:
>
> apt install ghostscript-x
>
thanks, but already done

James Cloos

unread,
Nov 29, 2022, 12:36:50 AM11/29/22
to
c>> apt install ghostscript-x

m> thanks, but already done

in that case you should use reportbug to send debian a bug report that
the ghostscript-x fails to work for the 10.0.0 version(s).

and you should try out the 'display' device until they fix the x11
devices.

the bug ust be in the packaging.

mario moro

unread,
Nov 30, 2022, 5:00:53 AM11/30/22
to
thanks
> in that case you should use reportbug to send debian a bug report that
> the ghostscript-x fails to work for the 10.0.0 version(s).
>
already done weeks ago, no answer
> and you should try out the 'display' device until they fix the x11
> devices.
>
this device gives nothing, in the docs they talk about gtk, but maybe that require a compilation with different configuration, other distributions have/had ghostscript-gtk, or gsx ; they are not in debian

ken

unread,
Nov 30, 2022, 9:00:53 AM11/30/22
to
In article <6d84aa41-6ed9-48ec...@googlegroups.com>,
rbma...@gmail.com says...
What devices do you actually see when you do "gs --help" ?

As I said previously if the X11 devices (there should be 9 or 10) are
not listed then the binary has been created without X11 support. There
may be a reason why the packager has dropped X, perhaps Debian has
deprecated it for instance.

The display device won't work without the x11 device, it will do nothing
(as you;ve discovered).

If you want a gtk+ build then yes, you need to compile Ghostscript
differently to get that (and then the display device will use it rather
than X). You can either build from source or ask your package maintainer
if it is available for your distro.

If your package includes neither X nor gtk+ well I don't think you can
use Ghostscript as a viewer.

Ken

mario moro

unread,
Nov 30, 2022, 11:08:43 AM11/30/22
to
> What devices do you actually see when you do "gs --help" ?
I installed the 9.56 version (from old packages, and big use of LD_LIBRARY_PATH ...)
and the version 10.00.0; the ghostscript package, and the ghostscript-x that contains the x11 device X11.so
in version 10 'gs -h' is missing the x11 device, that is used by gv and the dvi previewer.
What puzzle me is that the X11.so is found and opened (verified with strace) but then the x11 device is not reported, I'd like to know what went wrong.
In debian a maintainer is currently missing, and maybe they have more important bugs to look after.

ken

unread,
Dec 1, 2022, 3:02:58 AM12/1/22
to
In article <9c368d51-2d78-484c...@googlegroups.com>,
rbma...@gmail.com says...

> in version 10 'gs -h' is missing the x11 device, that is used by gv
and the dvi previewer.

Then nthe binary has been built without X support.

> What puzzle me is that the X11.so is found and opened (verified with strace) but then the x11 device is not reported, I'd like to know what went wrong.

The person who built the binary either specifically excluded X support
with a build option, or did not have the required development libraries
available on their system when they ran autotools, and so the X support
could not be built in.

> In debian a maintainer is currently missing, and maybe they have more important bugs to look after.

Well you can always build Ghostscript from source yourself.


Ken

mario moro

unread,
Dec 1, 2022, 11:39:33 AM12/1/22
to
thanks
Il giorno giovedì 1 dicembre 2022 alle 09:02:58 UTC+1 ken ha scritto:
> > What puzzle me is that the X11.so is found and opened (verified with strace) but then the x11 device is not reported, I'd like to know what went wrong.
> The person who built the binary either specifically excluded X support
> with a build option, or did not have the required development libraries
> available on their system when they ran autotools, and so the X support
> could not be built in.
ldd X11.so
linux-vdso.so.1 (0x00007ffd4f514000)
libXt.so.6 => /lib/x86_64-linux-gnu/libXt.so.6 (0x00007f93ee7cd000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f93ee68b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f93ee4aa000)
libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007f93ee49f000)
libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007f93ee481000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f93ee455000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f93ee450000)
/lib64/ld-linux-x86-64.so.2 (0x00007f93ee869000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f93ee447000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f93ee42d000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f93ee428000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f93ee200000)

> > In debian a maintainer is currently missing, and maybe they have more important bugs to look after.
> Well you can always build Ghostscript from source yourself.
Yes I'm going to do that, any advice for building a minimal gs with x11 support?

ken

unread,
Dec 1, 2022, 12:03:28 PM12/1/22
to
In article <0293ef51-165a-4b37...@googlegroups.com>,
rbma...@gmail.com says...

> > Well you can always build Ghostscript from source yourself.
> Yes I'm going to do that, any advice for building a minimal gs with x11 support?

Sorry that's not really my field, I'm not the build maintainer. I just
do ./autogen.sh followed by make or make debug. You can delete
directories for features you don't want (Leptonica, Tesseract, maybe
others). If you want to use system shared libraries (FreeType, OpenJPEG
etc) then you need to set options but I know nothing about that.

Ken

Anthk

unread,
Dec 15, 2022, 6:15:43 AM12/15/22
to
I am not a Debian user but it should be easy. Enable the deb-src repos
in /etc/apt/sources.list. Basically copy your current ones replacing deb
https://foo.ba... with deb-src https://foo.bar... and install apt-src.
With apt-src and debhelper/dh_make you can rebuild your package
with custom changes in a easy way.

David Newall

unread,
Dec 29, 2022, 1:27:41 AM12/29/22
to mario moro
Could it be that DISPLAY is not set?

$ unset DISPLAY
$ gs
GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
GPL Ghostscript 9.50: Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.
0 new messages