17

Whenever I try to run a sudo gedit command as instructed in Step 4 of this answer, my terminal puts out:

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

How do I get out of this situation?

JaredForTheWin
  • 171
  • 1
  • 1
  • 3

4 Answers4

16

You should always use gksudo instead of sudo to launch graphical applications otherwise the environmental variables aren't set up correctly.

In your example ibus is looking at the files in your users home directory instead of roots home directory as it should be doing.

Cheesemill
  • 987
  • 6
  • 8
  • An up to date answer is needed, as gksu and gksudo are depreciated and no longer packaged with Ubuntu 18.04 and later. – K7AAY Jul 23 '19 at 15:22
6

No need for gksudo. To make sudo do what you want, add the -H (or --set-home) switch. Thus:

$ sudo -H gedit /etc/bluetooth/main.conf
0

As Cheesemill say, you should use gksudo to launch graphical like gedit. To install it, simply type this command in terminal:

sudo apt-get install gksu

I read some topics that have same problem to you (and so I am). Some men say just del rm -r /home/<user-name>/.config/ibus/bus or rm -r /home/<user-name>/.config/ibus/ and then launch iBus again.

Some say remove (or purge) ibus and then re-install it.

Some say chown the bus folder.

Robin Hsu
  • 123
Dũng
  • 9
  • 1
-2

Do this on a terminal:

michele@Zeus:~/.config/ibus$ sudo gedit /etc/bluetooth/main.conf

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

michele@Zeus:~/.config/ibus$ ll
totale 12

drwx------  3 michele michele 4096 dic 29 18:11 ./

drwx------ 26 michele michele 4096 gen  2 12:25 ../

**drwx------  2 michele michele 4096 gen  5 13:19 bus/**

michele@Zeus:~/.config/ibus$ rm -R bus/

michele@Zeus:~/.config/ibus$ sudo gedit /etc/bluetooth/main.conf

and now!!!

michele@Zeus:~/.config/ibus$ ll

totale 12

drwx------  3 michele michele 4096 gen  5 13:35 ./

drwx------ 26 michele michele 4096 gen  2 12:25 ../

**drwx------  2 root    root    4096 gen  5 13:35 bus/**
jobin
  • 27,708
  • Although this "may" make the error message go away. It's not best practice. Use gksu as was previously suggested. – RyanNerd Mar 16 '16 at 22:39
  • 1
    An up to date answer is needed, as gksu and gksudo are depreciated and no longer packaged with Ubuntu 18.04 and later. – K7AAY Jul 23 '19 at 15:22