InspectDR.jl
InspectDR.jl copied to clipboard
Gtk error messages
I get the following error messages when using InspectDR:
julia> include("test/plot.jl")
Gtk-Message: 12:00:41.791: Failed to load module "unity-gtk-module"
Gtk-Message: 12:00:41.810: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:00:41.810: Failed to load module "canberra-gtk-module"
when running the script:
using Plots; inspectdr()
x=0:0.05:100
y1=sin.(x)
y2=cos.(x)
p1 = plot(x,y1, size=(640,480), legend=false)
p2 = plot(x,y2, size=(640,480), reuse=false, legend=false)
display(p1); p2
Any idea?
Using Ubuntu 18.04, Julia 1.7.3 and the following environment:
(KiteControllers) pkg> st
Project KiteControllers v0.1.1
Status `~/repos/KiteControllers/Project.toml`
[d0351b0e] InspectDR v0.4.3
[90980105] KiteUtils v0.4.7
[2774e3e8] NLsolve v4.5.1
[d96e819e] Parameters v0.12.3
[90137ffa] StaticArrays v1.4.5
[1e6cf692] TestEnv v1.7.3
[21f18d07] Timers v0.1.5
[7dcfa46b] WinchModels v0.1.1
[de0858da] Printf
I solved the issue by adding this line to .bashrc;
export GTK_PATH="/usr/lib/x86_64-linux-gnu/gtk-3.0:$PATH"
But why is it needed?
Uncertain. I know just about enough about Gtk to get InspectDR working.
Probably the reason Gtk works even this well is because of Julia's excellent BinaryBuilder.jl
& Yggdrasil.jl
package distribution system. 👍
I suggest you raise an issue with --> https://github.com/JuliaGraphics/Gtk.jl
Their team is much more knowledgeable than I am with respect to these issues.
You should be able to reproduce those error messages with a simple Gtk.jl program (taken from the Gtk docs):
using Gtk
win = GtkWindow("My First Gtk.jl Program", 400, 200)
b = GtkButton("Click Me")
push!(win,b)
showall(win)
Solution works.