Gtk-WARNING : Calling Inhibit failed
Solution 1
There is no problem with editing files as root using gedit. I do it often and always will use the following method, which is the correct way to use gedit with superuser permissions:
gksudo gedit /etc/pm/config.d/config
to edit a file with root permissions.
Not sure why the downvotes, since this was the only correct answer, the other said use another editor. So I'll tell and show you why.
You should never use normal sudo to start graphical applications as Root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. https://help.ubuntu.com/community/RootSudo#Graphical_sudo
Solution 2
Both messages are warnings:
IBUS-WARNING **: The owner of /home/myPC/.config/ibus/bus is not root!
This happens since you are calling Gedit with sudo
. Is perfectly normal this could happen. Instead of Gedit you may want to use nano
or vim
or any other non-GUI editor.
Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service file
GD is trying to access the org.gnome.SessionManager
dbus directive, but that directive is not provided. Actually, that directive do not exist in normal installation, the message can be safely ignored.
Solution 3
I also encountered this, and found that reinstalling gedit fixes the issue:
sudo apt-get purge gedit
sudo apt-get install gedit
Related videos on Youtube
user215336
Updated on September 18, 2022Comments
-
user215336 almost 2 years
I was trying to use gedit, when I came across the following problem:
myPC@TM77:~$ sudo gedit /etc/pm/config.d/config (gedit:12512): IBUS-WARNING **: The owner of /home/myPC/.config/ibus/bus is not root! (gedit:12512): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
What is happening?
-
jobin over 10 yearsSo which issue are you more concerned about on this post: your wifi or gedit?
-
-
user215336 over 10 yearsIf I'm right, I can't use gedit to edit files as a root? instead I have to use nano or vim, or use gksudo.
-
Braiam over 10 yearsyou can, but is not advisable. But in any ways the message you are getting are not by any means critical. You can ignore them (for now) do your changes and if you are still doubtful do a
chown -R $USER:$USER ~/
to gain again ownership of all your files. -
mchid over 9 years@user215336 You can but, as you mentioned, you must use
gksu
,gksudo
, or in an open terminal you can usesudo gedit
to allow root permission. You would also need to use sudo for vim or nano in the same way. As Braiam mentions, these warnings can safely be ignored. See here for an in depth explanation of sudo help.ubuntu.com/community/RootSudo -
Brilliand almost 9 years@phpGeek Seems related to me. I just tried calling gedit with gksudo, and I didn't get any of the aforementioned warnings.
-
mchid about 8 years
sudo -i
is now recommended instead ofgksudo
andgksu
to prevent subsequent ownership and permission issues asgksu
andgksudo
are depreciated.