Bug 466185 - opening index.html with konqueror does not open it
Summary: opening index.html with konqueror does not open it
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: file list view (show other bugs)
Version: 22.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 07:13 UTC by Martin Koller
Modified: 2023-02-26 13:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
apps for html (53.91 KB, image/png)
2023-02-21 21:29 UTC, Martin Koller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2023-02-21 07:13:58 UTC
My default browser is firefox. However I wanted to open an index.html file with konqueror as browser instead, so I right-click on the index.html file (which is shown in list view on an smb:// folder).

Two issues arise:
1) the new "open with" dialog does not show konqueror - only firefox.
2) I need to click "show all applications", then I click konqueror, which opens konqi but instead opening
the index.html file, it just shows konq:blank
Comment 1 Stefano Crocco 2023-02-21 16:21:54 UTC
Sorry, there's something I don't understand from your description: which program are you using to display the smb:// folder from where you right click on the index.html file? Is it Konqueror itself or another program? Also, if possible, could you check whether the same happens for a local file (not accessed through smb)?
Comment 2 Martin Koller 2023-02-21 17:13:59 UTC
I'm viewing the smb:// folder with konqueror itself in listView mode.
And yes, it also happens when I try the same when the index.html is on my local disk.

What I just now discovered is, that not only konqueror opens a new window showing konq:blank
but ALSO a new firefox window is opened, which then displays the selected index.html.
So it seems, the "open with other application" dialog does not care what I selected and still opens
(in addition) the page with the default browser I have set in systemsettings.
Comment 3 Stefano Crocco 2023-02-21 18:12:06 UTC
(In reply to Martin Koller from comment #2)
> I'm viewing the smb:// folder with konqueror itself in listView mode.
> And yes, it also happens when I try the same when the index.html is on my
> local disk.
> 
> What I just now discovered is, that not only konqueror opens a new window
> showing konq:blank
> but ALSO a new firefox window is opened, which then displays the selected
> index.html.
> So it seems, the "open with other application" dialog does not care what I
> selected and still opens
> (in addition) the page with the default browser I have set in systemsettings.

From Konqueror, clicking on html file should open it in Konqueror itself, even if you have a different default browser. Have you tried doing it?

As for the "Open with other application", I can't test it right now, since I just discovered that menu entry does nothing at all on my system (I tried it with both Konqueror and Dolphin and with two different, albeit similar, machines with the same results): i click on it and ... nothing happens. I tried choosing one of the application already listed in the "Open with" menu to see if it would give the same results, but it doesn't. I'll look into this again after I'll find out why "Open with another application" doesn't work for me.
Comment 4 Martin Koller 2023-02-21 18:22:51 UTC
> From Konqueror, clicking on html file should open it in Konqueror itself, even if you have a different default browser. Have you tried doing it?

yes, I did. But it does not open it in konqueror, instead a double click on index.html always opens it in default browser (firefox)

Strangely, the right-click context menu shows here for "open with" only: firefox, other Application
Why does it not also show konqueror ?
Comment 5 Stefano Crocco 2023-02-21 20:22:13 UTC
(In reply to Martin Koller from comment #4)
> > From Konqueror, clicking on html file should open it in Konqueror itself, even if you have a different default browser. Have you tried doing it?
> 
> yes, I did. But it does not open it in konqueror, instead a double click on
> index.html always opens it in default browser (firefox)
> 
> Strangely, the right-click context menu shows here for "open with" only:
> firefox, other Application
> Why does it not also show konqueror ?

Double clicking an html file should open it in Konqueror, regardless of what your default browser is: there are parts of Konqueror source code which explicitly take care of this. I'll have a look at them as soon as I can (not before the weekend, however) to see if there's something wrong there.

Regarding the "Open with" menu, it's strange indeed that you only see Firefox, especially because it usually lists not only browsers, but also text editors. For example, on my system, the "Open with" menu lists: Kate, Gvim, FireFox, QuteBrowser, Vivaldi, Opera, ... The first two are text editors, while the other are browsers. Could you please check what applications are associated with html files? To do so:
- go to the "File associations" page of Konqueror settings dialog
- enter text/html in the filter widget on the top of the page
- click on the "text" entry in the list and select "html"
- you'll see the applications associated with html files in the "Application Preference Order" list on the right

Could you please tell me what distribution and which version of the KDE framework you are using? Also, can you try creating a new user and check whether the same problems happen with the new user? This way, we'll know whether the issue is related to your user configuration or it's system wide.
Comment 6 Martin Koller 2023-02-21 21:29:40 UTC
Created attachment 156578 [details]
apps for html
Comment 7 Martin Koller 2023-02-21 21:30:34 UTC
Operating System: openSUSE Tumbleweed 20230216
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.12-1-default (64-bit)
Graphics Platform: X11
Comment 8 Martin Koller 2023-02-21 21:47:31 UTC
Interesting ... on a test user, the behavior is different. There it works as you say: Even with FF as default, konqi opens the index.html

Hmmm ... since I have my user data since ages, I wonder where to change things. Will try to find it.
Comment 9 Stefano Crocco 2023-02-23 20:00:20 UTC
(In reply to Martin Koller from comment #8)
> Interesting ... on a test user, the behavior is different. There it works as
> you say: Even with FF as default, konqi opens the index.html
> 
> Hmmm ... since I have my user data since ages, I wonder where to change
> things. Will try to find it.

Well, I think the first attempt should be to rename (or remove, but I wouldn't advise it) .config/konquerorrc and .local/share/konqueror and see if it changes anything. These are the main locations Konqueror uses to store its configuration. If you're lucky, doing this will fix your issue and you'll be able to compare the original (not working) version and the default (working) one, to (hopefully) find the setting which triggers your problems. If you can't find them, you can start reconfiguring Konqueror from the default configuration (in most cases, there aren't that many settings to change). If you have bookmarks in Konqueror, be careful that they, too, are stored in .local/share/konqueror (in boomarks.xml), so don't forget to copy that file.

If renaming those files doesn't solve your issue, I can't think of a specific way to proceed. You should look at/rename files related to KDE (most of them start with "k", so they should at least be easy to identify). Another option could be to try copying files from .config and .local/share directories from your user to the test user, and see which (if any) causes the problem to appear for the new user.
Comment 10 Martin Koller 2023-02-26 13:54:13 UTC
Solved. I had an old ~/.local/share/mime/packages/user-extension-html.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
 <mime-type type="application/x-extension-html">
  <comment>html document</comment>
  <glob pattern="*.html"/>
 </mime-type>
</mime-info>

Don't know why and who created it.
After removing it and update-mime-database ~/.local/share/mime
it's working again.