How to Prevent Adobe Reader’s RPM File from Installing the Browser Plugin

Adobe provides an RPM file for installing the Linux version of Adobe Reader. Unfortunately, this RPM file automatically installs the Reader’s browser plugin, which I find quite annoying. I created a simple snippet of Bash code that modifies Adobe’s original RPM file by uncommenting the line that installs the browser plugin. It is designed for (and tested on Fedora 10 with) version 9.1.0-1 of the AdobeReader_enu package (file name AdbeRdr9.1.0-1_i486linux_enu.rpm). Just open a shell, change to the directory where you downloaded Adobe’s RPM to, and run the following code. If you don’t have the rpmrebuild tool installed yet, you will need to do so before running the code.

RPM_ORG=AdbeRdr9.1.0-1_i486linux_enu.rpm
NEWRELEASE="1new"

PATCHDIR=`mktemp -d`
export RPMREBUILD_TMPDIR=`mktemp -d`

cat <<"EOF" >$PATCHDIR/install_browser_plugin.patch
--- post.1
+++ post.1.patched
@@ -224,1 +224,1 @@
-"$ReadInstallDir/Adobe/Reader9/Browser/install_browser_plugin" -silent -global -user "$ReadInstallDir" >/dev/null 2>&1
+#"$ReadInstallDir/Adobe/Reader9/Browser/install_browser_plugin" -silent -global -user "$ReadInstallDir" >/dev/null 2>&1
EOF

setarch i386 rpmrebuild --release=$NEWRELEASE --change-files="patch $RPMREBUILD_TMPDIR/work/post.1 $PATCHDIR/install_browser_plugin.patch" --directory=. --package $RPM_ORG
rm -f $RPMREBUILD_TMPDIR
rm -rf $PATCHDIR

The new RPM will be saved to the subdirectory i486 of the current directory.

To install the browser plugin afterwards, run /opt/Adobe/Reader9/Browser/install_browser_plugin as root. To remove the browser plugin, delete the file /usr/lib/mozilla/plugins/nppdf.so.

This entry was posted in RPMs. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *