10

When I click on links in some applications it can take up to a minute until the open in the browser. This is regardless if the default browser is chrome or firefox.

Example applications where opening links is normally fast:

  • within the browser
  • Konsole (default terminal window)
  • franz (installed as snap application)
  • tusk (installed as snap application)

Example applications where opening links take up to a minute until a new tab is opened in the browser:

  • rider (installed as snap application)
  • slack (installed as snap application)
  • VS Code (installed as snap application)

This started after I upgraded today to Kubuntu 19.04 from Kubuntu 18.10

VS Code, Slack, Franz AND Tusk are all based on electron, it seems weird that one would behave differently from the other, but that's what I see.

Is this a known issue? How can I fix it? How can I figure out where that time is lost?

Update:

Even running xdg-open https://askubuntu.com/questions/ask inside the terminal in rider, it was stuck for a long time:

> $ time xdg-open https://askubuntu.com/questions/ask
xdg-open https://askubuntu.com/questions/ask  0,12s user 0,07s system 0% cpu 2:05,35 total

however, running xdg-open from konsole works fast and both of them seem to be pointing to the same application, running it from a terminal within VSCode showed some errors, I resolved them and afterwards it was quick, but clicking on link in VSCode was still slow.

I'm not sure how to look for the root cause for this.

Update 2:

I also installed sudo apt-get install ttf-mscorefonts-installer around the same time I upgraded kubuntu from 18.10 to 19.04 - I can't imagine that having anything to do with it, but if nobody else has this issue

peter
  • 203

4 Answers4

15

I was having the same issue until I found a solution. Whenever I tried to click a link in Slack, the logs in journalctl -f showed:

xdg-desktop-portal-kde[1886]: xdp-kde-settings: Read called with parameters:
xdg-desktop-portal-kde[1886]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
xdg-desktop-portal-kde[1886]: xdp-kde-settings:     key:  "menuFont"
xdg-desktop-portal-kde[1886]: xdp-kde-settings: Key  "menuFont"  doesn't exist"

It turns out I was missing some values in my .config/kdeglobals configuration file, as the error above shows. You can regenerate the missing values by going to System Configuration -> Fonts -> Do any random change -> Apply.

After doing this the links started working fine.

Adan Koch
  • 331
2

When opened with affected apps (i.e. Slack) it hangs on "kde-open5 https://some-url" (which is launched by xdg-open).

I've tried to debug this with strace:

mv /usr/bin/kde-open5 /usr/bin/kde-open5.orig

Then created an executable (chmod 755) /usr/bin/kde-open5 with the following content:

#!/bin/bash

strace -f -s 1000 -tt /usr/bin/kde-open5.orig $@ &>/tmp/kde-open5-$RANDOM.log

And seeing where exactly it hangs.

I think it deserves its own Launchpad ticket?

0

I have a dual boot system with the KDE UBUNTU so i looked for the fonts folder under Windows directory, then copied the thing in fonts directory created in my home although in hindsight could have been left there. So went to the configuration system System Configuration -> Fonts -> there i went to fonts management and added new fonts wizard, navigated to that folder i created and then CTR+A and clicked open and it asked me to skip some fonts and I went with Skip all for those already installed. Bob's you uncle change default to arial form my school assignment and libreoffice cooperates nicely after log out of system and log back in so . thanks for all of this

0

Here is my approach to resolving it (Ubuntu with gnome/unity 18.04/20.04):

  1. use
journalctl -f

to monitor what happens when I click on a link.

log:

Dec 16 09:54:03 userDesktop dbus-daemon[3545]: [session uid=1000 pid=3545] Activating via systemd: service name='org.freedesktop.portal.Documents' unit='xdg-document-portal.service' requested by ':1.116' (uid=1000 pid=10598 comm="/snap/bin/firefox https://www.youtube.com/watch?v=" label="unconfined")
Dec 16 09:54:03 userDesktop systemd[3533]: Starting flatpak document portal service...
Dec 16 09:54:03 userDesktop xdg-document-portal[10623]: error: Failed to load db from '/home/user/.local/share/flatpak/db/documents': invalid gvdb header
Dec 16 09:54:03 userDesktop systemd[3533]: xdg-document-portal.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 16 09:54:03 userDesktop systemd[3533]: xdg-document-portal.service: Failed with result 'exit-code'.
Dec 16 09:54:03 userDesktop systemd[3533]: Failed to start flatpak document portal service.
Dec 16 09:54:07 userDesktop systemd[3533]: Started Application launched by gsd-media-keys.
Dec 16 09:54:07 userDesktop systemd[3533]: Started VTE child process 10634 launched by gnome-terminal-server process 4247.
Dec 16 09:54:07 userDesktop systemd[3533]: gnome-launched-x-terminal-emulator-10625.scope: Succeeded.
Dec 16 09:54:43 userDesktop pkexec[10976]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Dec 16 09:54:43 userDesktop pkexec[10976]: user: Executing command [USER=root] [TTY=unknown] [CWD=/home/user] [COMMAND=/usr/lib/update-notifier/package-system-locked]
  1. According to this, Just
mv ~/.local/share/flatpak/db ~/.local/share/flatpak/db.back

and problem resolved!

Sadra
  • 360