Why do I get IBUS-Warning on running the sudo gedit command?

59,959

Solution 1

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.

Solution 2

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
Share:
59,959
Community
Author by

Community

Updated on September 18, 2022

Comments

  • Community
    Community almost 2 years

    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?

  • RyanNerd
    RyanNerd over 8 years
    Although this "may" make the error message go away. It's not best practice. Use gksu as was previously suggested.
  • K7AAY
    K7AAY almost 5 years
    An up to date answer is needed, as gksu and gksudo are depreciated and no longer packaged with Ubuntu 18.04 and later.
  • K7AAY
    K7AAY almost 5 years
    An up to date answer is needed, as gksu and gksudo are depreciated and no longer packaged with Ubuntu 18.04 and later.
  • K7AAY
    K7AAY almost 5 years
    An up to date answer is needed, as gksu and gksudo are depreciated and no longer packaged with Ubuntu 18.04 and later.
  • Helen Craigman
    Helen Craigman about 4 years
    Seems like sudo -H in the previous answer, is good