[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-22 Thread Alex A. D.
After running that commands I got the following output:

$ ...
Running kmimetypefinder5 "/home/alex/Desktop/index.html"
application/x-perl


It seems like that kmimetypefinder5 is major culprit here. I've found another 
unrelated bugreport here which was reported about a year ago: 
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824

In that case the program reports wrong type for *.py files with correct 
content. Weird!
I think it's wortht to rename this bugreport.

** Summary changed:

- xdg-mime query filetype index.html reports wrong type
+ kmimetypefinder5 *.html reports wrong type

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  kmimetypefinder5 *.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-22 Thread Sebastien Bacher
in fact the script doesn't seem to used shared-mime-info

$ XDG_UTILS_DEBUG_LEVEL=1 xdg-mime query filetype index.html
Running mimetype --brief --dereference "/tmp/index.html"
text/html

could you try to use the command with the same environement variable and
share the output?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-22 Thread Sebastien Bacher
The wrapper used depends of the environment, the previous one was under
a command line clean instance, on a GNOME based desktop

$  XDG_UTILS_DEBUG_LEVEL=1 xdg-mime query filetype index.html
Running gio info "/tmp/index.html"
text/html

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-21 Thread Alex A. D.
I just have tried a fresh new user. The output is identical. See
attached screenshot.

** Attachment added: "xdg-mime query wrong result"
   
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+attachment/5413048/+files/Screenshot_20200921_232318.png

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-21 Thread Sebastien Bacher
the new testcase is different and is a valid html now (which the initial
report wasn't), using those commands here it returns 'text/html' as the
type though...

could you try with another user to see if that's due to some local
configuration?


** Changed in: shared-mime-info (Ubuntu)
   Status: Invalid => New

** Changed in: shared-mime-info (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-12 Thread Alex A. D.
Hi Sebastien. Thaks your for your reply.

I suggest you to do the following to see that even if file is starting
with proper tags it is recognized as `application/x-perl`:

$ tee "index.html" <
use strict
eol

$ xdg-mime query filetype index.html # -> application/x-perl - wrong
type

Why did you tagged report as invalid? 
I just got a file with minified JS code which has `use strict` burrowed deep 
somewhere inside correct html file but it's still recognized as perl script.

I can't use some tools to open the file in browser by using xdg-open and
forced to use browser-specific launcher.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-12 Thread Alex A. D.
why did you tag the report*

Bump.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-07 Thread Sebastien Bacher
Thank you for your bug report, the file types are determined from the
content and not only the name. An html is supposed to start with 

** Package changed: xdg-utils (Ubuntu) => shared-mime-info (Ubuntu)

** Changed in: shared-mime-info (Ubuntu)
   Importance: Undecided => Low

** Changed in: shared-mime-info (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-06 Thread Alex A. D.
** Tags added: html xdg-mime xdg-open

** Tags added: 20.04 kde kubuntu perl

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890716

Title:
  xdg-mime query filetype index.html reports wrong type

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1890716/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs