Settings not saved and errors with "sudo -i program" in 21.2.5 Xfce

Manjaro 21.2.5, when using “sudo -i thunar” or “sudo -i mouspad” there are rows and rows of errors in the terminal and the programs will not accept/save any settings changes. Any ideas why or where to start looking? Some rights misconfiguration?

Is sudo -i even the “proper” way to do that? Ever since the disappearing of gksu, it is the only thing that has worked well for me.

No !
Best is NOT using thunar/mousepad as root.
If you insist to do, use pkexec instead of sudo.
For editing use i.e. sudo nano /path to .

1 Like

I tried pkexec and it works with some apps and not others. Guess I could just use nano. Still, usually sudo -i program has worked fine before. What is the reason it’s not good to do it that way? Sure is easier.

Edit: it also spits out the same errors, like:

thunar: (thunar:1409): thunar-WARNING **: 02:53:28.611: Name 'org.xfce.FileManager' lost on the message dbus.

mousepad: dconf-WARNING **: 03:41:59.081: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=683002ba193d4cd992097c2a2b84d88e --binary-syntax --close-stderr”: Child process exited with code 1

…if a gui-app needs sudo, it will ask for.

…permission hell. Sooner or later you get problems with permissions.

1 Like

Rule of thumb

  • never use sudo unless strictly required to alter system wide settings
  • never edit any file in /usr tree - your change may be overwritten without warning (on sync)

If you want to modify system settings on a user base e.g. icons or themes

  • copy the iconset to the your home folder e.g.
    • .icons or .themes
    • ~/.local/share/themes or ~/.local/share/icons

If you want to modify a system service use

  • systemctl edit service-name.service which will copy the service file to the relevant folder /etc/systemd/system.

If you must edit a configuration by hand - use the terminal and a terminal editor like

  • micro
  • nano
  • vi

If you like GUI better install an editor which supports saving files as root e.g. sublime-text or kate or xed.


I can live with using nano, though it is very cumbersome and clunky compared to mousepad.

So if I want to delete a bunch of files and folders in “/usr/share/backgrounds” for example, the only good way to do it is by typing “sudo rm /blah/blah/blah” all day instead of just sudo -i thunar > select bunch-o-stuff > delete?

I know, “Why would you want to delete stuff in the first place?”
Just because I hate hundreds of megabytes of clutter and bloat from completely unused things in general, and leftovers from uninstalled programs (firefox, thunderbird, pidgin, viewnior), etc. and I’m just trying to learn/get better at Linux in general.

Thanks for all the info.

Please read @linux-aarhus post above:

If you like GUI better install an editor which supports saving files as root e.g. **** or kate or xed .

1 Like

You can do that - but not only are you asking for problems as the files removed is part of a package - they will reappear when the package is updated. You will also get weird package manager errors if you decide to remove a package where you have removed files manually beforehand.

Never modify /usr tree by hand

The only way to remove such files is to copy the files you want to keep to ~/.local/share/backgrounds - then uninstall the package providing the files.

Doing it the way you describe will only cause frustration when the files reappear after an update.

1 Like