Red Hat Bugzilla – Bug 994738
xdg-mime default command incorrectly assumes kde-config is installed
Last modified: 2017-01-09 11:13:06 EST
Description of problem:
xdg-mime (from xdg-utils) can be installed independently of KDE, but the "xdg-mime default" command calls kde-config (from kdelibs3) without first checking if it is installed.
Version-Release number of selected component (if applicable):
All the time if KDE (specifically kdelibs3) isn't installed.
Steps to Reproduce:
1. Install a KDE-less RHEL 6 (e.g. select GNOME desktop and make sure kdelibs3 isn't installed, which it shouldn't be).
2. If xdg-utils isn't installed, then run "yum install xdg-utils" as root
3. Set Firefox to handle HTML (advisable to do this as non-root user):
xdg-mime default mozilla-firefox.desktop text/html
Actual results (as a non-root user):
/usr/bin/xdg-mime: line 531: kde-config: command not found
mkdir: cannot create directory `: No such file or directory
/usr/bin/xdg-mime: line 542: /profilerc.new: Permission denied
After running "yum install kdelibs3", the xdg-mime default command runs correctly with no errors.
The make_default_kde() function in /usr/bin/xdg-mime needs to do a check for the existence of /usr/bin/kde-config and do nothing (return) if it's not present. Example code somewhere in the function (e.g. just before the kde-config call):
if [ ! -x /usr/bin/kde-config ]
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.