all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#54784: Flatpak GTK apps cannot show pictures.
@ 2022-04-08  4:35 Zhu Zihao
  2022-04-20 20:00 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2022-04-08  4:35 UTC (permalink / raw)
  To: 54784

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


# Main issue

Solanum in flatpak failed to render its logo.

# Reproduce step

Run

```
guix shell flatpak
flatpak install org.gnome.Solanum
flatpak run org.gnome.Solanum
```

# Investigation

The issue maybe caused by missing gdk pixbuf loaders. Try `flatpak run
--command=sh --devel org.gnome.Solanum` enter the debug shell of flatpak
and run `strace -o s.log solanum`. Found something like

```
openat(AT_FDCWD, "/run/current-system/profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache",
O_RDONLY) = -1 ENOENT (没有那个文件或目录)
...

access("/run/current-system/profile/share/themes/Adwaita/gtk-4.6/gtk.css", F_OK) = -1 ENOENT (没有那个文件或目录)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.4/gtk.css", F_OK) = -1 ENOENT (没有那个文件或目录)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.2/gtk.css", F_OK) = -1 ENOENT (没有那个文件或目录)
access("/run/current-system/profile/share/themes/Adwaita/gtk-4.0/gtk.css", F_OK) = -1 ENOENT (没有那个文件或目录)

...

openat(AT_FDCWD, "/run/current-system/profile/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (没有那个文件或目录)
```

It shows that flatpak is trying to load GTK related resource from
/run/current-system/profile. And use

```
flatpak run --filesystem=/gnu/store:ro --filesystem=/run/current-system:ro org.gnome.Solanum
```

It works well.

# Related links

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/flatpak/bubblewrap-paths.patch

The solution of Nixpkgs is add these path and store to the flatpak
sandbox. I'm not sure whether it's good or not. Because user may want to
setup its own GUIX{2,3,4}_GTK_PATH and GDK_PIXBUF_LOADER_FILES.
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

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

* bug#54784: Flatpak GTK apps cannot show pictures.
  2022-04-08  4:35 bug#54784: Flatpak GTK apps cannot show pictures Zhu Zihao
@ 2022-04-20 20:00 ` Ludovic Courtès
  2022-04-21  5:45   ` Zhu Zihao
  2022-04-23  2:55   ` Zhu Zihao
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-04-20 20:00 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 54784

Hi,

Zhu Zihao <all_but_last@163.com> skribis:

> It shows that flatpak is trying to load GTK related resource from
> /run/current-system/profile. And use
>
> ```
> flatpak run --filesystem=/gnu/store:ro --filesystem=/run/current-system:ro org.gnome.Solanum
> ```
>
> It works well.
>
> # Related links
>
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/flatpak/bubblewrap-paths.patch

A patch like this one looks reasonable; it’s a transcription of what’s
done on FHS systems, so why not.

Would you like to give it a try?

Thanks,
Ludo’.




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

* bug#54784: Flatpak GTK apps cannot show pictures.
  2022-04-20 20:00 ` Ludovic Courtès
@ 2022-04-21  5:45   ` Zhu Zihao
  2022-04-23  2:55   ` Zhu Zihao
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu Zihao @ 2022-04-21  5:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 54784

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


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Zhu Zihao <all_but_last@163.com> skribis:
>
>> It shows that flatpak is trying to load GTK related resource from
>> /run/current-system/profile. And use
>>
>> ```
>> flatpak run --filesystem=/gnu/store:ro --filesystem=/run/current-system:ro org.gnome.Solanum
>> ```
>>
>> It works well.
>>
>> # Related links
>>
>> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/flatpak/bubblewrap-paths.patch
>
> A patch like this one looks reasonable; it’s a transcription of what’s
> done on FHS systems, so why not.

Guix users often use declarative configuartion. So my concern is
mounting the whole store into flatpak sandbox will leak unneccesary
user secrets.
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

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

* bug#54784: Flatpak GTK apps cannot show pictures.
  2022-04-20 20:00 ` Ludovic Courtès
  2022-04-21  5:45   ` Zhu Zihao
@ 2022-04-23  2:55   ` Zhu Zihao
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu Zihao @ 2022-04-23  2:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 54784

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


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Zhu Zihao <all_but_last@163.com> skribis:
>
>> It shows that flatpak is trying to load GTK related resource from
>> /run/current-system/profile. And use
>>
>> ```
>> flatpak run --filesystem=/gnu/store:ro --filesystem=/run/current-system:ro org.gnome.Solanum
>> ```
>>
>> It works well.
>>
>> # Related links
>>
>> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/flatpak/bubblewrap-paths.patch
>
> A patch like this one looks reasonable; it’s a transcription of what’s
> done on FHS systems, so why not.
>
> Would you like to give it a try?
>
> Thanks,
> Ludo’.

See https://issues.guix.gnu.org/55072

-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

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

end of thread, other threads:[~2022-04-23  2:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08  4:35 bug#54784: Flatpak GTK apps cannot show pictures Zhu Zihao
2022-04-20 20:00 ` Ludovic Courtès
2022-04-21  5:45   ` Zhu Zihao
2022-04-23  2:55   ` Zhu Zihao

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.