You are not logged in.

#1 2010-10-17 03:58:09

ryan0270
Member
Registered: 2010-08-31
Posts: 25

Need help getting mimeopen -d to work [SOLVED]

I'm trying to set default applications on a relatively fresh install of Arch.  I know in the past I've been able to just to do something like mimeopen -d file.pdf okular and it has worked, but now I get the following error message

[ryantr@myhost Downloads]$ mimeopen -d file.pdf okular
No applications found for mimetype: application/pdf

[ryantr@myhost Downloads]$ mimeopen -d file.pdf 
No applications found for mimetype: application/pdf

My guess is that there is a database somewhere that needs updating.  I tried running update-desktop-database but no help.  I know in the past I haven't had to manually edit files for something as common as a pdf.

What am I missing?  FYI, my DE is Fluxbox.

Last edited by ryan0270 (2010-12-15 05:23:14)

Offline

#2 2010-11-08 03:05:56

UnbreakableMJ
Member
From: Bahrain
Registered: 2007-05-24
Posts: 29
Website

Re: Need help getting mimeopen -d to work [SOLVED]

Greetings! My post might be late, yet the answer could help others.

mimeopen is installed by the package 'perl-file-mimeinfo' as:

/usr/bin/perlbin/vendor/mimeopen

Last edited by UnbreakableMJ (2010-11-08 03:07:50)

Offline

#3 2010-11-08 11:32:08

ryan0270
Member
Registered: 2010-08-31
Posts: 25

Re: Need help getting mimeopen -d to work [SOLVED]

Installation of the mimeopen command isn't the problem.  The problem is that is does not seem to function the way I expect (and how it has functioned on other machines).  I'm assuming there is a database, or option, somewhere that is not set correctly but I haven't been able to track it down.

Offline

#4 2010-12-15 05:22:28

ryan0270
Member
Registered: 2010-08-31
Posts: 25

Re: Need help getting mimeopen -d to work [SOLVED]

Ok, I finally got frustrated enough to look at this again and have it working, although I'm not sure what exactly made it work  Here are the steps I did:

Looking at the verbose output of update-desktop-database seemed to indicated a directory problem.  The last line says a directory did not exist so I created that...

[root@user]# update-desktop-database --verbose
Search path is now: [/usr/share/applications, /usr/local/share/applications]
File "/usr/share/applications/policytool.desktop" lacks MimeType key
File "/usr/share/applications/qtconfig.desktop" lacks MimeType key
File "/usr/share/applications/kde4/Help.desktop" lacks MimeType key
File "/usr/share/applications/kde4/knetattach.desktop" lacks MimeType key
File "/usr/share/applications/bssh.desktop" lacks MimeType key
File "/usr/share/applications/avahi-discover.desktop" lacks MimeType key
File "/usr/share/applications/dropbox.desktop" lacks MimeType key
File "/usr/share/applications/jconsole.desktop" lacks MimeType key
File "/usr/share/applications/bvnc.desktop" lacks MimeType key
File "/usr/share/applications/pidgin.desktop" lacks MimeType key
File "/usr/share/applications/assistant.desktop" lacks MimeType key
Could not create cache file in "/usr/local/share/applications": Error opening directory '/usr/local/share/applications': No such file or directory

Running update-desktop-database again got rid of the last error message but didn't fix the problem so I manually copied all the Okular related .desktop files from /usr/share/applications/kde4 to /usr/share/applications.  This seemed to fix the problem, although I'm not sure why since the above error message showed problems with other .desktop files inside the kde4 directory so I'm assuming it was scanning correctly.

But it works now, for whatever reason.

Offline

Board footer

Powered by FluxBB