Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] imhex: use gtk file picker by default
@ 2023-07-15 14:43 Zapeth
  2023-07-15 21:09 ` classabbyamp
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Zapeth @ 2023-07-15 14:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

There is a new pull request by Zapeth against master on the void-packages repository

https://github.com/Zapeth/void-packages imhex-fix-filepicker
https://github.com/void-linux/void-packages/pull/45054

imhex: use gtk file picker by default
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also https://github.com/WerWolv/ImHex/issues/882#issuecomment-1382268291

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**


A patch file from https://github.com/void-linux/void-packages/pull/45054.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-imhex-fix-filepicker-45054.patch --]
[-- Type: text/x-diff, Size: 1422 bytes --]

From a33cb5854a1feedf0bb1963d3c669d5df7bf9ed5 Mon Sep 17 00:00:00 2001
From: Zapeth <Zapeth@users.noreply.github.com>
Date: Sat, 15 Jul 2023 14:31:04 +0000
Subject: [PATCH] imhex: use gtk file picker by default

Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also https://github.com/WerWolv/ImHex/issues/882#issuecomment-1382268291
---
 srcpkgs/imhex/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/imhex/template b/srcpkgs/imhex/template
index 3f7f4750389e..d25585caf271 100644
--- a/srcpkgs/imhex/template
+++ b/srcpkgs/imhex/template
@@ -1,14 +1,15 @@
 # Template file for 'imhex'
 pkgname=imhex
 version=1.30.1
-revision=1
+revision=2
 build_wrksrc="ImHex"
 build_style=cmake
 build_helper=qemu
 # XXX: when capstone v5 is out, -DUSE_SYSTEM_CAPSTONE=ON
 configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF
  -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON
- -DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_DISABLE_UPDATE_CHECK=ON"
+ -DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_DISABLE_UPDATE_CHECK=ON
+ -DIMHEX_USE_GTK_FILE_PICKER=ON"
 hostmakedepends="pkg-config clang-tools-extra"
 makedepends="libcurl-devel fmt-devel llvm jansson-devel yara-devel json-c++
  freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
@ 2023-07-15 21:09 ` classabbyamp
  2023-07-15 23:00 ` Zapeth
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-15 21:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1636886947

Comment:
why not just install `xdg-desktop-portal-gtk` alongside `xdg-desktop-portal-wlr`?

> For example, a [Sway](https://wiki.archlinux.org/title/Sway) user may use [xdg-desktop-portal-wlr](https://archlinux.org/packages/?name=xdg-desktop-portal-wlr) for screen sharing support and [xdg-desktop-portal-gtk](https://archlinux.org/packages/?name=xdg-desktop-portal-gtk) as a fallback for all other interfaces that xdg-desktop-portal-wlr does not implement.

[source](https://wiki.archlinux.org/title/XDG_Desktop_Portal#:~:text=For%20example%2C%20a%20Sway%20user%20may%20use%20xdg%2Ddesktop%2Dportal%2Dwlr%20for%20screen%20sharing%20support%20and%20xdg%2Ddesktop%2Dportal%2Dgtk%20as%20a%20fallback%20for%20all%20other%20interfaces%20that%20xdg%2Ddesktop%2Dportal%2Dwlr%20does%20not%20implement.)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
  2023-07-15 21:09 ` classabbyamp
@ 2023-07-15 23:00 ` Zapeth
  2023-07-17  4:26 ` classabbyamp
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Zapeth @ 2023-07-15 23:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

New comment by Zapeth on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1636908531

Comment:
Well for one I haven't been able to get the file picker working, even with `xdg-desktop-portal-gtk` installed (though I'm not sure if I installed it correctly).

But even if it works, it would add an implicit dependency for users with such environments, making it more time-consuming to properly install/setup.

So instead I think the question should be, are there reasons why this shouldn't be set as default?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
  2023-07-15 21:09 ` classabbyamp
  2023-07-15 23:00 ` Zapeth
@ 2023-07-17  4:26 ` classabbyamp
  2023-07-17  5:35 ` classabbyamp
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-17  4:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1637358506

Comment:
ok I set up a sway environment to test this and while I can reproduce it (see also https://github.com/WerWolv/ImHex/issues/723), I don't think forced-gtk should be forced for all users. I've reached out to upstream about making it possible to fall back to the native file dialog if portals fail.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (2 preceding siblings ...)
  2023-07-17  4:26 ` classabbyamp
@ 2023-07-17  5:35 ` classabbyamp
  2023-07-17  5:36 ` classabbyamp
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-17  5:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1637408103

Comment:
with some further testing, I was able to get it to work, with `/usr/libexec/xdg-desktop-portal` and `/usr/libexec/xdg-desktop-portal-gtk` running in terminals instead of being launched by dbus. this tells me it's probably some kind of environment issue

![image](https://github.com/void-linux/void-packages/assets/5366828/0aa2edc7-2330-4dcc-8cda-638608a787ff)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (3 preceding siblings ...)
  2023-07-17  5:35 ` classabbyamp
@ 2023-07-17  5:36 ` classabbyamp
  2023-07-17  6:38 ` classabbyamp
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-17  5:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1637408103

Comment:
with some further testing, I was able to get it to work, with `/usr/libexec/xdg-desktop-portal` and `/usr/libexec/xdg-desktop-portal-gtk` running in terminals instead of being launched by dbus. this tells me it's probably some kind of environment issue. I also needed to install `gsettings-desktop-schemas` to get the `gtk` portal to launch.

![image](https://github.com/void-linux/void-packages/assets/5366828/0aa2edc7-2330-4dcc-8cda-638608a787ff)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (4 preceding siblings ...)
  2023-07-17  5:36 ` classabbyamp
@ 2023-07-17  6:38 ` classabbyamp
  2023-07-17  6:38 ` [PR PATCH] [Closed]: " classabbyamp
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-17  6:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1637461153

Comment:
this is a portal configuration issue: https://github.com/WerWolv/ImHex/issues/723#issuecomment-1637458177

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Closed]: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (5 preceding siblings ...)
  2023-07-17  6:38 ` classabbyamp
@ 2023-07-17  6:38 ` classabbyamp
  2023-07-17 20:28 ` Zapeth
  2023-07-17 20:28 ` Zapeth
  8 siblings, 0 replies; 10+ messages in thread
From: classabbyamp @ 2023-07-17  6:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

There's a closed pull request on the void-packages repository

imhex: use gtk file picker by default
https://github.com/void-linux/void-packages/pull/45054

Description:
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also https://github.com/WerWolv/ImHex/issues/882#issuecomment-1382268291

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (6 preceding siblings ...)
  2023-07-17  6:38 ` [PR PATCH] [Closed]: " classabbyamp
@ 2023-07-17 20:28 ` Zapeth
  2023-07-17 20:28 ` Zapeth
  8 siblings, 0 replies; 10+ messages in thread
From: Zapeth @ 2023-07-17 20:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

New comment by Zapeth on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1638823499

Comment:
> I also needed to install `gsettings-desktop-schemas` to get the gtk portal to launch.

Thanks for looking into this, it seems thats what I was missing

I wonder why `gsettings-desktop-schemas` is not set as a dependency for `xdg-desktop-portal-gtk`, at least Arch has it set up like that?

Though when trying it for the first time, the file picker opened only after a significant delay, I guess due to this (last line)
```
2023-07-17T20:00:00.54498 daemon.info: Jul 17 20:00:00 dbus-daemon[1000]: [session uid=1000 pid=998] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
2023-07-17T20:00:00.55806 daemon.info: Jul 17 20:00:00 dbus-daemon[1000]: [session uid=1000 pid=998] Activating service name='org.freedesktop.impl.portal.desktop.wlr' requested by ':1.101' (uid=1000 pid=14750 comm="/usr/libexec/xdg-desktop-portal")
2023-07-17T20:00:50.62803 daemon.info: Jul 17 20:00:50 dbus-daemon[1000]: [session uid=1000 pid=998] Successfully activated service 'org.freedesktop.portal.Desktop'
2023-07-17T20:02:00.55877 auth.notice: Jul 17 20:02:00 dbus-daemon[1000]: [session uid=1000 pid=998] Failed to activate service 'org.freedesktop.impl.portal.desktop.wlr': timed out (service_start_timeout=120000ms)
```

When trying to launch `xdg-desktop-portal-wlr` directly in terminal I get `2023/07/17 20:17:59 [ERROR] - dbus: failed to connect to user bus: No such file or directory`

https://github.com/emersion/xdg-desktop-portal-wlr doesn't list any special requirements/setup, but maybe I'm again missing something here? (eg I don't have pipewire installed)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imhex: use gtk file picker by default
  2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
                   ` (7 preceding siblings ...)
  2023-07-17 20:28 ` Zapeth
@ 2023-07-17 20:28 ` Zapeth
  8 siblings, 0 replies; 10+ messages in thread
From: Zapeth @ 2023-07-17 20:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

New comment by Zapeth on void-packages repository

https://github.com/void-linux/void-packages/pull/45054#issuecomment-1638823499

Comment:
> I also needed to install `gsettings-desktop-schemas` to get the gtk portal to launch.

Thanks for looking into this, it seems thats what I was missing

I wonder why `gsettings-desktop-schemas` is not set as a dependency for `xdg-desktop-portal-gtk`, at least Arch has it set up like that?

Though when trying it for the first time, the file picker opened only after a significant delay, I guess due to this (last line)
```
2023-07-17T20:00:00.54498 daemon.info: Jul 17 20:00:00 dbus-daemon[1000]: [session uid=1000 pid=998] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
2023-07-17T20:00:00.55806 daemon.info: Jul 17 20:00:00 dbus-daemon[1000]: [session uid=1000 pid=998] Activating service name='org.freedesktop.impl.portal.desktop.wlr' requested by ':1.101' (uid=1000 pid=14750 comm="/usr/libexec/xdg-desktop-portal")
2023-07-17T20:00:50.62803 daemon.info: Jul 17 20:00:50 dbus-daemon[1000]: [session uid=1000 pid=998] Successfully activated service 'org.freedesktop.portal.Desktop'
2023-07-17T20:02:00.55877 auth.notice: Jul 17 20:02:00 dbus-daemon[1000]: [session uid=1000 pid=998] Failed to activate service 'org.freedesktop.impl.portal.desktop.wlr': timed out (service_start_timeout=120000ms)
```

When trying to launch `xdg-desktop-portal-wlr` directly in terminal I get `2023/07/17 20:17:59 [ERROR] - dbus: failed to connect to user bus: No such file or directory`

https://github.com/emersion/xdg-desktop-portal-wlr doesn't list any special requirements/setup, but maybe I'm again missing something here? (eg I don't have pipewire installed)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-17 20:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-15 14:43 [PR PATCH] imhex: use gtk file picker by default Zapeth
2023-07-15 21:09 ` classabbyamp
2023-07-15 23:00 ` Zapeth
2023-07-17  4:26 ` classabbyamp
2023-07-17  5:35 ` classabbyamp
2023-07-17  5:36 ` classabbyamp
2023-07-17  6:38 ` classabbyamp
2023-07-17  6:38 ` [PR PATCH] [Closed]: " classabbyamp
2023-07-17 20:28 ` Zapeth
2023-07-17 20:28 ` Zapeth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).