Links not opening a tab in my browser when clicked

Sorry if this has been asked before but I can’t seem to find a fix.
Basically when I click a link in any app nothing happens. I double checked if my browser is set as default browser with xdg-settings get default-web-browser and it outputs firefox.desktop. I also checked in htop, xdg-open isn’t called when I click a link, in fact no new xdg process starts when I click a link. I’m fairly new to linux and eos so I don’t know what I should link with this post to help solve this issue.

What are the outputs of:

$ xdg-mime query default x-scheme-handler/https

and

$ xdg-mime query default x-scheme-handler/http

You might have set the default browser, but xdg may still need to associate the url handling schemes to the browser.

I just did it, both send firefox.desktop as output.

That’s strange.

In any app? What apps have you tried? If you click on a link in your terminal emulator, it won’t work as well?

Can you show an example of the issue (with a screenshot, for example)?

I can open links using xdg-open http(s)://test.url in the terminal.

I tried in discord, obs, intellij, and protonup-qt, none of them worked.

I don’t really know what I should screenshot because when I click there is literally nothing happening (or at least I didn’t find what is happening)

What is the output of:

$ echo $BROWSER

It just shows firefox
image

Does it work if you lauch Discord from the terminal and pass the following environment variable to it?

$ DBUS_SESSION_BUS_ADDRESS="autolaunch:" discord

Discord didn’t even open (I’m using the flatpak version)

If I’m not mistaken, you need to have xdg-desktop-portal-gtk installed if you are using sandboxed apps.

Do you have it installed?

I didn’t, I just installed it and checked if I could open a link now, still didn’t work. Do I need to reboot my pc ?

Yeah. I think so. Dbus service probably needs to be restarted.

It’s probably faster to try, than to wait for an answer to that question. :rofl:

5 Likes

I tried running it again with xdg-desktop-portal-gtk installed and it still didn’t work. The output is the same as my previous attempt.

What desktop environment are you using?

Edit:
Also post the output of

$ systemctl --user status xdg-desktop-portal

This is the output I get

What’s the output of:

$ echo $XDG_CURRENT_DESKTOP

It just outputs KDE

Create this file ~/.config/xdg-desktop-portals/kde-portals.conf with the following contents:

[preferred]
default=gtk

After that, restart the desktop portal services:

$ systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service

It worked !! Thank you !