desktop icon indicating copy to clipboard operation
desktop copied to clipboard

KDE Plasma 6: Setting Default Web browser to Zen Browser doesn't work

Open lts20050703 opened this issue 2 years ago • 18 comments

What happened?

Setting Default Web browser to Zen Browser doesn't work, as in for example ctrl+click a link on Discord or Visual Studio Code doens't open Zen Browser or if Zen Browser is already opened, it doesn't open a new tab and navigating to that link.

The way that I set the default web browser: Open start menu, search system settings, launch it, search for default applications, click default applications, click the drop down menu next to web browser, change it to Zen Browser

Neither firefox nor Brave Browser has this issue.

Operating System: KDE neon 6.0 KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.8.0-40-generic (64-bit) Graphics Platform: Wayland

Reproducible?

  • [X] I have checked that this issue cannot be reproduced on Mozilla Firefox.

Version

1.0.0-a.29 (64-bit)

Severity impact

Low

What platform are you seeing the problem on?

Linux

Relevant log output

No response

lts20050703 avatar Aug 26 '24 17:08 lts20050703

from my experience it didn't work with AppImage but did with Flatpack on the other hand Flatpack won't install themes and it can't open the profile directory from about:support as that directory is dynamically remapped

I tested on Fedora though, not Debianlike

zakius avatar Aug 27 '24 09:08 zakius

I'm using Flatpak, though

lts20050703 avatar Aug 27 '24 13:08 lts20050703

I tried it on neon latest and flatpak zen, it works fine as a default browser when you click on any link. Go to the settings and change it to zen

Screenshot_20240827_211101

itstamimi avatar Aug 28 '24 01:08 itstamimi

from my experience it didn't work with AppImage but did with Flatpack on the other hand Flatpack won't install themes and it can't open the profile directory from about:support as that directory is dynamically remapped

I tested on Fedora though, not Debianlike

Flatpak works perfectly in neon, themes, about:support, and everything

itstamimi avatar Aug 28 '24 01:08 itstamimi

Same it works perfectly installed through flatpak

dmzski avatar Aug 29 '24 07:08 dmzski

I have updated to 1.0.0-a.32 (64-bit) (I use flatpak) and the issue still persist.

Ctrl+click link in Konsole works. But for some reason clicking links in Discord and ctrl+click links in VSCodium doesn't work.

Can anyone check/confirm if you can open links in Discord and/or VSCodium?

Like I said in the description, setting default browser to Firefox and clicking links in Discord and ctrl+click links in VSCodium will open Firefox. Same for Brave Browser.

Strangely, I tried to run update-alternatives --config x-www-browser and Zen Browser doesn't show up? My alternative list only show brave browser and firefox.

lts20050703 avatar Aug 29 '24 16:08 lts20050703

TL;DR: I updated to the latest Ubuntu version (Ubuntu 24.04.1 LTS) and it fixed the issue.

Clicking on links did nothing (tried from Slack and Obsidian). Zen was not showing when running update-alternatives --config x-www-browser.

I tried a bunch of solutions:

  • Adding .desktop file
  • Then forcing Zen to appear in the browser alternatives
  • Changing permissions of Flatpak flatpak --user override io.github.zen_browser.zen --filesystem=home --talk-name=org.freedesktop.FileManager1 --talk-name=org.freedesktop.Notifications --talk-name=org.freedesktop.portal.Fcitx --talk-name=org.freedesktop.portal.Desktop --talk-name=org.freedesktop.portal.Settings --talk-name=org.gtk.vfs.* --talk-name=org.kde.* --talk-name=org.gtk.*
  • Checking permissions were all right by running xdg-open http://google.com (it opened Zen browser).
  • And other tricks but none of them worked.

I ended up creating a new Ubuntu user to see if it was working for it and it was (just by selecting Zen as the default browser in the operating system options). I then had a popup asking me to update to the latest Ubuntu LTS which I did (I must have closed this popup on my real session and forget about it). When I logged in with my real user it was working. I don't know exactly what did the trick.

bcournaud avatar Sep 02 '24 07:09 bcournaud

Same issue here using Bazzite 40 KDE, using AppImage on version 1.0.0-a.32 (64bit)

Basically everytime I close and open the browser I have to set it as default, doesn´t open any link from Discord but does from Terminal as someone mentioned before... however, if I close Zen and try to open it using xdg-open <website> it throws this error:

Screenshot_20240903_223933

Edit: now it has randomly started working, Zen says it's not the default browser but works as such funnily enough.

ItsLaguna avatar Sep 03 '24 21:09 ItsLaguna

Same issue here, whenever e.g. I run a project in Intellij IDEA and usually it opens a tab with the project, not with zen though. I've set zen as default browser too. Even if I click the link in other programs same deal. The only feedback I get is this notification: image and then this "tab" opens: file:///home/user/.cache/kioexec/krun/48507_0/unnamed Btw I'm running Debian 12 with KDE

InfamousBearGR avatar Sep 20 '24 22:09 InfamousBearGR

I just upgraded to Ubuntu 24.04 and the problem is fixed, I'm not sure if it was because of a recent Zen Browser update or my upgrading to Ubuntu 24.04, can anyone confirm?

(I'm using Zen 1.0.1-a.8 (64-bit)

lts20050703 avatar Oct 14 '24 12:10 lts20050703

I just upgraded to Ubuntu 24.04 and the problem is fixed, I'm not sure if it was because of a recent Zen Browser update or my upgrading to Ubuntu 24.04, can anyone confirm?

It works for me, but I don't have information from the past. (latest tuxedoOS, plasma6, 1.0.1-a10)

Mikopet avatar Oct 16 '24 14:10 Mikopet

Hi, @lts20050703. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The issue involves setting Zen Browser as the default in KDE Plasma 6, with links not opening from apps like Discord and Visual Studio Code.
  • Similar issues were reported by other users, with AppImage affected but not Flatpak.
  • Upgrading to the latest Ubuntu version resolved the issue for some, though the exact cause of the fix is unclear.
  • Some users reported no issues with the latest versions, suggesting it may be environment-specific.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the desktop repository. If so, you can keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Nov 16 '24 16:11 dosubot[bot]

I noticed an error upon tryin to set Zen as default browser. Apparently it has an issue with how it's coded? image

However it's possible to force it but if i do that any link i click on outside the browser will not work. It would open Zen without actually opening the link in question. For example, if i use Krunner to search the web i get this weird thing. image

I am using the AppImage "zen-specific" on Linux OpenSUSE TW Wayland.

image Thank you ChatGPT.

Azarilh avatar Nov 17 '24 13:11 Azarilh

@mauro-balades, the user @Azarilh has indicated that the issue with setting Zen Browser as the default in KDE Plasma 6 is still relevant, noting specific errors and behavior when trying to open links. Could you please assist them with this issue?

dosubot[bot] avatar Nov 17 '24 13:11 dosubot[bot]

ChatGPT fixed my problem. Here's copy pasted, sorry about the meows.

Ah, the joys of Linux, where even setting a default browser becomes a philosophical exercise. Meow.

Here's what's going on: Zen browser isn't properly registering itself as a handler for HTTP and HTTPS protocols in the MIME type system, which is why KDE Plasma gets all huffy about "unsupported file types." Meow. When you force it, Zen opens because it technically launches as the default app, but it doesn’t know what to do with the passed link. Meow.

Let’s fix this nonsense. Meow. Here's how:

1. Manually Register the Browser

Zen needs to declare its capability to handle http and https protocols. Meow.

  • Open a terminal. Meow.
  • Edit the .desktop file for Zen, which should be somewhere like /usr/share/applications/ or ~/.local/share/applications/. Meow. The file will probably be named something like zen-browser.desktop. Meow.
  • Add or modify the following line under the [Desktop Entry] section: MimeType=x-scheme-handler/http;x-scheme-handler/https;
  • Save and exit. Meow.

2. Update MIME Database

Now tell your system to take the changes seriously. Meow. update-desktop-database ~/.local/share/applications If the .desktop file is in /usr/share/applications, adjust the command accordingly: sudo update-desktop-database /usr/share/applications Meow.

3. Set Zen as Default in KDE

Go back to System Settings > Applications > Default Applications, and set Zen as the default browser. Meow. Now KDE Plasma won’t throw a tantrum because Zen officially advertises its MIME support. Meow.

4. Fix the URL Issue

If Zen still can’t open links, it might not handle the passed URL argument correctly. Meow. Check the Exec line in the same .desktop file. Meow. It should look like this:

Exec=zen-browser %u

The %u tells Zen to expect a URL as an argument. Meow. Without it, Zen just sits there like a clueless cat staring at an empty bowl. Meow.

Once you've updated that, restart KDE (or just your session). Meow.

Test it out. Meow. If it still doesn’t work, Zen browser might just be allergic to KDE. Meow. In that case, you might want to check its documentation or consider if using Zen browser is worth the struggle. Meow.

Azarilh avatar Nov 17 '24 14:11 Azarilh

From my experience with the appimage (I should switch to the flatpak lol), when you press 'set as default' from in the browser, it sets this other weird version of Zen. In System Settings there is an option to set the default web browser, and there's two versions. One works (although Zen will complain that it isn't set as default - don't worry, it is).

MrPiggy105 avatar Dec 11 '24 01:12 MrPiggy105

Hi, @lts20050703. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The issue involves the inability to set Zen Browser as the default browser in KDE Plasma 6.
  • Users like @zakius and @InfamousBearGR reported similar issues, especially with the AppImage version.
  • Some users, such as @itstamimi and @DorianMaliszewski, had no issues using the Flatpak version.
  • Upgrading to the latest Ubuntu version resolved the issue for some users.
  • @Azarilh provided a workaround by manually registering the browser in the MIME type system.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the desktop repository. If so, you can keep the discussion open by commenting here.
  • If no further updates are provided, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Feb 10 '25 16:02 dosubot[bot]

I still have the same issue as @InfamousBearGR and @Azarilh. I will use Azarilh's workaround, but I think this issue should be addressed, not marked as "Done"

ThinkerDreamer avatar Nov 06 '25 16:11 ThinkerDreamer