You are not logged in.
Hi,
I have been trying to get Chromium to call external applications based on their name and/or mime type. My desktop is XFCE.
I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
My ~/.local/share/applications/defaults.list file is:
application/pdf=acroread.desktop;
But when I click on the link in chromium I get the "Save File" dialog.
As a test, I edited the /usr/bin/xdg-open shell script, and made it write to a file in /tmp when ever it is called. (The second line where I send the date to the /tmp/xdg-open.log file.)
#!/bin/sh
/usr/bin/date >> /tmp/xdg-open.log
#---------------------------------------------
# xdg-open
#
# Utility script to open a URL in the registered default application.
#
# Refer to the usage() function below for usage.
#
# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
When I try and download a PDF in chromium, it never adds to the /tmp/xdm-open.log file. (But does if I call it from the command line as I did above.)
So to me, it looks like chromium isn't even calling the xdg-open script.
Any one have any ideas?
Thanks in advance.
Last edited by landzend (2012-11-16 10:54:29)
Offline
Did you set "Always open files of this type" as explained in the FAQ?
http://support.google.com/chrome/bin/an … swer=95759
Offline
Hello,
For me, chromium is not using xdg-open. You can verify it with:
strace -e process chromium
Then download something and try to open it from chromium. As for solution, try this: install perl-file-mimeinfo package and setup it with 'mimeopen --ask-default some-pdf-file.pdf'.
I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
This is separate issue, it should run browser (http:// protocol), not acroread. Check this link: http://hiciu.org/some-pdf-file.pdf (harmless). All you know before you open it is the url, not the file type.
Offline
Did you set "Always open files of this type" as explained in the FAQ?
http://support.google.com/chrome/bin/an … swer=95759
Thanks. This was the answer.
Looks like I had things set up right. Didn't realise I had to download one PDF, then click on it and say to open this type next time...
It also worked for a .torrent file too...
Thanks again.
Offline
Hello,
For me, chromium is not using xdg-open. You can verify it with:
strace -e process chromium
Then download something and try to open it from chromium. As for solution, try this: install perl-file-mimeinfo package and setup it with 'mimeopen --ask-default some-pdf-file.pdf'.
landzend wrote:I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
This is separate issue, it should run browser (http:// protocol), not acroread. Check this link: http://hiciu.org/some-pdf-file.pdf (harmless). All you know before you open it is the url, not the file type.
Thanks. I already had the "perl-file-mimeinfo" installed.
Yes. The link you gave above is type "image/jpeg", so the browser has to start the download to even know what it has coming.
Offline