Use gksudo instead of sudo?

When using the “sudo gedit” command in Terminal to open my script “/etc/profile.d/myenvvars.sh”, I noticed I was getting the error message:

(gedit:2359): IBUS-WARNING **: The owner of /home/samb/.config/ibus/bus is not root!

The error message wasn’t preventing “gedit” from opening or anything; I just noticed that the Terminal had spit this out while I was editing my script file in “gedit”. So, curiosity got the best of me and I started to see if I could find a way to eliminate the messag.

After looking around the web, it seems that I should be using the “gksudo” command instead of regular old “sudo” when opening programs that have a graphical user interface (GUI).

So, let’s try opening the script above using “gedit” and “gksudo”.

samb@Mephisto://etc/profile.d$ gksudo gedit myenvvars.sh
The program 'gksudo' is currently not installed. You can install it by typing:
sudo apt-get install gksu

Well, it turns out that “gksudo” isn’t installed by default on this version of Ubuntu (13.10). However, it’s nice that the output tells you how to obtain “gksudo”. So, let’s try that out and try running “gksudo” again.

Using “gksudo” to run “gedit” works; no more warning message.

1 thought on “Use gksudo instead of sudo?

Leave a Comment