Warnings while launching gedit from the Ubuntu terminal
I am facing these warnings while launching gedit from my terminal. Eventually gedit starts, but with these lines of warning every time when I launch gedit:
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:138:20: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:138:24: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:138:28: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:138:32: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2237:26: 'none' is not a valid color name
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2264:20: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2264:24: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2264:28: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2264:32: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: sidebar.css:22:20: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: sidebar.css:40:18: Not using units is deprecated. Assuming 'px'.
(gedit:3830): Gtk-WARNING **: Theme parsing error: sidebar.css:40:20: Not using units is deprecated. Assuming 'px'.
** (gedit:3830): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found
(gedit:3830): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:3830): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Solution 1:
Updating gir1.2-gtksource-3.0 solved the problem for me; the errors no longer appear.
sudo apt-get install gir1.2-gtksource-3.0
Solution 2:
Normally those warning indicates the poor development of the application, but are normally ignored by programmers. Is not a critical problem and can be safely ignored if the program works as intended.
BTW, the problem seems to be with the theme that doesn't declare px
in their css. You could go and edit the siderbar.css
and make the corrections in line 40 and 22. In gtk-wirdgets.css
line 2264, 2237 and 138. There are multiple instances. That is for the "Theme parsing error", also seems that you miss the SessionManager package and GtkSource isn't version 3.
Solution 3:
I think that using gksudo
instad of sudo
will stop these warnings from comming!
take a look here difference between gksudo and sudo?