Hello,

Le 27/11/2025 à 19:17, Michael D. Setzer II via Users a écrit :
Have used geany as my preferred editor for many version of
Fedora, but now with Fedora 43 it doesn't work that same if
running after su?

Get a core dump, and it creates file in my ~/.config/geany directory
owned by root, and that to remove it before geany works with
regular user correctly.

With su -, it seems to work ok.

Apart from the core dump, it sounds fairly expected: `su` alone does *not* update the environment, like $HOME or $XDG_*_DIRS, which are used to locate user files -- including configuration.

I don't know what changed between Fedora 42 and 43 (I don't use Fedora myself), but at any rate I don't think it *should* have worked before (maybe it did, but that feels like an accident to me).

Had also tried
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY
geany

but with vnc get mixed results.

Also, found this?

You can run Geany as root by
opening a terminal and typing sudo -E geany or sudo geany.
However, this is strongly discouraged because it can lead to issues
like corrupting user configurations, creating ownership problems
for your files, and introducing security risks. A safer alternative is
to edit files using admin:// in the file manager or to use sudo for
specific file operations after saving your work in a regular user
session

`sudo geany` has basically the same issues as your `su` above in *some* distributions but not others. Here again it depends what part of the environment is left unmodified between the calling user and the root session run by `sudo`.

Indeed, `admin://` is a fairly nice trick, but Geany doesn't support this yet.

Things seems to suggest using nano or vim to edit rather than gedit
or geany, But that seems to be a step backwards.

Well, that's your call but when doing admin modifications the least unexpected things you can do the better. (if I wanted to start a troll, I'd say that's strongly discouraging using `vim` :D) And usually it's easier to do things by mistake in GUI apps -- partly because it's easier to do mistakes with the mouse and random buttons everywhere.

This said, you indeed should rather use something you are reasonably comfortable with not to make worse mistakes, so it's a balance.

I myself never use a fancy IDE to edit root files, both because I usually don't have complex editions to make to root files, and because I don't feel it's safe enough -- I'd rather modify a copy under my user, check the differences and install the new version with root when done. But that's me.

Is there a better way to get geany to work like it has in Fedora 42
and earlier versions?

I'm not quite sure, but basically what you want is for HOME and XDG_*_DIRS to point to root's directories, not your calling user's.

Regards,
Colomban
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to