Bug 24326

Summary: .wma audio files are opened with Audacity (Totem/Videos in Gnome), which are inappropriate.
Product: Mageia Reporter: Lewis Smith <lewyssmith>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: gnome, jani.valimaa, lists.jjorge, marja11, pkg-bugs
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Lewis Smith 2019-02-08 15:07:11 CET
Description of problem:
Testing Mageia7 Classic x64 6 desktops. Having by chance some .wma audio files, these are opened by *Audacity* on all desktops Cinnamon, LXDE, Mate, Plasma, Xfce; except Gnome, which uses Totem=Videos. Although Audacity can play the file, it is inappropriate, creating a 'project' to manipulate it. Totem is also inappropriate, being video; and does not work properly anyway, bug 24325.
All the desktops include appropriate audio players, even if they do not always offer it for different audio formats.

Version-Release number of selected component (if applicable):
M7beta2.2 x64  early Feb 2019, 6 desktops.

How reproducible:
Every time in tests.

Steps to Reproduce:
Try playing a .wma file from the desktops cited. See Audacity.
Comment 1 Marja Van Waes 2019-02-09 15:50:57 CET
I don't have the slightest idea how this is handled.

CC'ing the Gnome maintainers and all packagers collectively for help.

CC: (none) => gnome, marja11, pkg-bugs

Comment 2 José Jorge 2019-02-10 09:48:22 CET
Freedesktop specs allows to choose in any desktop which player should be default for a file type. Then all desktops will follow this choice.

It is end user personal taste, we cannot choose for them. I'd say this is not a bug.

CC: (none) => lists.jjorge
Status: NEW => UNCONFIRMED
Ever confirmed: 1 => 0

Comment 3 Jani Välimaa 2019-02-10 10:31:35 CET
One can change the default if needed and we can choose sane default apps for certain file types with shared-mime-info.

However, I don't know if it is really needed for files like .wma. Is it common file type? We can't try to be clever enough to have sane default for every single file type.

We have lots of pkgs that can open .wma files:
$ urpmf --provides --literal 'mimehandler(video/x-ms-asf)' |sort -u | wc -l
28
$ urpmf --provides --literal 'mimehandler(audio/x-ms-asf)' |sort -u | wc -l
12
Comment 4 Lewis Smith 2019-02-10 12:16:08 CET
We know that there are application associations for specified file types; and that users can fiddle with them. But this does not excuse us from making them sensible out-of-the-box. Audacity should *never* be a *default* application for opening an audio file; among other applications offered, yes, of course.
I do not accept that it is OK to open an audio file with a video application that happens to play it, when there is an audio application available - which is always the case.
.wma may well be an obscure audio format, but it exists. My files were sent from a Windows user, so it may not be unusal there. I will look at Mageia 6 for comparison.

(In reply to José Jorge from comment #2)
> Freedesktop specs allows to choose in any desktop which player should be
> default for a file type. Then all desktops will follow this choice.
I thought each desktop did its own thing; never mind. I have found different default applications for the same thing under different desktops; about which I do *not* complain. e.g. for video DVD, Gnome & Mate use Videos/Totem, LXDE offers a relevant choice, Xfce offers the entire application menu tree, Plasma offers VLC.

> It is end user personal taste, we cannot choose for them.
We *do* make the initial choice, so it should be sensible. If the user wants to change it afterwards, so be it.
---------------------------------------
.wma should be opened by an appropriate player. Most desktops default to Xine for .mp3, so the same could be done here. Gnome defaults to Rhythmbox for audio, which is sensible and better than the current Videos/Totem. I have just found that (Xfce) .flac -> Audacity, which is wrong. And that a .wma file now opens with Xine!
That is all this bug is about: the *out-of-the-box* default application for audio formats. I have too much fiddled with this, so must await the next round of ISOs for a clean slate.
------------------------------------
I does look sometimes if you choose a player for a file, that same player becomes the default henceforth. This is a worm's nest; I am going gaga trying different media files under all the Classic desktops + Lives.
I have just found different audio formats opened by different players under M7 Xfce from Classic ISO. I think things should be more consistent. There is a very old bug, re-opened by devs, which complains about this.

Devs: leave this for the moment, but if I find next time that Audacity (or totem) is being used by default to play audio files, I shall resume this. Think of the end *user*.
Comment 5 Jani Välimaa 2019-02-10 13:22:52 CET
If desktop follows Freedesktop spec it uses its own default apps list, shipped in /usr/share/applications. Default mimeapps.list is used if there is no file available with DE specific prefix. So for example gnome uses gnome-mimeapps.list and xfce uses xfce-mimeapps.list and so on. IIRC if both, the default mimeapps.list and DE specific, are available then apps from DE specific are preferred.

I think only gnome and xfce uses DE specific XX-mimeapps.list and the default mimeapps.list contains some KDE/PLASMA specific apps plus entries for libreoffice apps. This is also something to improve. IMO we should provide distro wide defaults with mimeapps.list and DE specific with XX-mimeapps.list.

It's huge job to maintain or create app list for every single common file type for every DEs we have. Thing that should be also noted is what if our preferred applications aren't installed? People can chose pkgs they want to install and there are multiple possible combinations. So there is quite big chance to have file opened with a 'wrong' app if multiple installed apps provides mimehandler for the file type and the default ones aren't installed.

However if sane defaults are wanted, then one should also provide as much information as possible when creating bug reports. What is needed is at least DE, mime type from 'file --mime-type foo.bar' and a suggestion for .desktop file to be used with wanted file type.

This might be something for mga8 feature proposals.

CC: (none) => jani.valimaa

Comment 6 Lewis Smith 2019-02-11 21:24:01 CET
Thank you Jan for your observations.
> It's huge job to maintain or create app list for every single common file 
> type for every DEs we have.
Which I accept. But I am surprised that over the years this has not gradually happened & evolved into a stable result; stable as far as new or dead applications permit.
I have found it onerous to *test* different file types under all the desktops (+ Live ISOs). I am giving up until the next ISO rounds, when I shall have a better idea of how to go about it. There are few discords.

> Thing that should be also noted is what if our preferred applications aren't
> installed? People can chose pkgs they want to install
If they happened to specifically exclude something expected to be there, that would be their fault; and they could either install it or change file associations. This must be extremely rare.

> and there are multiple possible combinations
This is a nightmare with multiple desktops, I agree. Each one *could* insist on 'its' standard players (video & sound) regardless of whatever else was installed e.g. Xine or Parole for both, VLC for videos (even though it does sound as well), Mplayer for sound. Other relevant applications that happen to be installed as well are often selectable from an offered menu.

> However if sane defaults are wanted,
Exactly that. In this case, Audacity is *never* right as a media player; and video applications are weird for sound even if they work.

> then one should also provide as much information as possible when creating
> bug reports. What is needed is at least DE, mime type from 
> 'file --mime-type foo.bar' and a suggestion for .desktop file to be used
> with wanted file type.
I tried to do that, but was feeling my way. Next time I shall be more precise.
The last bit about which .desktop file is beyond me.

> This might be something for mga8 feature proposals.
Perhaps. But we need to get M7 right, no? Just a couple of wrinkles - what this bug is about.
Leave this until I report after the next ISOs.
Comment 7 Jani Välimaa 2019-02-24 20:40:31 CET
Audacity isn't installed anymore by default to GTK+ based desktops. It's a nice app, but there's no need to install it by default.

http://svnweb.mageia.org/packages?view=revision&revision=1369908
Comment 8 Lewis Smith 2019-04-21 21:17:37 CEST
M7 beta 3 x64 Classic all-desktop install real H/W

(In reply to Jani Välimaa from comment #7)
> Audacity isn't installed anymore by default to GTK+ based desktops. It's a
> nice app, but there's no need to install it by default.
Agree on both counts.
- Audacity is not installed (pity).
- Under Cinnamon, LXDE, Mate, Xfce, double-clicking a .wma file from the FM window now plays it with Clementine, which is appropriate (if not always obvious: it mostly does not open a window, just appears discreetly in Systray, so the file seems to be played by the FM itself!).
- Under Plasma, it opens Xine, also appropriate.
For Gnome, I am past caring.

Status: UNCONFIRMED => RESOLVED
Resolution: (none) => FIXED