Under Manjaro, I was able to open a terminal, and issue:
"sudo mousepad " and then edit it.
Now I am getting this error when attempting to do the same:
"[dcbdbis@Curly-Sr ~]$ sudo mousepad
Failed to initialize xfconf[dcbdbis@Curly-Sr ~]$ "
I can easily get around this by: "sudo dbus-launch mousepad " But it is extra typing - and
MeaCulpa, I’m lazy.
I am sure there is a setting somewhere…but I am NOT getting much at all with google or DuckDuckGo searches…Other than “Don’t do it”. I am in a sole office, in my home. I am not that worried about physical intruders…I would prefer the convenience - if possible.
How to I get Endeavour to allow sudo’s for GUI’s (works fine for CLI apps)…OR do I have to create my own command by aliasing the “sudo dbus-launch” string?
Thanks!
Sincerely and Respectfully,
Dave
Edits: I alias’d it. But the question still stands what’s different in my shell config before and after…So I have some ignorance that needs to be banished…
The reason you shouldn’t be using sudo with GUI programs like mousepad is not that there are might be intruders in your home to take advantage of that, but because running them with sudo can mess up ownership of files and directories inside your home directory and cause breakage of other programs, because that’s where GUI programs often store settings.
Thank you for your solution. My age, and my old habits are in view!
I didn’t know that using sudo or su was affected by any particular app. And I have used xed in the past, and it has worked fine. So I simply switched to xed, and I’ll delete my alias I created yesterday.
Thank you again!
Dave
Edit: PS: I appreciate learning that the sudo/su thing is app specific, not “X” specific. So another little piece of knowledge gained, and some ignorance banished!
I am aware of the implication of using sudo with GUI’s. After 16 years my paradigm hasn’t caused me any issues. I’m not saying there are not issues - I am saying that I’m pretty careful when I deploy it.
for mousepad i had a mpad script with dbus-launch in /usr/share , and a alias rootpad
but mainreason is, arch had a update some package splitted out dbus ; and manjaro just simple dbus with that patch, its in aur, dbus-x11 and would not touch that
probably done for a reason… but manjaro just put it back in, arch uses dbus while manjaro dbus-x11
I never do it that way, if I do GUI text editor I just right click on the directory and chose “open as root”. Then edit the file and the text editor will automatically be able to edit and save the file.
That sounds like a Thunar custom action. Different distro’s come with different custom actions installed in Thunar.
I already do that in my copy of Thunar…with some other custom actions I’ve created. But as an older guy, who cut his teeth at the terminal, on a 300 baud acoustically coupled modem, and with assembly language …I use the cli a LOT. Sometimes I find it quicker to use the terminal than I do a GUI.
Yes, yes…old habits die hard…
Ahh - it’s all good though. We all have different approaches to our workflow, and it’s very good to share them. I’ve picked up a lot of tricks from folks more experienced than me along the way.
Dave
Edit: Correction: Teletype instead of terminal. Terminals weren’t around then. And programming was done with green punch cards.