Skip to content

Instantly share code, notes, and snippets.

@cho2
Last active April 20, 2023 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cho2/79964a49a4f5f545853d3ebdfd1efe73 to your computer and use it in GitHub Desktop.
Save cho2/79964a49a4f5f545853d3ebdfd1efe73 to your computer and use it in GitHub Desktop.
Install Adobe Reader on openSUSE Leap 15.0. Adobe Reader is no longer supported by Adobe on Linux and accordingly it can no longer be supported by openSUSE. Using an outdated Adobe Reader version is a security risk. (https://en.opensuse.org/Adobe_Reader)
$ sudo zypper in libgdk_pixbuf-2_0-0-32bit libgtk-x11-2.0.so.0 libcanberra-gtk0-32bit libcanberra-gtk2-module-32bit libcanberra-gtk3-module-32bit libcanberra-gtk3-0-32bit firefox
$ wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.bin
$ chmod u+x AdbeRdr9.5.5-1_i486linux_enu.bin
$ sudo ./AdbeRdr9.5.5-1_i486linux_enu.bin
$ cd /opt/Adobe/Reader9/bin
$ sudo nano acroread
### Fixed with https://gist.github.com/bohoomil/1439487/e013835b03eedf49a6bbb1bc6bad3beb78bc00e7 (see https://bugzilla.novell.com/show_bug.cgi?id=574580#c0 for details)
$ acroread
@msohni
Copy link

msohni commented Jun 2, 2019

Very nice, thanks!

But, at least on openSUSE Leap 15.1 (i.e. the next version) this core-dumps with a "Segmentation fault".
Since I love the "print current view" function that to my knowledge only Adobe's own PDF-readers provide, I needed to make this work.
(It appears that the library libxcb.so.1 is causing the problem.)

Here is what I did (like "cho2" I assume the default installation location below /opt/Adobe/Reader9):

  1. Ran ldd(1) on the binary for acroread. Saved its output.
  2. Used the output from 1. to copy all libraries needed by acroread from an openSUSE Leap 42.3 installation into a new directory
    /opt/Adobe/Reader9/Reader/intellinux/lib.oldOS (by using cp(1), the actual libraries got copied and not the symb-links to them!).
  3. Created yet another directory /opt/Adobe/Reader9/Reader/intellinux/lib2
  4. Then created the following symbolic links in the lib2 directory:

ld-linux.so.2 -> ../lib.oldOS/ld-linux.so.2
libatk-1.0.so.0 -> ../lib.oldOS/libatk-1.0.so.0
libc.so.6 -> ../lib.oldOS/libc.so.6
libdl.so.2 -> ../lib.oldOS/libdl.so.2
libexpat.so.1 -> ../lib.oldOS/libexpat.so.1
libgbm.so.1 -> ../lib.oldOS/libgbm.so.1
libgio-2.0.so.0 -> ../lib.oldOS/libgio-2.0.so.0
libglib-2.0.so.0 -> ../lib.oldOS/libglib-2.0.so.0
libm.so.6 -> ../lib.oldOS/libm.so.6
libpango-1.0.so.0 -> ../lib.oldOS/libpango-1.0.so.0
libpangocairo-1.0.so.0 -> ../lib.oldOS/libpangocairo-1.0.so.0
libpangoft2-1.0.so.0 -> ../lib.oldOS/libpangoft2-1.0.so.0
libpthread.so.0 -> ../lib.oldOS/libpthread.so.0
libresolv.so.2 -> ../lib.oldOS/libresolv.so.2
libxcb.so.1 -> ../lib.oldOS/libxcb.so.1

  1. Edited the shell script /opt/Adobe/Reader9/bin/acroread as follows:

Replaced line 22

exec ${1+"$@"}

with

exec $ACRO_INSTALL_DIR/$ACRO_CONFIG/lib2/ld-linux.so.2 ${1+"$@"}

and replaced line 560 (this is one very long line with the only spaces after the word prependand just before "${LD_LIBRARY_PATH}"`")

LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars:${MOZILLA_COMP_PATH}" "${LD_LIBRARY_PATH}"`"

with

LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars:${MOZILLA_COMP_PATH}:$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib2" "${LD_LIBRARY_PATH}"`"

What's happening here, is that the new lib2 directory, which contains all that is needed, is added to the LOAD_LIBRARY_PATH with the result that some 15 libraries are loaded from Leap 42.3 instead of from 15.1. The change to the exec command makes sure that a program loader is used that is compatible with them.

Acroread will now issue a few GTK warnings (if invoked from the command line) but otherwise works.

If in future further current libraries become incompatible with this ancient version of Acrobat Reader, additional symbolic links into the lib.oldOS directory can be added to lib2. This should only stop working once the old libraries just won't work with a new kernel any more at all!

@msohni
Copy link

msohni commented Jun 9, 2019

In the meantime, I found that another shared library needs to be added to the list above, even though it does not appear in the output from ldd(1).
When trying to print from acroread, only "Custom ..." is available as a printer. For acroread to see the CUPS-configured printers, it calls libcups.so.2. So an older version of that library, too, has to be copied over from the old OS installation and linked in like the others above:

libcups.so.2 -> ../lib.oldOS/libcups.so.2

Only then will the printers appear in acroread's "Print..." dialog.

@suseuser04
Copy link

Hello:

I use openSUSE Leap 15.1 too and want to install Adobe Reader 9.5.5.
I followed the steps above: I copied openSUSE Leap 42.3 32-bit libraries under lib.oS423 and modified the acroread script accordingly. Adobe Reader now runs nicely. But the printers are not shown in Reader's print window, only the text "Custom", as it is said above.
I also copied libcups.so.2 (32-bit) from Leap 42.3 but it did not help. Still no printers. Any idea how could I solve it?

Thanks,

suseuser04

@lproven
Copy link

lproven commented Jun 5, 2020

This may help:

https://hub.docker.com/r/mgor/acroread/

I needed this command line to invoke it:
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/myusername:/mnt/mydata mgor/acroread

@chrizneko
Copy link

Many thanks! This really helped me.

For people out there that maybe as clueless as me, I created the appimage out from here to simplify the works needed (Even though it is still a sloppy work). Details on https://github.com/chrizneko/acroreadsuse15

@cho2
Copy link
Author

cho2 commented Apr 20, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment