On 6/21/23 08:33, Andy Smith wrote:
Hello,

On Wed, Jun 21, 2023 at 12:57:41PM +0100, Joe wrote:
On Tue, 20 Jun 2023 17:34:45 -0400
gene heskett <ghesk...@shentel.net> wrote:
  My fav editor, geany is also
dead for roots use for exactly he same reason, but runs just fine as
me. So there is a common problem.
Well, you could do it the right way: edit as you with geany in a work
directory, copy to/from the real location with a root-powered file
manager, such as mc under sudo in a terminal. Alter owner/perms as
required with mc.
The idea that this is the "right" way kind of horrifies me. 😀

Not that I would attempt to suggest that Gene goes this way, but
feature rich editors like vim and emacs can easily write to files
through sudo or sftp, thus enabling seamless editing of files as
different users and even on different hosts.

I'm sure there are other advanced editors that can do the same.
Maybe geany can; I'm not familiar with it.
You are missing out on one of linux's better coding efforts Andy. I have yet to have it make a mistake my fingers didn't make first. It looks a lot like gedit, but I've spent literally days recovering from gedts penchant for scrambling a files contents, to the extent that one of the things I do after an install is remove gedit, increasing my productivity because I don't have to spend days re-inventing the gcode I'm working on. I make enough typu's as t is, and I sure don't need to run my code thru a mix-master.
The basic principle being
to edit a file as sftp://user@host:/path so as to do the read/write
as that user, not yourself. (host could be localhost).

That is a lot of typing, subject to typu's from ancient fat fingers, so I usually cd to where the file lives and edit it directly. But everybody has their own style, and that is mine.

Gene Heskett


To me, that is closer to the "right" way to do this sort of thing.
It's really worth spending the time to learn how to do this sort of
thing in one of the advanced editors.

For a quick workaround though, and for Gene's case, sure.

Cheers,
Andy


Reply via email to