LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-02-2010, 04:19 AM   #1
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 1,022

Rep: Reputation: 173Reputation: 173
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:

Code:
# 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
Code:
$ xdg-mime default evince.desktop application/pdf
But that works on a per-user basis not a system wide basis.
 
  


Reply


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


All times are GMT -5. The time now is 11:06 AM.

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