Pkexec mousepad %f


I can't pkexec mousepad because it says:
Failed to initialize xfconf: Error spawning command line “dbus-launch --autolaunch=45a61df0fc65443884bdfe516e181dfb --binary-syntax --close-stderr”: Child process exited with code 1

I can't not use
su -
cannot open display:

What do I need to do?



This is an example of a XY Problem - you are asking for help with your attempted solution, not the original issue.

Therefore - what problem are you actually trying to solve?

1 Like

I want to run mousepad as root.
But it does not work.


1 Like

because some configuration files must be editied as root?

That's not a reason to run a GUI application as root. sudo nano or sudo micro will work just fine.

If you do need to access a location with elevated privileges then there are other options:

Personally, I'd recommend trying the admin:/// location.


But I want to use mousepad. It did work out of the box in Manjaro.
The question is why does pkexec work with thunar but not with mousepad.
The wiki page does not help beginners.

That's because they include insecure defaults.


SUDO_EDITOR=mousepad sudo -e filename

You can add export SUDO_EDITOR=mousepad to your .bashrc or fish config file so you don't have to type it each time.

Reading and learning is something beginners should do. Arch-based distros require you to understand how your system works, so as a beginner that's something you should be doing.

"Why is flying an aeroplane so complicated? Why can't they make it suitable for beginners?"


thx, that does help :slight_smile:

I do learn every day, but some things are above me :slight_smile:


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.