Page 1 of 1

Popup "open with" or "save as" [Solved]

Posted: 29 Aug 2014, 12:47
by loukamoulox
Hi,
So i have a kiosk in a free access area, where customers can print some docs.
and i got a problem today : when i clicked on a pdf link, usually it shows the popup where you choose if you want to "save as" or "open with", but here, it didnt, so the docs cannot be printed.
How can i solve this problem ? able popup on this particular url ?

thanks :)

Re: Popup "open with" or "save as"

Posted: 29 Aug 2014, 13:55
by fanthom
kiosk does not allow downloads and i think Adobe Reader will be needed to display and print contents of some PDFs.
some people tried to integrate it with kiosk but i think without positive result. please have a look at:
http://forum.porteus.org/viewtopic.php?f=127&t=3711
http://forum.porteus.org/viewtopic.php?f=127&t=3674

Re: Popup "open with" or "save as"

Posted: 01 Sep 2014, 06:43
by loukamoulox
Ok, i'm going to take a look at it. I will let you know if i succeed to open and print my pdf's

Edit: so there is noway to make this "popup" appear to choose "open with" or to configure firefox to always use the native pdf viewer when we click on a pdf link ?

Re: Popup "open with" or "save as"

Posted: 01 Sep 2014, 08:39
by fanthom
seems that native firefox pdf viewer supports only some PDF types but not all. for example this PDF works ok in kiosk:
http://www.pdf995.com/samples/pdf.pdf

'save as/open with' popup is not allowed but i believe is not needed when Adobe Reader is present. Adobe should oped automatically when you click on pdf document. havent tested this though yet.
i'm up to the challenge so if you stuck with this you may contact me through the commercial 'customized builds' service:
http://porteus-kiosk.org/builds.html

thanks

Re: Popup "open with" or "save as"

Posted: 01 Sep 2014, 09:16
by loukamoulox
Thanks for the help, i'll try to do that :)

Re: Popup "open with" or "save as"

Posted: 01 Sep 2014, 10:00
by fanthom
no problem - good luck :)

Re: Popup "open with" or "save as"

Posted: 02 Sep 2014, 08:21
by loukamoulox
Hi,
So i get an Adobe module from http://diffusion.cgu.edu.tw/ftp/porteus/32bit/modules/
It contains a Howto.txt, but i'm not an expert in Linux so i'm not really sure what to do here since i'm on a kiosk edition.
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.
I decided to try without doing any of this step to see what happend. And as expected, i get a beautiful error message (:p) asking me to check the PATH variable in the environment.

Here are my questions:
From where should i run the script ? My PXE server ?
anyway, this is the only location where i can make changes on my modules...

wich path sould i insert since all will be compress in module ?

thanks

Re: Popup "open with" or "save as"

Posted: 02 Sep 2014, 10:18
by fanthom
o After the installation succeeds, please make sure that the acroread
startup script is in the PATH environment variable.
make sure that you have a symlink in your module pointing to acroread binary. for example /usr/bin/acroread -> /opt/bin/acroread (or wherever it is).

please refer to kiosk documentation when not sure how modules works:
http://porteus-kiosk.org/modules.html

broader documentation can be find here:
http://www.porteus.org/info/category/9-modules.html

Re: Popup "open with" or "save as"

Posted: 03 Sep 2014, 08:44
by loukamoulox
about the PATH environment variable , my question will seem idiot maybe for you, but in wich module should i define it ?
i repeat, i'm far to be a Linux expert ... ^^

thanks

Edit : soooooo, i launch the install script, asking me the install path , i let the default path...
After that, i create a .bashrc file in /home/guest/ in the 003-settings module, with 'export PATH=$PATH:/usr/bin/' in it...

It doesn't work... "Could not launch Adobe Reader 9.1.2. Please make sure it exists in PATH variable in the environment. If the problem persists, please reinstall application."

I'm not sure this is how it must be done...

Edit2 :
it appears that the script is not really usefull. Since i'm working on a PXE server, the modifications from the script apply on the server... and files are in the right place in the module so i wasted my time here.
But i'm still stuck on the path variable problem.
don't know how to resolve it

Edit3 :
i moved .bashrc in the /root dir , still not working. symlink of acroread is in /usr/bin/

Re: Popup "open with" or "save as"

Posted: 08 Sep 2014, 13:31
by loukamoulox
Hi, just solved my problem with a different method :
i install this addon : https://addons.mozilla.org/fr/firefox/a ... sposition/
it opens in the browser the links which force you to dl the documents instead of dl them

hope this could help someone else

Re: Popup "open with" or "save as"

Posted: 08 Sep 2014, 13:52
by fanthom
hi loukamoulox,

do you mean this addon forces opening of the PDF files in the PDF viewer built into firefox?
thanks for sharing.

Re: Popup "open with" or "save as"

Posted: 09 Sep 2014, 07:08
by loukamoulox
Not only PDF , all links which can be handle by your browser if i understand correctly the description !

Re: Popup "open with" or "save as"

Posted: 09 Sep 2014, 08:57
by fanthom
hmmm... so now the question is:
why firefox does not do that by default and requires a 3rd party addon?

this is odd... will search google to find an answer.

thanks once again.

EDIT:\\
after reading the addon desc i think i get it now - some servers/websites tells firefox to handle the content through external application despite that firefox could handle it itself. this addon reverts this by modifying URL headers.
will check if we can have something like that in kiosk by default (not using addon).