Application links are not working

Hello,
I have installed Google Chrome and make it default browser, but I am facing issue like any application installed in my system not opening any kind of link like I have installed slack or skype someone shared any link when I click on link it will open new window of chrome, but it will not open link always blank window

thanks in advance

It sounds like Chrome is acting like your default browser but is not opening the URL.

  1. I assume you made Chrome your default browser by going to:

    XFCE settings > Default Applications > Internet > Web Browser.

  2. There should be a file, /usr/share/applications/google-chrome.desktop. In the file there is at least one line that looks like:

   Exec=/usr/bin/google-chrome-stable %U

The %U is the important part. It is documented here. This was already set for me when I installed the package google-chrome from AUR. Did you create your own desktop file or install a different package?

There are various commands (xdg-mime, mimetype, file) that try to determine what application handles a mimetype or what mimetype a file is. Example:

gio mime x-scheme-handler/http
xdg-mime query default text/html

One thing I noticed, even though a user might have set the default browser, XFCE doesn’t change the application for specific mimetypes (Default Applications > Others) if “User Set”. They could be changed in the GUI or in the file ~/.config/mimeapps.list.

Thank you very much for your response

actually when I click on any link it will open chrome
problem is that if I open a link from Skype or any other application it will open just blank Chrome window even chrome is already open
technically, when I click on any link it should open in already append chrome new tab but it will open new window and address bar is empty

i hope you understand

There’s several places where this could go wrong.

There’s three places where links are configured to open the default browser - where $1 is the desktop file of the browser to be used.

xdg-mime default "$1" x-scheme-handler/https
xdg-mime default "$1" x-scheme-handler/http
xdg-settings set default-web-browser "$1"

Times ago I wrote a small script to easily switch default browser

So when you click a link, another Chrome is started with a blank page. If you click the link again, does it open another Chrome with a blank page, and so on? The actual webpage is never displayed?

I tested a link in 3 locations and they all displayed in Chrome, on a separate Tab.

I tested with:

  • Skype
  • xfce4-terminal > Help > About > Visit Xfce Terminal website
  • executed the command, pacman -Qi pacman, and middle-mouse-clicked the URL (requires: Edit > Preferences > Advanced > Use middle mouse click to open URLS)

I’m not a big google-chrome user. Could it be a google-chrome setting. HHHmmm…

A side note, I ran into an interesting gotcha. For the life of me, I couldn’t figure out who and when the lines below were added to $HOME/.config/mimeapps.list.

x-scheme-handler/http=xfce4-web-browser.desktop
x-scheme-handler/https=xfce4-web-browser.desktop

It turns out, when a user uses the XFCE Settings Manger to change the Default Browser, the XFCE Settings daemon, xfsettingsd, adds them. This brings home a key point, the daemon gets notified when a change is made if the user uses the GUI. So if a change is made manually (i.e., edit the file), it’s probably necessary to logoff/on. The daemon has a --replace option, but I haven’t tested it to see if it will pick up the changes. Logoff/on is simple and it takes a lot of potential problems off the table.

Compare the ouput with your system:

===> gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: xfce4-web-browser.desktop
Registered applications:
	xfce4-web-browser.desktop
	firefox.desktop
	google-chrome.desktop
Recommended applications:
	xfce4-web-browser.desktop
	firefox.desktop
	google-chrome.desktop

Note: There is a difference between google-chrome.desktop, firefox.desktop, and xfce4-web-browser.desktop. The later uses exo-open which is the XFCE way to open URLS. See man exo-open.

===> locate xfce4-web-browser.desktop
/usr/share/applications/xfce4-web-browser.desktop

Note: locate is from the mlocate package. The program, updatedb, runs on a systemd timer (updatedb.timer). I don’t believe it is installed by default. You could just check that the file exists in the /usr/share/applications directory. Also check your $HOME directory ( find ~ -type f -name 'xfce4-web*').

# replace the file if found in your home directory, which overrides the system.
===> grep -i 'exec' /usr/share/applications/xfce4-web-browser.desktop
Exec=exo-open --launch WebBrowser %u

If all the above output was the same and nothing helped above, make sure you are getting the correct desktop file:

  1. cd $HOME/.local/share/applications
    Note: You may need to create the applications directory.
  2. cp /usr/share/applications/xfce4-web-browser.desktop .
    Note: The dot is current directory.
  3. edit copied xfce4-web-browser.desktop and change the Exec line (see above).
    I just executed another application like /usr/bin/manjaro-documentation.
    Note: Remember to remove this desktop file after the test.

The goal is, when you click on a link, you should see whatever is in the Exec line. This will prove at
least you are getting the correct desktop file. The desktop file is provided by the package xfce4-settings.

# what package owns this file
pacman -Fx xfce4-web-browser.desktop

# info about package from output  (i.e., Required By)
pacman -Qi xfce4-settings

Hope this helps track down the problem.

exactly you are getting my point

Nope my kids are using it without any issue

gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: xfce4-web-browser.desktop
Registered applications:
	xfce4-web-browser.desktop
	firefox.desktop
	google-chrome.desktop
Recommended applications:
	xfce4-web-browser.desktop
	firefox.desktop
	google-chrome.desktop

[quote="stargazer, post:5, topic:121613"]
`locate`
[/quote]

` locate xfce4-web-browser.desktop
/home/zeeshan/.local/share/applications/xfce4-web-browser.desktop
/usr/share/applications/xfce4-web-browser.desktop

[quote="stargazer, post:5, topic:121613"]
`replace the file`
[/quote]

My result

grep -i 'exec' /usr/share/applications/xfce4-web-browser.desktop
Exec=exo-open --launch WebBrowser %u

Result

pacman -Fx xfce4-web-browser.desktop
extra/xfce4-settings 4.16.3-1 (xfce4) [installed]
    usr/share/applications/xfce4-web-browser.desktop

Result

pacman -Qi xfce4-settings
Name            : xfce4-settings
Version         : 4.16.3-1
Description     : Settings manager of the Xfce desktop
Architecture    : x86_64
URL             : https://docs.xfce.org/xfce/xfce4-settings/start
Licenses        : GPL2
Groups          : xfce4
Provides        : None
Depends On      : exo  garcon  libxfce4ui  xfconf  libnotify  libcanberra  colord  libxklavier  adwaita-icon-theme  gnome-themes-extra
Optional Deps   : python: xfce4-compose-mail -- "mailto:" URI handling [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 4.35 MiB
Packager        : Evangelos Foutras <foutrelis@archlinux.org>
Build Date      : Tue 05 Jul 2022 07:32:42 PM PKT
Install Date    : Wed 13 Jul 2022 10:36:51 AM PKT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

i have shared all information

now can you please write some simple steps to resolve this issue

Thank you very much for your support and time

Sorry, I’m all out of ideas. It works on my XFCE and as hard as I tried I couldn’t replicate your issue. Perhaps someone else can chime in. Good luck.