I recently installed gimp, and now when I open any downloaded pdf files, they are opened in gimp.
Files previously downloaded and saved are however opened in 'evince'. I use open-box, Chromium, Rox-filer and evince, as DE, browser, file-manager and document viewer respectively.
I searched the wiki and found two entries that I thought might help, Default Applications and Custom file associations, I've tried both user specific options in these pages, here are the files I created:-
[bance@archbox ~]$ cat .local/share/applications/defaults.list [Default Applications] pdf=evince.desktop
[bance@archbox ~]$ cat .local/share/applications/evince.desktop [Desktop Entry] Name=Evince Exec=/usr/bin/evince MimeType=application/x-evince Icon=evince Terminal=false Type=Application Categories=DocumentViewer Comment=
Neither of these has worked, do the files look ok? Have I made a mistake somewhere?
OK whilst writing this post, I noticed that I have a file /usr/share/applications/mimeinfo.cache, It contains a list of mime type associations, would editing this work?
On my LXDE/openbox system, the defaults.list file is not present.
It's likely created/used by 1 of the WM/DE combos like kde/gnome/xfce .
Check the wiki on xdg-open & xdg-mime .
Last edited by Lone_Wolf (2013-02-02 14:21:36)
Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them
Those files didn't exist on my system either, but the wiki suggest "edit or create" so I created them.....
Took a look at 'xdg-open/mime' on the wiki, and tried :-
xdg-mime default evince.desktop application/pdf
It didn't change .local/share/applications/defaults.list as it should have... it created a new file called mimeapps.list in the same dir?
Now when I try to open a downloaded pdf it tries to use evince but errors with "error opening file no such file or directory'
What could it be?
I also use middori no problem there, so it must be a chromiun issue.
Last edited by bance (2013-02-02 14:55:28)
I don't know if this helps you, but I've been fighting chromium on mime-types for a while, and finally figured out the problem on my openbox system. xdg-open has pcmanfm as the hard coded fm (at least on my machine). Since I don't use pcman, everything broke.
So, after editing
$ sudo nano ~/.local/share/applications/mimeapps.list
I then edited xdg itself
$ sudo nano /usr/bin/xdg-open
and changed the line that reads: pcmanfm "$file" to spacefm "$file"
Suddenly everything works when I click on downloads in chromium.
tried your solution but it doesn't work for me.... if I try to open a downloaded pdf ..... nothing happens!
If you go into your filemanager (space pcman etc) and click on various files, do they open? confirm that xdg-open works by calling it in a terminal for a pdf file. Navigate to a directory with a pdf like Downloads
$ xdg-open ~/Downloads/crap.pdf
See what xdg tells you. For pdf's I have the following in my ~/.local/share/applications/mimeapps.list
[Added Associations] audio/mpeg=deadbeef.desktop; inode/directory=spacefm-folder-handler.desktop; image/jpeg=gpicview.desktop; application/pdf=epdfview.desktop; text/plain=leafpad.desktop; [Default Applications] pdf=epdfview.desktop application/pdf=epdfview.desktop
I just realized I have epdf in there three times, but I would try to put your pdf handler as both the application/pdf= and pdf=
Just spitballing. I'm a beginner at this.
I've only been running Arch for a few months now, but I have to admit I love it!!!
I really think the problem is with Chromium, I can open pdf's if they are in my FS, but I'm not sure what Chromium does with the file before it's saved to the FS, you know when its downloaded but not yet saved to a directory.
Running xdg-open on a saved file utilises evince as you would expect it to.
One thing, though if I go to downloads in Chromium and try "show in folder' nothing happens..... Then if I left click the mouse and select open I get four instances of evince with a "no such file' error. WTF!
Thank's for taking the time with this.
you need!! the inode/directory setting in the mimetype list. That's what chromium reads to autopen your file manager.
Make sure it matches the .desktop file appropriate for your file manager. In the case of spacefm, it is not spacefm.desktop as you might expect, it is spacefm-folder-handler.desktop.
Check your .desktop files for your fm.
If you're still having trouble, you might want to post your mimeapps.list
I noticed in post1 you were using defaults.list instead. Reading the wiki is not super clear on this, but since I downloaded the pkg 'mimeo' I used mimeapps.list instead.
I assume you read the file extension portion of the chromium part of the wiki:
https://wiki.archlinux.org/index.php/Ch … sociations
Moderator: Please take care to not duplicate entries when you forgot some information. Use the "Edit" button instead. And if you did inadvertently as in this case, please notify the moderators with the "Report" button so they can take action.
Deleting the doubled entry. -- bernarcher
Last edited by bernarcher (2013-02-03 02:00:49)
Seems like I might be close,when I did :-
xdg-mime default evince.desktop application/pdf
It was for my document viewer.... Probably should have done:-
xdg-mime default rox.desktop application/pdf
for my file manager!!!
I'm going to rename the files that were created thus, and try again.....
Here is my mime.list file
[bance@archbox ~]$ cat .local/share/applications/mimeapps.list [Default Applications] application/pdf=evince.desktop inode/directory=rox.desktop
I manually changed the 'inode'entry....
I have evince and gimp and it shows
which I believe means that both show but that the first and default is evince
alcoves wonder creates the wonder unto the ages; never lose that.
I presume you mean in your mimeapps.list file?
I have a file in /usr/share/applications called mimeinfo.cache, which contains:-
Anyway chromium now tries to open downloaded pdf's with evince, however when I try to open the pdf, I get four instances of evince all with error 'no such file or directory'