K4dirstat installer registers incorrect inode/directory MIME type
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://
100 /var/lib/
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
ProcVersionSign
Uname: Linux 5.4.0-109-generic x86_64
ApportVersion: 2.20.11-
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)
> 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] =thunar. desktop
inode/directory
xfce4-mime-settings provide a GUI for that. I guess that KDE and Gnome have similar tools.