Bug 7815 - 'xdg-mime query default' fails
Summary: 'xdg-mime query default' fails
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.0
Hardware: All All
: high normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 12:21 UTC by Tom Whipple
Modified: 2015-10-06 01:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tom Whipple 2006-08-08 12:21:04 UTC
Registering a default application to handle a given mime type seems broken. See
the following command sequence:

[tw@linux:~/portland/xdg-utils/tests]
$ xdg-mime query filetype foo.xdgtest
text/plain

$ xdg-mime install --novendor xdg-utils-usecases/data/mime_launch.xml 
$ xdg-mime query filetype foo.xdgtest
text/x-xdg-testpattern

$ xdg-desktop-menu install --novendor \ xdg-utils-usecases/data/mime_launch.desktop 
$ xdg-mime query default text/x-xdg-testpattern

Returns no output, instead of the expected mime_launch.desktop. Similarly,
'xdg-open foo.xdgtest' opens the editor (default for text/plain).

(I am running SUSE 10.0/Gnome)
Comment 1 Tom Whipple 2006-08-08 14:57:51 UTC
Added test case xdg-utils-usecases/t.01-default-mime-launch to address this bug.
======================================================
[Tue Aug  8 14:28:28 PDT 2006] TEST RUN START:
xdg-utils-usecases/t.01-default_mime_launch
distribution: suse 10.0
xdg-utils: 1.0beta2
kde: 3.4.2
gnome: 2.12.0
xfce: not present (didn't find xfce4-session)
running: gnome  
user: normal
uname: Linux linux 2.6.13-15.10-default #1 Fri May 12 16:27:12 UTC 2006 i686
i686 i386 GNU/Linux
xset data:
-------------------------------------
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  auto repeat delay:  500    repeat rate:  30
  auto repeating keys:  00ffffffdffffbbf
                        fadfffdfffdfe5ef
                        ffffffffffffffff
                        ffffffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0    WhitePixel:  16777215
Font Path:
 
/usr/X11R6/lib/X11/fonts/misc:unscaled,/usr/X11R6/lib/X11/fonts/75dpi:unscaled,/usr/X11R6/lib/X11/fonts/Type1,/usr/X11R6/lib/X11/fonts/URW,/usr/X
11R6/lib/X11/fonts/truetype,/usr/X11R6/lib/X11/fonts/uni:unscaled,/opt/kde3/share/fonts
Bug Mode: compatibility mode is disabled
DPMS (Energy Star):
  Standby: 7200    Suspend: 7200    Off: 14400
  DPMS is Disabled
File paths:
  Config file:  /etc/X11/xorg.conf
  Modules path: /usr/X11R6/lib/modules
  Log file:     /var/log/Xorg.0.log
-------------------------------------
[Tue Aug  8 14:28:28 PDT 2006] ---- normal user run start:
xdg-utils-usecases/t.01-default_mime_launch
[Tue Aug  8 14:28:28 PDT 2006] test_default_mime_launch: verify we can install a
mime type & associate it with an applciation: FAIL 
Expected output from 'xdg-mime query default
text/x-xdgt2006-08-08-142828.853286000-13105' to stdout, but none written

Command (xdg-open testfile.xdgt-08-08+179) gave exit code 4, expected 0
Unexpected output from 'xdg-open testfile.xdgt-08-08+179' written to stderr, as
shown below:
stderr:Error showing url: There is no default action associated with this location.

'exec.out' does not exist

[Tue Aug  8 14:28:29 PDT 2006] ---- normal user run end: 1 tests failed, 0 of 1
tests passed. (1 attempted)
[Tue Aug  8 14:28:29 PDT 2006] TEST RUN END:
xdg-utils-usecases/t.01-default_mime_launch - 1 tests failed, 0 of 1 tests
passed. (1 attempted)
Comment 2 Waldo Bastian 2006-09-09 16:45:24 UTC
Part of the problem is that Gnome (unlike KDE) doesn't automatically make an
application the default handler for a mimetype if there wasn't a default handler
yet.
Comment 3 Per Olofsson 2015-10-06 01:31:22 UTC
I think this bug has been fixed or is not applicable anymore. Please reopen otherwise.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.