# Curious GTk issue with Anydesk / svg pixbuf loader

**URL:** https://discourse.nixos.org/t/curious-gtk-issue-with-anydesk-svg-pixbuf-loader/1736
**Category:** Development
**Created:** [December 22, 2018, 10:38am UTC](https://discourse.nixos.org/t/curious-gtk-issue-with-anydesk-svg-pixbuf-loader/1736 "2018-12-22T10:38:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xte](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/x/7cd45c/32.png) [@xte](https://discourse.nixos.org/u/xte)
#### Post date: [December 22, 2018, 10:38am UTC](https://discourse.nixos.org/t/curious-gtk-issue-with-anydesk-svg-pixbuf-loader/1736/1 "2018-12-22T10:38:24Z")

</div>

Hello Nixers,  
hope to choose the right category… After my latest update (relevant  
changes potentially happen few days ago since I update today after  
a week) anydesk package seems to be broken due to a GTk issue I do not  
understand…

I think the error is there (strace output, running anydesk)

```auto
openat(AT_FDCWD, "$(echo /nix/store/5xbmbiynhpyq59bxwa7xw4hszkh6fgz6-librsvg-2.42.4/lib/gdk-pixbuf-2.0/*/loaders.cache)", O_RDONLY) = -1 ENOENT (No such file or directory)

```

I imaging openat does not execute the subshell but simply try to open a  
‘$(echo …’ file that of course not exists, but I do not know how make  
the proper substitution happen before openat call…

For “environment” I have in my config since ever

```nix
  GDK_PIXBUF_MODULE_FILE = "$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)";

```

and normally GTk apps can load svg icons issueless, and they still do  
now. I also have gdk-pixbuf-query-loaders binary, actually as

```auto
/nix/store/05smyn5mn42xl1vfkyinqlahwcds5a3f-gdk-pixbuf-2.38.0-dev/bin/gdk-pixbuf-query-loaders

```

Running anydesk result in

```auto
(process:19467): GdkPixbuf-WARNING **: 11:11:19.119: Cannot open pixbuf loader module file '$(echo /nix/store/5xbmbiynhpyq59bxwa7xw4hszkh6fgz6-librsvg-2.42.4/lib/gdk-pixbuf-2.0/*/loaders.cache)': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > $(echo /nix/store/5xbmbiynhpyq59bxwa7xw4hszkh6fgz6-librsvg-2.42.4/lib/gdk-pixbuf-2.0/*/loaders.cache)
to make things work again for the time being.
terminate called after throwing an instance of 'base::gdk_exception_t'

```

file say

```auto
file /nix/store/5xbmbiynhpyq59bxwa7xw4hszkh6fgz6-librsvg-2.42.4/lib/gdk-pixbuf-2.0/*/loaders.cache
/nix/store/5xbmbiynhpyq59bxwa7xw4hszkh6fgz6-librsvg-2.42.4/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache: ASCII text

```

And both gdk-pixbuf-query-loaders and already created file are  
essentially the same not counting autogenerated comments.

Does anyone have an idea?

A quick search reveal few similar issues in the past, like [1] but they  
seems “already there” for anydesk…

If it’s relevant I’m on NixOS stable with few unstable pkgs added, my DE  
is EXWM launched via LightDM…

Thanks for now!

[1] [package key-mon is broken · Issue #11183 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/issues/11183)

– Ingmar

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [December 22, 2018, 1:29pm UTC](https://discourse.nixos.org/t/curious-gtk-issue-with-anydesk-svg-pixbuf-loader/1736/2 "2018-12-22T13:29:14Z")

</div>

Hmm, I would not expect `environment.variables.GDK_PIXBUF_MODULE_FILE = "$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)";` to  
work at all, but apparently the variables are not escaped at all:  
[https://github.com/NixOS/nixpkgs/blob/5bae6dea205144bbf2689a42fdbbf490745d52f4/nixos/modules/config/shells-environment.nix#L12-L28](https://github.com/NixOS/nixpkgs/blob/5bae6dea205144bbf2689a42fdbbf490745d52f4/nixos/modules/config/shells-environment.nix#L12-L28);  
I do not see any relevant changes in the module either.

It would be much better to use the new gdk-pixbuf module from unstable:  
`services.xserver.gdk-pixbuf.modulePackages = [pkgs.librsvg];` You  
can cherry-pick [Use a NixOS module for generating the gdk-pixbuf loaders cache. by ambrop72 · Pull Request #42562 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/42562)

---

<div class="post-metadata">

### Author: ![xte](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/x/7cd45c/32.png) [@xte](https://discourse.nixos.org/u/xte)
#### Post date: [December 23, 2018, 11:27am UTC](https://discourse.nixos.org/t/curious-gtk-issue-with-anydesk-svg-pixbuf-loader/1736/3 "2018-12-23T11:27:39Z")

</div>

Hi,

> Hmm, I would not expect `environment.variables.GDK_PIXBUF_MODULE_FILE = "$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)";` to  
> work at all, but apparently the variables are not escaped at all:  
> Mh, actually saying it does work is a big exaggerated since I simply  
> use it in the past and left in my config to properly see icons for  
> Udiskie and ClipIt, after that icons shows properly and keep working  
> so I say “hey, it work” without testing removal…

> It would be much better to use the new gdk-pixbuf module from unstable:  
> `services.xserver.gdk-pixbuf.modulePackages = [pkgs.librsvg];` You  
> can cherry-pick [Use a NixOS module for generating the gdk-pixbuf loaders cache. by ambrop72 · Pull Request #42562 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/42562)  
> Thanks, it does work now, despite only if run via sudo, but I think  
> that’s another issue… That’s nice however, I hope it will be merged  
> on stable 🙂

Thanks again,  
– Ingmar
