Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2795

Cannot run an app that uses GTK without root

$
0
0

I wrote a very simple executable in C++, that uses opencv with gtk3 to load an image in jpeg format and show it, When I run it without sudo, I got error:

Gtk-WARNING **: 21:58:36.172: Could not load a pixbuf from icon theme.This may indicate that pixbuf loaders or the mime database could not be found.**Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0)Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0)[1]    6329 IOT instruction  ./main 

But if I run it with sudo, everything works.I searched around and tried all the suggested commands that I found online including:

sudo apt reinstall libgdk-pixbuf2.0-0sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cachesudo update-mime-database /usr/share/mimesudo chmod -R uga-x /usr/share/mime; sudo chmod -R uga+X /usr/share/mime

None of above works, I also restarts the system after running all the steps, still does not work, need help.

I am on Ubuntu 18.04, in wsl2


Viewing all articles
Browse latest Browse all 2795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>