<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>354179</bug_id>
          
          <creation_ts>2015-10-21 15:17:43 +0000</creation_ts>
          <short_desc>File associations cannot be changed if already defined in $XDG_CONFIG_HOME/mimeapps.list</short_desc>
          <delta_ts>2016-11-10 10:29:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>systemsettings</product>
          <component>kcm_filetypes</component>
          <version>5.4.1</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Qianli Ma">maql.nju</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>a.nolting</cc>
    
    <cc>colinnkeenan</cc>
    
    <cc>hsantanna</cc>
    
    <cc>kde</cc>
    
    <cc>martin.tlustos</cc>
    
    <cc>oded</cc>
    
    <cc>piedro.kulman</cc>
    
    <cc>rdieter</cc>
    
    <cc>serhiy.int</cc>
    
    <cc>shimi.chen</cc>
    
    <cc>yjcoshc</cc>
          
          <cf_commitlink>http://commits.kde.org/kde-cli-tools/c4ebd9b537d749e5533ecaff5631debab4827760</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1551728</commentid>
    <comment_count>0</comment_count>
    <who name="Qianli Ma">maql.nju</who>
    <bug_when>2015-10-21 15:17:43 +0000</bug_when>
    <thetext>If added associations or default applications are written to $XDG_CONFIG_HOME/mimeapps.list by other programs (e.g. gnome programs), they cannot be modified in systemsettings.  After modify the application preference order and apply, the order will change back to the original one.


Reproducible: Always

Steps to Reproduce:
1. Create mimeapps.list in $HOME/config, add an application preference order for a certain mime type as &quot;Added Associations&quot;.
2. Modify the preference order in systemsettings and apply.
3. After a second or so the listed order jumps back to the one configured in $HOME/config/mimeapps.list.  i.e. the preference order cannot be modified in systemsettings.


Actual Results:  
$HOME/.local/share/applications/mimeapps.list is properly modified by systemsettings but the file associations will be overridden by $HOME/config/mimeapps.list.

Expected Results:  
systemsettings shall modify $XDG_CONFIG_HOME/mimeapps.list instead of $XDG_DATA_HOME/applications/mimeapps.list, or at least remove relevant entries in $XDG_CONFIG_HOME/mimeapps.list.


According to http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html the mimeapps.list at $XDG_CONFIG_HOME shall have higher priority than the one stored in $XDG_DATA_HOME/applications. systemsettings modifies the file in $XDG_DATA_HOME/applications and the modifications will not be honored by KMimeTypeTrader (or KSycoca, xdg-mime, etc) when conflicting configurations exit in $XDG_CONFIG_HOME.

Also $XDG_CONFIG_HOME is &quot;the recommended location for user configuration GUIs&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1555271</commentid>
    <comment_count>1</comment_count>
    <who name="sedrubal">kde</who>
    <bug_when>2015-11-06 15:38:43 +0000</bug_when>
    <thetext>Also reproducible here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1561031</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Tlustos">martin.tlustos</who>
    <bug_when>2015-12-02 10:09:02 +0000</bug_when>
    <thetext>Same here, kubuntu 15.10, plasma 5.4.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1561032</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Tlustos">martin.tlustos</who>
    <bug_when>2015-12-02 10:09:36 +0000</bug_when>
    <thetext>Seems to be related or the same to 353475</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1561033</commentid>
    <comment_count>4</comment_count>
    <who name="Qianli Ma">maql.nju</who>
    <bug_when>2015-12-02 10:17:20 +0000</bug_when>
    <thetext>A workaround on the user side is to merge $HOME/.local/share/applications/mimeapps.list to $HOME/.config/mimeapps.list, and create a symbolic link to $HOME/.config/mimeapps.list at $HOME/.local/share/applications. Systemsettings then works fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1562000</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Nolting">a.nolting</who>
    <bug_when>2015-12-07 17:19:42 +0000</bug_when>
    <thetext>Same on openSUSE TW, under KDF 5.16, systemsettings 5.4.3, QT 5.5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1565822</commentid>
    <comment_count>6</comment_count>
    <who name="Colin">colinnkeenan</who>
    <bug_when>2015-12-25 18:43:50 +0000</bug_when>
    <thetext>Why is this still &quot;UNCONFIRMED&quot;. It&apos;s clearly confirmed and a major issue for the Plasma Desktop.

This table in the Arch Wiki will help the developers to solve this problem:

https://wiki.archlinux.org/index.php/Default_applications#MIME_types_and_desktop_entries

It shows the order of paths that are searched to find mimeapps.list. From this table, it is obvious that the defaults set by Plasma Desktop should ideally be stored in

    $HOME/.config/$desktop-mimeapps.list

Or, at least in

    $HOME/.config/mimeapps.list</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566383</commentid>
    <comment_count>7</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2015-12-28 23:07:34 +0000</bug_when>
    <thetext>Git commit c4ebd9b537d749e5533ecaff5631debab4827760 by David Faure.
Committed on 28/12/2015 at 23:07.
Pushed by dfaure into branch &apos;master&apos;.

Save settings into ~/.config rather than deprecated ~/.local/share/apps/

M  +1    -1    keditfiletype/mimetypedata.cpp

http://commits.kde.org/kde-cli-tools/c4ebd9b537d749e5533ecaff5631debab4827760</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580770</commentid>
    <comment_count>8</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2016-03-07 15:23:07 +0000</bug_when>
    <thetext>*** Bug 356235 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1595623</commentid>
    <comment_count>9</comment_count>
    <who name="Serhiy">serhiy.int</who>
    <bug_when>2016-05-19 21:19:33 +0000</bug_when>
    <thetext>The workaround in one command:
ln -sf ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1598414</commentid>
    <comment_count>10</comment_count>
    <who name="Wolfgang Bauer">wbauer1</who>
    <bug_when>2016-06-02 18:38:03 +0000</bug_when>
    <thetext>*** Bug 360189 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1635154</commentid>
    <comment_count>11</comment_count>
    <who name="piedro">piedro.kulman</who>
    <bug_when>2016-10-24 20:43:49 +0000</bug_when>
    <thetext>The workaround doesn&apos;t help - I still can&apos;t change the *.aac association. If I do it just jumps back to audacious in my case. 

Also there is no way to reset all the mime types or at least one by one to default settings. 
The button &quot;load defaults in the systemsettings is just greyed out. 

Frustrating because this seems a major problem for anyone actually working on KDE. 

thx for reading, please fix this or give some workaround instructions, 
piedro</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1638838</commentid>
    <comment_count>12</comment_count>
    <who name="Henrique Sant&apos;Anna">hsantanna</who>
    <bug_when>2016-11-10 10:29:09 +0000</bug_when>
    <thetext>Still happens in 5.8.3.

The workaround seems to be working, after creating the link (as in comment9) I could edit mimetype settings and it will correctly be saved.

Sometimes you have to recreate the symbolic link, because package updates can replace it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>