Can't Edit File in Root

XFCE. With some updates the Steam file located here> usr/bin/steam gets overwritten.
Usually it's not a big deal as I change it back to what it was.

This time however when I go to that file in root & try to open it with mousepad all I get is a spinning icon. When not in root I can open the file but of course cannot change it.

Any ideas? :thinking:

What about what about with nano?

4 Likes

That got it. Didn't even think of that. DOH!
Cheers SinisterBrain :heart_eyes:

1 Like

"nano" is good, but I change to micro, it is more win intuitive to use :slight_smile: .
Ctrl + S = save, and so on :slight_smile:

4 Likes

Agreed on the micro.

And I up you with references to sudoedit .. search it .. because this way it uses a polkit-style of not directly editing the file, and thus is more secure and less destructive... it also embeds itself into shorter commands like sudo -e or sudoedit. It might even stop you from trying to destroy permissions by editing/saving things with the wrong user/permissions. so many wins :wink:.

I mention this because you really shouldnt be using a GUI application as 'root' or 'sudo'.
But .. if you assigned a (compatible) GUI editor to sudoedit ... then it might work better, and lose most of the drawbacks.
[the gui editor kate even does this automatically (using polkit) .. it works how some users 'expect', as it were ... double clicked a system file? ask for root credentials when its saved ... etc. Heh. PS - kinda funny it created a micro-ish-storm when this was first being rolled out because people lost their minds that you could 'no longer open kate as root' ... which again, you shouldnt ... but after that ... now its fully compliant and more importantly you dont need to .. it saves a temporary file elsewhere and then asks if you have permission to actually save somewhere you dont own]

So .. I guess, part of my point, which is wild speculation, is that maybe mousepad is actually starting down the right path here and 'sudo mousepad' (correctly) is losing functionality. And that, hopefully, means correct functionality in the near future.

(though I think getting comfy with at least some of the easier 'cli editors' like nano or micro is still definitely a 'good thing to do')

Ooooooooo! Shiny! I like it!

1 Like

Forum kindly sponsored by Bytemark