The version of geany on xubuntu 18.04 is 1.32-2. 18.04 no longer has the gksu package. So, configuring a custom action such as gksu geany %f does not work. gksu's replacement is pkexec. I use geany extensively and it does not come with a policy file. I can create one but would like the standard product to have one.
I can create one ...
Excellent ...
but would like the standard product to have one.
... then you can contribute it, although I am not sure it would be accepted because running via pkexec is something that is specific to you as a user and your desktop and not really something the product should contain.
Also note running Geany as root is not explicitly supported, and problems have been reported in the past, caveat emptor.
I just saw this today: https://bugs.launchpad.net/geany/+bug/1767737
@hyperair we really don't support running Geany as root. Its risky as Geany has no safety and security provisions although it can run arbitrary commands.
See also the saga of #1150 and Ubuntu sudo geany. Not sure if running it this way will hit that problem.
By having files with the intent of allowing running as root as part of the product it may give the impression that its safe and supported. Of course you distro chaps can make your own decisions if you want to supply such a file, but it doesn't seem a good idea for Geany to do so.
@hyperair we really don't support running Geany as root. Its risky as Geany has no safety and security provisions although it can run arbitrary commands.
If you're sure about this decision, then how about putting a foot down and closing this issue as `wontfix`? I'll simply mark the downstream bug as invalid as well then.
@hyperair we really don't support running Geany as root.
That's not really true, we support it the same as any other user(name). We don't necessarily recommend it, but that's applicable to most applications.
I'm not opposed to adding this file if the packagers think it's a good idea, it's just a simple text file that doesn't seem like it will cause any maintenance burden. We could probably change the `<description>` to "Run Geany as root **(danger!!! :skull_and_crossbones: not recommended!!!)***" :smiley:
Sort of off-topic, I like that Xfce applications detect if running as uid 0 and show a big bright banner with a warning message at the top of the window.
@makitso please make a case for this, otherwise it'll timeout.
@kugel- the use case is to allow running Geany as a different user using pkexec since gksu is deprecated.
IMO, the case is self evident. It's an easy thing to fix for me and I have done so so let it time out if it's too hard or painful to fix.
I think the solution requested in #1898 is a better way than running the entire Geany process at elevated priorities.
For once I agree with something Emmanuele Bassi says: "there are no *real*, substantiated, technological reasons why anybody should run a GUI application as root. By running GUI applications as an admin user you're literally running millions of lines of code that have not been audited properly to run under elevated privileges; you're also running code that will touch files inside your $HOME and may change their ownership on the file system; connect, via IPC, to even more running code, etc. You're opening up a massive, gaping security hole [...]."
I'm not advocating running Geany as root, but it seems reasonable to want to substitute another user in any case.
@codebrainz like the OP, there is nothing stopping you making a config file to allow whatever you want, that doesn't mean it should be in Geany.
Why make every distro write each their own file when we can drop a single low-maintenance file in Geany's tree like we do for other similar-ish types of files and make it available to all of them at once? It's not like this is for some random one-off tool, PK is literally the modern authorization system on all Linux desktops AFAIK.
Make a PR.
@makitso it would be more beneficial to make a PR here instead of just pasting to a Launchpad bug. Then at least packagers for other distros have the chance to review it and have their input (even though it's a pretty trivial addition).
...even mousepad has polkit support, not sure what's the big deal here. [https://github.com/xfce-mirror/mousepad/blob/master/org.xfce.mousepad.policy...)
@alicektx nobody made a PR
github-comments@lists.geany.org