xdg-open wrong path in qt based applications (links wont be open)

  • Open
  • quality assurance status badge
Details
One participant
  • Hamzeh Nasajpour
Owner
unassigned
Submitted by
Hamzeh Nasajpour
Severity
normal
H
H
Hamzeh Nasajpour wrote on 6 Oct 2021 13:50
(address . bug-guix@gnu.org)
09d65e67-6927-42fb-97c9-0f76134fad0c@www.fastmail.com
I have an issue with opening the links in Qt based applications, like `lxqt-panel`, `qterminal` and I think all of the Qt based application. I mean, I can't open the `file:///home/hamzeh/` in these applications. I get the following error:

```
Launch failed (/gnu/store/bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/bin/xdg-open ....)
```

As you can see, it wants to run `xdg-open` from `/gnu/store/bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/` path and this path isn't available. This `xdg-open` path has patched here: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/qt.scm?id=f868ed2a75b55400107b80fcc1e41dcfb6b3c28c#n447 So all of the application that are using `QDesktopServices::openUrl()` have this issue, since this path has filled with wrong value in the `qtbase` package.

Also the `xdg-utils` is installed but in the different path, the correct and current installed path is:

```
/gnu/store/0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/
```

The workaround is installing the `xdg-utils` manually, but it's a temporary solution since after running the `guix gc`, again I'll face with this issue.

Some details:

1. In the fresh install I have the `xdg-utils` in the store at this path:

```
$ ll /gnu/store/ | grep xdg-utils
dr-xr-xr-x 4 root root 4096 Jan 1 1970 0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/
```
and I can't open the links in Qt applications.

2. After installing the `xdg-utils` manually, two `xdg-utils` paths were added to store:
```
$ ll /gnu/store/ | grep xdg-utils
dr-xr-xr-x 4 root root 4096 Jan 1 1970 0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/
-r--r--r-- 2 root root 1120 Jan 1 1970 35m23zhgbc4rrjrf36dag9abx7r6fnji-xdg-utils-1.1.3-guile-builder
dr-xr-xr-x 4 root root 4096 Jan 1 1970 3g26il93p23p4fcg1hfn797n4blqh0f6-xdg-utils-1.1.3/
dr-xr-xr-x 4 root root 4096 Jan 1 1970 bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/
-r--r--r-- 2 root root 3739 Jan 1 1970 makz45834k44dg1x1h1v91nqib41wd91-xdg-utils-1.1.3.drv
-r--r--r-- 2 root root 5706 Jan 1 1970 mix35kkjk3prj2kwi96qx74biwqbmxx7-xdg-utils-1.1.3-guile-builder
-r--r--r-- 2 root root 1269 Jan 1 1970 sz8s218fxvq8hr1ikn4m8g1z3ydbprbs-xdg-utils-1.1.3.drv
-r--r--r-- 2 root root 909 Jan 1 1970 zbvwka7a27baz22w8k78jyjkrqaxcc4v-xdg-utils-1.1.3.tar.gz.drv
```
there is no issue with opening the links at this state.

3. After running the `guix gc` the `xdg-utils` path are:
```
$ ll /gnu/store/ | grep xdg-utils
dr-xr-xr-x 4 root root 4096 Jan 1 1970 0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/
-r--r--r-- 2 root root 1120 Jan 1 1970 35m23zhgbc4rrjrf36dag9abx7r6fnji-xdg-utils-1.1.3-guile-builder
dr-xr-xr-x 4 root root 4096 Jan 1 1970 3g26il93p23p4fcg1hfn797n4blqh0f6-xdg-utils-1.1.3/
-r--r--r-- 2 root root 3739 Jan 1 1970 makz45834k44dg1x1h1v91nqib41wd91-xdg-utils-1.1.3.drv
-r--r--r-- 2 root root 5706 Jan 1 1970 mix35kkjk3prj2kwi96qx74biwqbmxx7-xdg-utils-1.1.3-guile-builder
-r--r--r-- 2 root root 1269 Jan 1 1970 sz8s218fxvq8hr1ikn4m8g1z3ydbprbs-xdg-utils-1.1.3.drv
-r--r--r-- 2 root root 909 Jan 1 1970 zbvwka7a27baz22w8k78jyjkrqaxcc4v-xdg-utils-1.1.3.tar.gz.drv
```

And in this state, again, there is an issue with opening the links:
```
Launch failed (/gnu/store/bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/bin/xdg-open ....)
```

And again I can install `xdg-utils`, it cause to adding `bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/` to store and the issue will be fixed but after each `guix gc`, again I have the issue.


(1). I need to fix the issue permanently and also without installing `xdg-utils` manually. How?

(2). Seems that `qtbase` are referring to a wrong path (`bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/`) here: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/qt.scm?id=f868ed2a75b55400107b80fcc1e41dcfb6b3c28c#n447
Why? and where does this wrong path come from?

(3) Why after installing the `xdg-utils` I have those new paths in my store? And why after `guix gc` they will be deleted?

Regards,

--

Hamzeh Nasajpour
PantherX Team
H
H
Hamzeh Nasajpour wrote on 7 Oct 2021 12:34
Some new details
(address . 51058@debbugs.gnu.org)
1c282641-07aa-4b2b-b928-496208f964d9@www.fastmail.com
After `guix gc`, I have `xdg-utils` at this path only: `/gnu/store/0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/`.
This `xdg-utils` has two dependencies to `xset` and `xprops` at these paths:

```
$ guix gc --references /gnu/store/0zdclmgw5gnpifwb7jyrmplrk13wp0yz-xdg-utils-1.1.3/
...
/gnu/store/zn8frmg17rr7jgyyzj169wrhrmsw1m63-xset-1.2.4
/gnu/store/x236bfhg4zy6bbl6hxhy9wx3pl3kz7vz-xprop-1.2.5
```

These two packages has a dependency to `libx11`:
```
$ guix gc --references /gnu/store/x236bfhg4zy6bbl6hxhy9wx3pl3kz7vz-xprop-1.2.5
...
/gnu/store/zm5x7j8vaaqr5nfrzi2ql96p5rgbj8sr-libx11-1.7.1A
```

```
$ guix gc --references /gnu/store/zn8frmg17rr7jgyyzj169wrhrmsw1m63-xset-1.2.4
...
/gnu/store/zm5x7j8vaaqr5nfrzi2ql96p5rgbj8sr-libx11-1.7.1A
```

As you see these two packages have been installed with `libx11@1.7.1A`.

While if I install the `xdg-utils` manually:
it will be installed at `/gnu/store/bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/`. And these are the references:

```
$ guix gc --references /gnu/store/bi4m86lripz4fhhi4c34ylg5ckxsrqzs-xdg-utils-1.1.3/
...
/gnu/store/0yfzf5wna1p5lds02pmazxm7gir8xl2k-xprop-1.2.5
/gnu/store/jg30cnk360pfrnwcfk9z2jkv0gcasa6j-xset-1.2.4
```

```
$ guix gc --references /gnu/store/0yfzf5wna1p5lds02pmazxm7gir8xl2k-xprop-1.2.5
...
/gnu/store/zyx5mhkpfyssvwljhpv5qv1iz1g2aqq3-libx11-1.6.10
```

```
$ guix gc --references /gnu/store/jg30cnk360pfrnwcfk9z2jkv0gcasa6j-xset-1.2.4
...
/gnu/store/zyx5mhkpfyssvwljhpv5qv1iz1g2aqq3-libx11-1.6.10
```

Generally the difference comes from building `libx11@1.6.10` and `libx11@1.7.1A`. The `libx11@1.7.1A` has been installed as default as a dependency of `xdg-utils`, and `libx11@1.6.10` will be installed as a dependency after installing the `xdg-utils` manually.

Any idea?


--

Hamzeh Nasajpour
PantherX Team
H
H
Hamzeh Nasajpour wrote on 19 Oct 2021 10:57
RE: xdg-open wrong path in qt based applications (links wont be open)
(address . 51058@debbugs.gnu.org)
616779b9-6bf5-41eb-a295-38d1351dc9b2@www.fastmail.com
You can replicate the issue with this minimal operating system configuration:

```
(use-modules (gnu)
(gnu system nss)
(gnu packages kde-plasma))

(use-service-modules desktop networking ssh sddm dbus)

(use-package-modules ssh certs tls lxqt xorg)

(operating-system
(host-name "panther")
(timezone "Asia/Tehran")
(locale "en_US.utf8")
;; Boot in "legacy" BIOS mode
(bootloader
(bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))

(file-systems
(cons
(file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4"))
%base-file-systems))

(users
(cons
(user-account
(name "user")
(password "1234")
(group "users")
(supplementary-groups '("wheel" "audio" "video"))
(home-directory "/home/user"))
%base-user-accounts))
(packages
(cons*
openssh
nss-certs
gnutls
lxqt
lxqt-globalkeys
%base-packages))
(services
(cons*
(sddm-service
(sddm-configuration
(minimum-uid 1000)
(theme "elarun")))
(elogind-service)
(udisks-service)
(dbus-service)
(service polkit-service-type)
(service upower-service-type)
(service dhcp-client-service-type)
;; network configuration
(service openssh-service-type
(openssh-configuration
(port-number 22)
(permit-root-login #t)
(authorized-keys
`(("user" ,(local-file "/etc/vagrant.pub"))
("root" ,(local-file "/etc/vagrant.pub"))))))
(service wpa-supplicant-service-type)
%base-services))

;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
```

1. Now, please login and add `Directory Menu` widget to `lxqt-panel`.
2. Click on `Directory Menu`, click on somewhere to open a folder.
3. You can't open none of them via `Directory Menu`.

Any idea?

--

Hamzeh Nasajpour
PantherX Team
?