bug#51058: xdg-open wrong path in qt based applications (links wont be open)

2021-10-19 Thread Hamzeh Nasajpour
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





bug#51058: xdg-open wrong path in qt based applications (links wont be open)

2021-10-06 Thread Hamzeh Nasajpour
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-x4 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-x4 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-x4 root  root 4096 Jan  1  1970 
3g26il93p23p4fcg1hfn797n4blqh0f6-xdg-utils-1.1.3/
dr-xr-xr-x4 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-x4 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-x4 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