LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-05-2018, 12:08 PM   #1
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Problem setting default application for Audio CD in Gnome 3


Objective: When I insert an audio CD in the drive, I want the system to automatically start a CD ripper of my choosing (ripper called abcde).

Already tried: I have successfully set up a desktop-accessible application by creating the file /usr/share/applications/abcde.desktop which is visible in the desktop GUI and works correctly when I click on the desktop icon.

Problem: The new application does not appear in the list of applications which may be chosen under System Settings...Details...Removable Media (Select how media should be handled)...CD audio. Therefore I cannot select the new application as the default application for removable media of the Audio CD type.
 
Old 03-06-2018, 01:03 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Beryllos View Post
Problem: The new application does not appear in the list of applications which may be chosen under System Settings...Details...Removable Media (Select how media should be handled)...CD audio. Therefore I cannot select the new application as the default application for removable media of the Audio CD type.
must have something to do with mimetypes and/or categories defined inside the .desktop file.
i suggest you look at one from an app that DOES show up, and copy these settings to your abcde.desktop.
 
1 members found this post helpful.
Old 03-07-2018, 07:59 AM   #3
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Original Poster
Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Problem solved. Thank you for your help.

The problem was not due to the MimeType or Categories lines, which I had copied from another application to begin with. However, your suggestion encouraged me to look for other differences.

Eventually I found the problem in the Exec line. I have configured abcde so that it requires no arguments, but the application will not appear in the selection list unless a filename or device argument is provided. Here is the solution:

Before (application not visible in the selection list):
Code:
Exec=/usr/bin/abcde
After (application visible, selectable, works fine):
Code:
Exec=/usr/bin/abcde %f
or
Code:
Exec=/usr/bin/abcde %u
Given my abcde configuration, the argument is ignored, and the program executes correctly.

Edit: One more detail: In order to make the selection persist beyond the current desktop login session, the new application must be added to the user's mimeapps.list, in its [Default Applications] section.

On my system, this is located at ~/.local/share/applications/mimeapps.list. However, I read that on some systems it may be found instead at ~/.config/mimeapps.list.


Code:
[Default Applications]
...
x-content/audio-cdda=abcde.desktop

Last edited by Beryllos; 03-21-2018 at 07:51 AM. Reason: One more step added in order to make the setting persistent.
 
  


Reply



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 audio levels paxolin Linux Mint 10 02-20-2017 01:31 AM
[SOLVED] No audio after setting a default soundcard RedNeck-LQ Linux - General 1 08-28-2011 05:28 PM
Gnome, better gnome-volume-control, setting default playback channel Hangaber Debian 1 03-15-2011 04:33 PM
Gnome default application with wine konzo Linux - Software 3 10-21-2010 12:00 AM
audio CD default application hildog Linux - Newbie 1 10-04-2003 05:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration