LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-06-2012, 01:13 AM   #16
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,795

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803

@pdi: mozplugger is still a very nice util. It can embedded pretty much any app as a plugin and hence would be a better choice for a non-KDE user, but there is more messing around with its config files.
 
Old 07-06-2012, 10:47 AM   #17
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,208

Rep: Reputation: 176Reputation: 176
Well.... you could just download the .bin file from Adobe, install it and then run the script that comes with it?

Or, you can manually move the plug-in from /opt/Adobe/Reader9/Browser/intellinux to wherever it is needed.

Quote:
Adobe Reader 9.1 -- Browser Plugin HowTo

The browser plugin provided along with the Adobe Reader 9.1 is used
for viewing of PDF files from within the browser. It is compliant with
the Netscape Gecko API and works with all browsers which use the Gecko
browser engine. It will enable viewing of PDFs as full page documents
in the browser or within frames managed by HTML content.

The supported browsers include:
o Firefox 2.0 or higher



Installing the browser plugin:

An installation script "install_browser_plugin" has been provided for
the purpose of setting up the browser plugin for your browser.

o Run the script from the prompt as:
$ cd <install-path>/Browser
$ ./install_browser_plugin

o When prompted for the Adobe Reader 9.1 install path, manually enter
the installation path or press ENTER to use the default specified.

o Next you will be presented a menu to perfom global or user-specific
installation.

o In global installation, the script automatically searches the
PATH variable and some default directories for all the supported
browsers and installs the plugin for all those which are found.

o User-specific installation: This has been tested to work for
Mozilla, Firefox and enables only a particular user to be able to view
PDFs inside any of the browsers stated above. This is done by copying
the necessary files to $HOME/.mozilla/plugins folder.

o If you are unable to install the plugin for your browser by any of
the above mentioned mechanisms, you might need to refer to the
browser documentation for ways of adding a new plugin.

o After the installation succeeds, please make sure that the acroread
startup script is in the PATH environment variable.



TroubleShooting:

Problem -

Unable to load PDF in browser
OR
Clicking on a PDF link in the browser shows a blank page

Solution (any one of the following) -

1. Make sure you have installed the plugin in the correct place. To
verify loading of the plugin in Mozilla/Firefox, type
'aboutlugins' in the address bar and verify that Adobe Reader 9.1
is showing in the list.

2. Make sure acroread is in the PATH of the shell which was used to
launch the browser. This can be done by running the command 'which
acroread' from the shell which was used to launch the browser. If
it is not found, locate acroread and add it to the PATH variable in
the environment.

3. Make sure there is no other plugin installed which can handle the
PDF mime type. To view all plugins that have loaded in
Mozilla/Firefox, type 'aboutlugins' in the address bar. In the
list of plugins displayed, verify that there is no entry other than
Adobe Reader 9.1 which is handling PDF.

- At times there is a plugin called Plugger/Mozplugger which also
handles PDF files. To correct this, open the file '/etc/mozpluggerrc'
and remove the lines corresponding to PDF mime type. Then remove the
file 'pluginreg.dat' from $HOME/.mozilla folder and restart the
browser.

- If you find an entry corresponding to "KDE Parts Plugin", you will
need to remove the plugin file (libdragonegg.so) from the plugins
folder in order to use Adobe Reader as the default PDF viewer. However
deletion of the plugin file would mean that you might loose some
additional functionality provided by the KDE Parts Plugin.


For queries or more information, please visit us at www.adobe.com

Copyright (c) 2009, Adobe Systems Incorporated
All Rights Reserved
 
Old 07-09-2012, 06:23 AM   #18
glupa4e
Member
 
Registered: Jan 2011
Posts: 96

Original Poster
Rep: Reputation: 0
Guys,
thank you very much for your suggestions. Now i seem to have a problem with installing KParts plugin using CMAKE.
What i did:
1. Downloaded the package from here : http://www.unix-ag.uni-kl.de/~fischer/kpartsplugin/
2. Unarchived the package
3. Then i ran something like cmake -i /path to the unarchived kparts package - the package was built
4. Next i ran 'make'
5. Finally i ran 'make install'

I restarted FF and i could not see the PDF within the browser.

To be honset, this was the forst time for me using CMAKE and i was not even sure if i am doing it properly.

When i ran : find / -name *kparts*

i got:
/usr/local/share/kde4/services/kcm_kpartsplugin.desktop
/usr/local/lib64/kde4/kcm_kpartsplugin.so
/usr/share/apps/pykde4/examples/kpartsExamples
/usr/share/sip/PyKDE4/kparts
/usr/share/sip/PyKDE4/kparts/kpartsmod.sip
/usr/share/kde4/services/ScreenSavers/kpartsaver.desktop
/usr/include/smoke/kparts_smoke.h
/usr/include/kparts
/usr/include/kparts/kparts_export.h
/usr/lib64/nsbrowser/plugins/libkpartsplugin.so
/usr/lib64/libkparts.so
/usr/lib64/libkparts.so.4.5.0
/usr/lib64/python2.6/site-packages/PyKDE4/kparts.so
/usr/lib64/libsmokekparts.so
/usr/lib64/libsmokekparts.so.3
/usr/lib64/libsmokekparts.so.3.0.0
/usr/lib64/libkparts.so.4
/usr/lib64/kde4/kpartsdesignerplugin.so
/usr/bin/kpartsaver.kss

/root/src/kpartsplugin.moc
/root/src/moc_kcm_kpartsplugin.cpp
/root/src/CMakeFiles/kcm_kpartsplugin_automoc.dir
/root/src/CMakeFiles/kpartsplugin_automoc.dir
/root/src/CMakeFiles/kcm_kpartsplugin.dir
/root/src/CMakeFiles/kcm_kpartsplugin.dir/kcm_kpartsplugin.o
/root/src/CMakeFiles/kcm_kpartsplugin.dir/kcm_kpartsplugin_automoc.o
/root/src/CMakeFiles/kpartsplugin.dir
/root/src/CMakeFiles/kpartsplugin.dir/kpartsplugin_automoc.o
/root/src/CMakeFiles/kpartsplugin.dir/kpartsplugin.o
/root/src/kcm_kpartsplugin_automoc.cpp
/root/src/kcm_kpartsplugin_automoc.cpp.files
/root/src/kpartsplugin_automoc.cpp
/root/src/kpartsplugin_automoc.cpp.files
/root/lib/libkpartsplugin.so
/root/lib/kcm_kpartsplugin.so

I installed it using CMAKE as root but i am actually using FF not as root but as another user.

Any idea if i have done it correct?

@cwizardone : I did what you advised me in the very beginning. I have this library in
/opt/Adobe/Reader9/Browser/intellinux/nppdf.so

The problem is that i do not know where to copy it.

aboutlugins is not listing Adobe PDF as a recognized plugin in FF.

Something more:

bash-4.1$ which acroread
/usr/bin/acroread


I neither have mozzplugger in the plugins list, nor K Parts Plugin.

Thank you!

Last edited by glupa4e; 07-09-2012 at 06:37 AM.
 
Old 07-09-2012, 06:54 AM   #19
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,795

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
@glupa4e: I'm running 32-Bit Slackware and use Opera as my browser. This is what I did.

Extracted source:
Code:
tar xf kpartsplugin-20120605.tar.bz2
cd kpartsplugin-20120605
Compiled as follows:
Code:
cmake -DNSPLUGIN_INSTALL_DIR="/usr/lib/opera/plugins/"
Installed with:
Code:
make install
This installed the following files, in these locations:

/usr/lib/opera/plugins/libkpartsplugin.so
/usr/local/lib/kde4/kcm_kpartsplugin.so
/usr/local/share/kde4/services/kcm_kpartsplugin.desktop
 
1 members found this post helpful.
Old 07-09-2012, 07:00 AM   #20
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,795

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
I knew what to do because I read the documentation. Something I would generally advise.

Quote:
Originally Posted by README.txt
You can control the installation directory by defining the variable
NSPLUGIN_INSTALL_DIR when calling cmake.
Example:
cmake -DNSPLUGIN_INSTALL_DIR=/usr/lib128/nsbrowser/plugins/
By default, the plugin will get installed to
/usr/lib/nsbrowser/plugins/ on 32-bit architectures and
/usr/lib64/nsbrowser/plugins/ on 64-bit architectures.
If you want to track what has been installed run a find command before and after install and diff the results. Or better yet use slacktrack (included with Slackware) or src2pkg.
 
1 members found this post helpful.
Old 07-09-2012, 08:35 AM   #21
glupa4e
Member
 
Registered: Jan 2011
Posts: 96

Original Poster
Rep: Reputation: 0
Dear ruario,

i followed the instructions from Readme.txt. It seems that the script has not installed the library in the proper path in my case. What i did. I listed all the plugins in FF:

Code:
about:plugins
I saw the flashplayer plugin was located under:
Code:
/usr/lib64/mozilla/plugins/libflashplayer.so
Then i assumed the path should be the same for K Parts Plugin also. Following your post i navigated to the folder where i had unarchived the kpartsplugin. When i got into it, i ran:
Code:
cmake -DNSPLUGIN_INSTALL_DIR=/usr/lib64/mozilla/plugins/
When the build was ready, i installed as you had advised me:
Code:
make install
After those commands i noticed that there was a new file:
Code:
/usr/lib64/mozilla/plugins/libkpartsplugin.so
After that i checked if the newly installed plugin was listed in
Code:
about:plugins
Luckily it was!

Now, guess what, i am able to view the original page i could not view in the beginnig.

Thank you very much to all of you for the help!
 
Old 07-09-2012, 01:19 PM   #22
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,795

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
cool, glad it worked out for you in the end!
 
Old 07-09-2012, 11:42 PM   #23
pdi
LQ Newbie
 
Registered: May 2008
Posts: 27

Rep: Reputation: 18
I had put together these files for personal use modifying the SlackBuilds templates. Feel free to adapt as required.

[Updated to include ruario's suggestion]

kpartsplugin.SlackBuild

Code:
#!/bin/sh

# Slackware build script for kpartsplugin

# Written by (your name) (your contact information)

# (add license information here if you desire; otherwise,
# all submissions are considered to be in the public domain)
# Some licenses may incorporate the "Written by" information
# above, and if so, that line can be omitted
# We strongly suggest *not* using GPL for scripts, as it requires
# a copy of the GPL to be distributed with it.  Since the GPL
# itself is longer than any build script will be, this just doesn't
# make good sense...

PRGNAM=kpartsplugin                     # replace with name of program
VERSION=${VERSION:-20120605}    # replace with version of program
BUILD=${BUILD:-1}
TAG=${TAG:-_pdi}                # the "_SBo" is required                                                                                          
                                                                                                                                                  
# Automatically determine the architecture we're building on:                                                                                     
if [ -z "$ARCH" ]; then                                                                                                                           
  case "$( uname -m )" in                                                                                                                         
    i?86) ARCH=i486 ;;                                                                                                                            
    arm*) ARCH=arm ;;                                                                                                                             
# Unless $ARCH is already set, use uname -m for all other archs:                                                                                  
       *) ARCH=$( uname -m ) ;;                                                                                                                   
  esac                                                                                                                                            
fi                                                                                                                                                
                                                                                                                                                  
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}            # For consistency's sake, use this
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}          # Drop the package in /tmp

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e # Exit on most errors

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

# Your application will probably need different cmake flags; these are only
# examples.  You might use 'ccmake' to see the available flags...
mkdir -p build
cd build
  cmake \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
    -DMAN_INSTALL_DIR=/usr/man \
    -DNSPLUGIN_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/mozilla/plugins/ \
        ../
  make
  make install DESTDIR=$PKG
cd ..

# Strip binaries and libraries - this can be done with 'make install-strip'
# in many source trees, and that's usually acceptable, if not, use this:
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system.  If this is not needed,
# remove it from the script.
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true

# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Make the package; be sure to leave it in $OUTPUT
# If package symlinks need to be created during install *before*
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

slack-desc

Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

            |-----handy-ruler------------------------------------------------------|
kpartsplugin: kpartsplugin (Browser Plugin using KDE Technology)
kpartsplugin:
kpartsplugin: This software implements a plugin for Netscape-compatible browsers
kpartsplugin: in Unix environments. This plugin uses KDE's KParts technology to
kpartsplugin: embed file viewers (e.g. for PDF files) into non-KDE browsers.
kpartsplugin: Tested browsers include both Mozilla Firefox and Opera, and is known
kpartsplugin: to work with Chrome and Arora. With this plugin, you can e.g. view
kpartsplugin: PDF files in Firefox using Okular as an embedded plugin.
kpartsplugin: 
kpartsplugin: home http://www.unix-ag.uni-kl.de/~fischer/kpartsplugin/
kpartsplugin:

Last edited by pdi; 07-10-2012 at 04:08 AM.
 
Old 07-10-2012, 12:55 AM   #24
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,795

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
You don't need to do that with the doinst.sh. It is over complex and will mean that a broken symlink is left behind should you ever uninstall the package.

Instead of a doinst.sh, just set the following in the build script:

-DNSPLUGIN_INSTALL_DIR=/usr/lib{LIBDIRSUFFIX}/mozilla/plugins/
 
Old 07-10-2012, 01:27 AM   #25
pdi
LQ Newbie
 
Registered: May 2008
Posts: 27

Rep: Reputation: 18
@ruario: Thanks for the correction, it was bugging me too.

Last edited by pdi; 07-10-2012 at 04:11 AM. Reason: [I updated the previous post incorporating the correction.]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Opening PDF files with Adobe Reader in 13.37 jackmule Slackware 5 04-29-2012 10:40 AM
PDF Files Aren't Being Opened with Adobe Reader swamprat Linux - Newbie 2 06-17-2011 08:06 PM
Slim free PDF Reader as alternative to Adobe Reader cccc Debian 6 10-14-2010 02:51 PM
Adobe Reader failed to display PDF DavidMcCann Linux - Software 1 06-23-2009 03:14 PM
installing adobe pdf reader arnon Linux - Software 5 01-03-2007 03:56 PM


All times are GMT -5. The time now is 06:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration