K4dirstat installer registers incorrect inode/directory MIME type

Bug #1970925 reported by Kalle Tuulos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
k4dirstat (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Ubuntu 20.04.4 LTS

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
k4dirstat:
  Installed: 3.2.0-1build1
  Candidate: 3.2.0-1build1
  Version table:
 *** 3.2.0-1build1 500
        500 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

3) What you expected to happen
4) What happened instead
When K4Dirstat is installed, it adds following row to /etc/mailcap:
inode/directory; k4dirstat --icon k4dirstat -qwindowtitle "K4DirStat" "%s"; test=test -n "$DISPLAY"

This is problematic, as this causes K4Dirstat to be default MIME handler for directories.
Practical example of this problem is, when some script uses "xdg-open" to open directory, it then opens K4Dirstat instead of system's normal file manager.

In my computer, I corrected this by commenting out the line.

Correction: don't add the MIME registration to /etc/mailcap -file.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: k4dirstat 3.2.0-1build1
ProcVersionSignature: Ubuntu 5.4.0-109.123-generic 5.4.178
Uname: Linux 5.4.0-109-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.23
Architecture: amd64
CurrentDesktop: LXQt
Date: Fri Apr 29 13:43:10 2022
InstallationDate: Installed on 2022-04-27 (2 days ago)
InstallationMedia: Ubuntu-Server 20.04.4 LTS "Focal Fossa" - Release amd64 (20220223.1)
SourcePackage: k4dirstat
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kalle Tuulos (kalle.satel.tuulos) wrote :
Revision history for this message
Jerome Robert (jeromerobert) wrote :

> When K4Dirstat is installed, it adds following row to /etc/mailcap:

No. k4dirstat just add /usr/share/applications/k4dirstat.desktop. An other package (maybe mailcap or mime-support) hook the installation process to regenerate /etc/mailcap.

/etc/mailcap is a generated file so you'll have to redo this change every time you install a package.

There is no way to specify a MIME priority in a .desktop file. Users are expected to configure this priority them self. To do so edit/create $HOME/.config/mimeapps.list (user specific) or /etc/xdg/mimeapps.list (system wide) and add:

[Default Applications]
inode/directory=thunar.desktop

xfce4-mime-settings provide a GUI for that. I guess that KDE and Gnome have similar tools.

Revision history for this message
Kalle Tuulos (kalle.satel.tuulos) wrote :

The root problem is, that the /usr/share/applications/k4dirstat.desktop file has following line:

  MimeType=inode/directory;

This line should be removed in order to avoid this problem.

Revision history for this message
Jerome Robert (jeromerobert) wrote :

* Duplicate of #1912190
* Fixed in k4dirstat 3.4.2

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package k4dirstat - 3.4.2-1

---------------
k4dirstat (3.4.2-1) unstable; urgency=medium

  * New upstream version 3.4.2
    - Fix a floating point exception with go-mtpfs
    - Remove inode/directory MIME type (LP: #1970925, LP: #1912190)
  * Bump Standards-Version

 -- Jérôme Robert <email address hidden> Sun, 14 Aug 2022 14:56:04 +0200

Changed in k4dirstat (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.