[Libguestfs] another GTK3 regression...

Richard W.M. Jones rjones at redhat.com
Fri Sep 30 08:41:02 UTC 2022


On Fri, Sep 30, 2022 at 08:55:02AM +0100, Daniel P. Berrangé wrote:
> On Thu, Sep 29, 2022 at 07:12:15PM +0100, Richard W.M. Jones wrote:
> > On Thu, Sep 29, 2022 at 04:47:34PM +0200, Laszlo Ersek wrote:
> > > http://lacos.interhost.hu/livecd-p2v-202209291608-gitc213ae00a337.iso
> > > 
> > > (built at c213ae00a337)
> > > 
> > > sha256: f3a149aeab0179213d74bb1eac30d5d6f807d4c9cf3a548667903d5434d5699a
> > 
> > No spinner!
> 
> BTW, is there any possibility your code is invoking GTK3 APIs
> from a thread != main GTK event loop thread ?  If so, that is
> a sure way to get non-deterministic wierd behaviour with GTK.

Maybe?  This is the code which is run when the "Test Connection"
button is clicked:

https://github.com/libguestfs/virt-p2v/blob/c213ae00a337cb04e63cbfe4fb4b3af4c003918f/gui.c#L404

It runs a thread (to test the connection using ssh) and that thread
creates an idle {job? event?} in the new thread.

However I documented it as:

 * Idle task called from C<test_connection_thread> (but run on the
 * main thread) to start the spinner in the connection dialog.

Whether that is true or not and how I deduced that, I don't recall.

Rich.


> > While I remember, an annoying virt-p2v bug is that the keymap is
> > always set to the US locale (try XTerm -> localctl status).  I wonder
> > if it's easy to add a way to change the keyboard layout?  In
> > particular it doesn't work well if your password contains some
> > punctuation character which is mapped differently on US vs local
> > keyboards.
> 
> Assuming GTK3, you can use gsettings to change layout for apps
> 
> gsettings set org.gnome.desktop.input-sources sources "[('"xkb"','"us"'),('"xkb"','"fr"'),('"xkb"','"it"')]"
> gsettings set org.gnome.desktop.input-sources current 1
> 
> this can be done dynamically on the fly too
> 
> With regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


More information about the Libguestfs mailing list