Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Failed to load module "canberra-gtk-module" #458

Closed
timholy opened this issue Dec 4, 2019 · 8 comments
Closed

Failed to load module "canberra-gtk-module" #458

timholy opened this issue Dec 4, 2019 · 8 comments

Comments

@timholy
Copy link
Member

timholy commented Dec 4, 2019

When I load Gtk I see the following warnings:

julia> using Gtk
Gtk-Message: 20:15:48.288: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:15:48.288: Failed to load module "canberra-gtk-module"

However, the tests pass.

@giordano
Copy link
Contributor

giordano commented Dec 4, 2019

We noticed these warnings when we first built Gtk, they should be harmless. canberra-gtk-module is a module to manage sound events: https://askubuntu.com/questions/342202/failed-to-load-module-canberra-gtk-module-but-already-installed

@timothywalsh
Copy link

This issue is causing problems for me too.

I am new to Gtk.jl so working through the example code here https://juliagraphics.github.io/Gtk.jl/latest/manual/gettingStarted/

If I save the code as a file and try to run it by
>julia first_GTK_app.jl
I get the error
Gtk-Message: 13:10:34.934: Failed to load module "canberra-gtk-module"
and no window appears

However, if I execute the same code from within the Julia REPL, I get the same error message, and the window does appear.

Any ideas how to get around this?

@tknopp
Copy link
Collaborator

tknopp commented Jun 24, 2020

These are two different things. The window not appearing in the non-REPL mode is correct. You need to stop Julia from quitting, see https://juliagraphics.github.io/Gtk.jl/latest/manual/nonreplusage/

The other thing is not an error but a warning about the theme. I see this as well on ubuntu.

@timothywalsh
Copy link

Ah, okay. Thanks for the explanation. I just got the warning and then Julia quit without anything happening, so I assumed they were related.

@tknopp
Copy link
Collaborator

tknopp commented Jun 24, 2020

It actually is a feature rather than a bug. In other Gtk bindings, one has to go into the blocking main loop and cannot further interact within the REPL. In this way we have full flexibility.

@alexandrelevada
Copy link

I was annoyed with this message all the time and what solved for me was to create an enviroment variable and export it in .bashrc

export GTK_PATH"=/usr/lib/x86_64-linux-gnu/gtk-3.0:$PATH" (or gtk-2.0 if it is your version)

Julia 1.6 running in Ubuntu 20.04

Hope it helps

@oblivia-simplex
Copy link

This fixed it, thanks!

timholy added a commit that referenced this issue Jul 26, 2021
Also update the precompilation section, including deleting the old
userimg.jl instructions.
@tknopp tknopp closed this as completed in 0ff7447 Jul 28, 2021
@ufechner7
Copy link
Member

When using this workaround with Julia 1.7.3 on Ubuntu 18.04:

export GTK_PATH"=/usr/lib/x86_64-linux-gnu/gtk-3.0:$PATH"

together with InspectDR the warnings disappear, but in addition the menu is not shown any longer.

Any idea?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants