unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Errors running kicad GUI package in container
@ 2022-10-31 16:50 Peter Polidoro
  2022-10-31 20:35 ` Luis Felipe
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Polidoro @ 2022-10-31 16:50 UTC (permalink / raw)
  To: help-guix

I am trying to run a GUI package (kicad) in a container on a 
foreign distro (xubuntu) and I am running into several errors.

When I run the command:

guix shell kicad --container --preserve='^DISPLAY$' 
--share=/tmp/.X11-unix -- kicad

I get a warning about the accessibility bus:

(kicad:1): dbind-WARNING **: 16:51:56.694: Couldn't connect to 
accessibility bus: Failed to connect to socket 
/run/user/1000/at-spi/bus_0: No such file or directory

Do I need to expose a directory or set some environmental variable 
to properly handle this warning?

Then the GUI pops up, but when I click on any icon I get the 
error:

Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion 
failed (error == NULL): Failed to load 
/org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized 
image file format (gdk-pixbuf-error-quark, 3)

Does this mean the kicad package is missing some dependencies, say 
gdk-pixbuf?

When I try the command:

guix shell kicad gdk-pixbuf --container --preserve='^DISPLAY$' 
--share=/tmp/.X11-unix -- kicad

The icons appear correctly, but when I clicking on some of them 
causes the GUI to suddenly exit with no errors or warnings.

The kicad package appears to run correctly with the shell --pure 
command.

Do I need to fix something in the kicad package definition or add 
something to my container shell command to make it work properly? 
Thanks!


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

* Re: Errors running kicad GUI package in container
  2022-10-31 16:50 Errors running kicad GUI package in container Peter Polidoro
@ 2022-10-31 20:35 ` Luis Felipe
  2022-11-01 15:09   ` Peter Polidoro
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Felipe @ 2022-10-31 20:35 UTC (permalink / raw)
  To: Peter Polidoro; +Cc: help-guix


[-- Attachment #1.1: Type: text/plain, Size: 1258 bytes --]

Hi Peter,


------- Original Message -------
On Monday, October 31st, 2022 at 16:50, Peter Polidoro <peter@polidoro.io> wrote:


> I am trying to run a GUI package (kicad) in a container on a
> foreign distro (xubuntu) and I am running into several errors.
> 

> When I run the command:
> 

> guix shell kicad --container --preserve='^DISPLAY$'
> --share=/tmp/.X11-unix -- kicad
> 

> I get a warning about the accessibility bus:
> 

> (kicad:1): dbind-WARNING **: 16:51:56.694: Couldn't connect to
> accessibility bus: Failed to connect to socket
> /run/user/1000/at-spi/bus_0: No such file or directory
> 

> Do I need to expose a directory or set some environmental variable
> to properly handle this warning?

For what it's worth, kicad seems to work for me in a container. I'm using Guix System with GNOME (guix 4716cea):

__________
guix shell kicad -E "^DISPLAY$" -E "^XAUTHORITY$" --expose="$XAUTHORITY" --expose=/tmp/.X11-unix/ --expose=$HOME/.Xauthority --expose=/etc/machine-id --expose=$HOME/Descargas --expose=/tmp/dbus-fnAz1hb4to
‾‾‾‾‾‾‾‾‾‾

The command above is what I use to try out an application I'm developing (GTK 4). You should at least change the values to the last two "--expose".

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

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

* Re: Errors running kicad GUI package in container
  2022-10-31 20:35 ` Luis Felipe
@ 2022-11-01 15:09   ` Peter Polidoro
  2022-11-01 15:54     ` Luis Felipe
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Polidoro @ 2022-11-01 15:09 UTC (permalink / raw)
  To: Luis Felipe; +Cc: help-guix


> For what it's worth, kicad seems to work for me in a container. 
> I'm using Guix System with GNOME (guix 4716cea):
>
> __________
> guix shell kicad -E "^DISPLAY$" -E "^XAUTHORITY$" 
> --expose="$XAUTHORITY"
> --expose=/tmp/.X11-unix/ --expose=$HOME/.Xauthority 
> --expose=/etc/machine-id
> --expose=$HOME/Descargas --expose=/tmp/dbus-fnAz1hb4to
> ‾‾‾‾‾‾‾‾‾‾

Thanks! Although when I try this, I still get the warning about 
failing to connect to the accessibility bus and I still get the 
gdk-pixbuf-error.

What are the last two directories that you are exposing? Is the 
first just your home directory or is it some kicad specific 
directory in your home directory? How do you find the name of the 
second directory and is that for the accessibility bus or 
something else?


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

* Re: Errors running kicad GUI package in container
  2022-11-01 15:09   ` Peter Polidoro
@ 2022-11-01 15:54     ` Luis Felipe
  2022-12-05 19:22       ` Peter Polidoro
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Felipe @ 2022-11-01 15:54 UTC (permalink / raw)
  To: Peter Polidoro; +Cc: help-guix


[-- Attachment #1.1: Type: text/plain, Size: 2641 bytes --]

------- Original Message -------
On Tuesday, November 1st, 2022 at 15:09, Peter Polidoro <peter@polidoro.io> wrote:


> > For what it's worth, kicad seems to work for me in a container.
> > I'm using Guix System with GNOME (guix 4716cea):
> > 

> > __________
> > guix shell kicad -E "^DISPLAY$" -E "^XAUTHORITY$"
> > --expose="$XAUTHORITY"
> > --expose=/tmp/.X11-unix/ --expose=$HOME/.Xauthority
> > --expose=/etc/machine-id
> > --expose=$HOME/Descargas --expose=/tmp/dbus-fnAz1hb4to
> > ‾‾‾‾‾‾‾‾‾‾
> 

> 

> Thanks! Although when I try this, I still get the warning about
> failing to connect to the accessibility bus and I still get the
> gdk-pixbuf-error.

Bah. So does "/run/user/1000/at-spi/bus_0" exists in your system? If it does exposing it would probably make the accessibility warning go away. I see similar messages myself when running GUI apps but need to expose a different file (see below).

I don't know what's the best way to fix the pixbuf error; I'd simply do what you already did: included the gdk-pixbuf package in the command. I don't know if that would mean the kicad package should be modified to include it.


> What are the last two directories that you are exposing? Is the
> first just your home directory or is it some kicad specific
> directory in your home directory? How do you find the name of the
> second directory and is that for the accessibility bus or
> something else?

You can ignore "--expose=$HOME/Descargas" which is just a directory from which I read files when using my application.

As for "--expose=/tmp/dbus-fnAz1hb4to", it's the file I always have to provide to avoid this error:

(mazo.py:3): Gtk-CRITICAL **: 15:22:47.557: Unable to connect to the accessibility bus at 'unix:path=/tmp/dbus-fnAz1hb4to,guid=7edf085d4bc4b153351b79bb635ea1b4': Could not connect: No such file or directory

This file changes when you reboot the system, so you always have to update your container command. I looked for possible environment variables that could define it, but could not find anything.

I also migrated my application to GTK 4 recently and found a new warnings, and they can't be ignored because the application misbehaves if you don't fix them (some GUI interactions freeze interaction with the whole GNOME Shell):

libEGL warning: MESA-LOADER: failed to retrieve device information
libEGL warning: DRI2: could not open /dev/dri/card0 (No such file or directory)
libGL error: MESA-LOADER: failed to retrieve device information

My current fix is to expose "/dev/dri/card0". I haven't investigated what's the best thing to do.

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

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

* Re: Errors running kicad GUI package in container
  2022-11-01 15:54     ` Luis Felipe
@ 2022-12-05 19:22       ` Peter Polidoro
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Polidoro @ 2022-12-05 19:22 UTC (permalink / raw)
  To: Luis Felipe; +Cc: help-guix


Luis Felipe <luis.felipe.la@protonmail.com> writes:

>> > For what it's worth, kicad seems to work for me in a 
>> > container.
>> > I'm using Guix System with GNOME (guix 4716cea):
>> > 
>
>> > __________
>> > guix shell kicad -E "^DISPLAY$" -E "^XAUTHORITY$"
>> > --expose="$XAUTHORITY"
>> > --expose=/tmp/.X11-unix/ --expose=$HOME/.Xauthority
>> > --expose=/etc/machine-id
>> > --expose=$HOME/Descargas --expose=/tmp/dbus-fnAz1hb4to

When I submitted a patch to upgrade kicad to 6.0.9 I went ahead 
and added gdk-pixbuf as an input.

Now it seems to work well, except in at least one strange case.

I noticed that kicad crashes when I run it in a pure shell with 
both kicad and python-ipython:

guix shell --pure kicad python-ipython -- kicad # crashes when you 
click on GUI open project icon
guix shell kicad python-ipython -- kicad # does not crash
guix shell --pure kicad -- kicad # does not crash

I do not know if this is a bug in kicad or in the guix package or 
something else.

I assume this means that one or more environment variables need to 
be set in the pure shell, but I do not know which.

guix shell --pure --check kicad python-ipython -- kicad
guix shell: checking the environment variables visible from shell 
'/bin/bash'...
guix shell: All is good!  The shell gets correct environment 
variables.

guix describe --format=channels
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (branch "master")
        (commit
          "48329575c87bbee7166eedf10b1699599e67c49d")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 
              54FA")))))


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

end of thread, other threads:[~2022-12-05 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 16:50 Errors running kicad GUI package in container Peter Polidoro
2022-10-31 20:35 ` Luis Felipe
2022-11-01 15:09   ` Peter Polidoro
2022-11-01 15:54     ` Luis Felipe
2022-12-05 19:22       ` Peter Polidoro

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 read-only IMAP folder(s) and NNTP newsgroup(s).