xdg-settings and xdg-mime query fail with status 4 in kde 5
Bug #1620772 reported by
Vikash
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xdg-utils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 16.04.1 LTS
Release: 16.04
xdg-utils:
Installed: 1.1.1-1ubuntu1
I ran into the chrome default browser bug after updating : https:/
I tried the fix there and found it was not working.
So to debug the issue i tried
xdg-settings get default-web-browser
expected: google-
result: no output to stdio, it fails with status code 4
I also tried
xdg-mime query default text/html
expected: google-
result: no output to stdio, it fails with status code 4
Further Info.:
Both of these commands show correct output if executed as sudo
To post a comment you must log in.
I debugged xdg-mime and found the error is generated in the line 1005 in function defapp_kde()
trader_ result= `$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
| grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
trader_result gets value empty string because grep DesktopEntryPath returns empty string, i have no idea what it is supposed to be either
The actual output of $KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null is:
mimetype is : text/html applications/ google- chrome. desktop applications/ firefox. desktop applications/ rstudio. desktop applications/ org.kde. kate.desktop applications/ libreoffice- writer. desktop applications/ kde4/okularAppl ication_ txt.desktop applications/ emacs24. desktop applications/ vim.desktop applications/ emacs24- term.desktop
servicetype is : Application
got 9 offers.
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
Which means grep DesktopEntryPath doesn't do anything and it is not an environment variable either it is not being set anywhere in the xdg-mime script.