Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 06-02-2010, 04:19 AM   #1
Senior Member
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Modifying /usr/share/applications/default.list (Or: setting default applications)

In the past when I've wanted to change the default application for a file type at the system level I've done this:

# open pdfs with evince not adobe reader by default 'cos it's way faster
sed -i 's:^application/pdf=.*:application/pdf=evince.desktop:' /usr/share/applications/defaults.list
Which means that the default application to open a PDF for all users is now Evince rather than Adobe Reader. It works but seems a bit hack-ish.

I'm wondering is there a better way of achieving this. I haven't been able to find any tools which are designed to manipulate the /usr/share/applications/defaults.list Anyone know of a neater way?

I've found xdg-mime which can be used like this
$ xdg-mime default evince.desktop application/pdf
But that works on a per-user basis not a system wide basis.


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
Setting Default Applications in FC JonBL Linux - Software 9 07-09-2007 09:16 PM
Default Applications inspiron_Droid Linux - Desktop 2 01-23-2007 03:58 PM
Setting default applications in GNOME smiley_lauf Ubuntu 9 02-25-2006 02:12 PM
/usr/share/applications apocolpse Linux - Newbie 5 02-20-2006 07:08 AM
Setting default applications in GNOME2 SUSE Linux 10 smiley_lauf Linux - Newbie 2 01-15-2006 08:33 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:19 PM.

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