7

I can't count the number of times I've seen bashing of answers which contain:

gksu gedit /rootpath/rootfile.conf

Yesterday (February 17, 2018) Live Wire updated an article on how to setup gksu. The author acknowledges that gksu is frowned upon but claims no viable alternative is available for the GUI.

So should we tone down bashing people who do use gksu? Or tone down bashing of anything else for that matter when there is no viable alternative? Don't get me wrong, I like to bash politicians from time to time so I'm not totally against bashing.

FTR I did setup a wrapper script called gsu which invoked policy kits to call gedit and nautilus under Ubuntu 16.04 but can understand how not everyone will do that.


Rolled-up comments

Mr. Ward recommended pkexec which I use in my gsu wrapper script to replace gksu. But do we want to revisit every Q&A >= Ubuntu 16.04 containing gksu and explain how to setup Policy Kits?

Ms. Zanna recommended sudo -H gedit ... and I have seen that recommended a couple of times when someone is using gksu. But again who wants to post that comment on all the Q&A's >= Ubuntu 14.04 (the historical version not EOL) that reference gksu?

It's important to note I'm not going around promoting gksu gedit because I've been chastised for that in the past. Now I just say "using your favorite editor with sudo powers edit this file". It is the article above that is promoting gksu. Due to this new promotion you will see more new users using gksu.

So it is yesterday's article promoting gksu (and not me!) begging the question should we be "tone down" bashing people who use gksu in their question or answer? Old timers know better than to say gksu but new people don't and we should be embracing new users and not making them feel unwelcome.

Maybe there is a Q&A already of substitutes to gksu we can link-reference via comment section as a subtle hint instead?

I started out on punch-cards and then moved up to text based IBM and DEC VAX monochrome green or amber terminals before finally landing in this 32-bit colour, Full HD, GUI-Universe. Personally I quite like the new GUI-verse and only use nano or crontab -e when I absolutely have to.

That said I don't want to be the punching bag for everyone else that likes gedit :)

  • Uhm... pkexec I think is what replaced gksu... – Thomas Ward Feb 18 '18 at 23:11
  • 1
    What's wrong with sudo -H gedit... – Zanna Feb 19 '18 at 0:11
  • @ThomasWard Yes pkexec is what my gsu wrapper script calls. That's what I meant in my question when I said "Policy Kits". Sorry for not being more specific. Wayland doesn't support gksu without a wrapper script to call XSERVER or something like that. I'm not sure Wayland supports Policy Kits either. Anyway a wrapper is needed in default 17.10 installs to call gedit as a regular user never mind root as discussed here. Not sure about 18.04 yet but so far it comes with Unity 7.5 which I presume is X-based. – WinEunuuchs2Unix Feb 19 '18 at 0:11
  • Actually @Zanna I have to use that in Windows 10 in the WSL terminal. – WinEunuuchs2Unix Feb 19 '18 at 0:12
  • 4
    Yes, we should stop bashing people for using gksu, if only because 9 times out of 10 it isn't a problem anyway. Yes, it can cause problems, but those are minor and easy to fix and don't actually occur very often. I've never understood the obsession against it that has developed on this site. – terdon Feb 19 '18 at 10:58
  • 2
    @terdon Shouldn't that be an answer instead of a comment (after a cigar-smoke filled background meeting with all mods?) :-) – Fabby Feb 19 '18 at 19:41
  • No, cause it's just my own unofficial opinion. Let's see what the community thinks. – terdon Feb 19 '18 at 19:42
  • @Fabby As the man of many opinions I notice you didin't comment other than to second terdon :) – WinEunuuchs2Unix Feb 19 '18 at 19:44
  • :-) Happy now? :-) Drop by in Chat – Fabby Feb 19 '18 at 19:58
  • 1
    @Fabby very nice answer! LOL. Can't chat now have to get ready to go out. – WinEunuuchs2Unix Feb 19 '18 at 20:00
  • 1
    No, we should be shelling gksu. :-p – tudor Feb 20 '18 at 23:16
  • 1
    Highly related: Updating key posts that use gksu – dessert Feb 25 '18 at 12:39
7

Be nice! :-)

That includes gksu bashing IMNSHO

7

GKSU is dead. Long live pkexec and sudo.

There isn't anything wrong with GKSU, per se, but it is now antiquated and the official stance seems to be that using it is a Bad Idea™. Especially with plans to move to Wayland instead of X, it's important that we encourage use of up-to-date technology whenever appropriate.

As such, we should gently guide people away from GKSU to more resilient/permanent/whatever solutions. Similarly, we should also guide users away from blankly attaching sudo (or similar) to things every time they see Permission Denied. There are reasons permission lockouts exist, and they're mostly good reasons.

At the end of the day though, it's important to remember that Ask Ubuntu is a permanent archive. People come here for solutions without real regard as to the timestamps of problems. In fact, I've seen (and personally have) ignored timestamps way too many times. We have a duty to provide the most appropriate (and therefore, best) solutions to problems. This means solutions that will stand the reasonable test of time.

We can't reasonably be expected to seek out and fix old answers etc, but we can do something about the present. We shouldn't hate and bash old solutions/tools, but we shouldn't be encouraging their use, either.

  • Actually now that you've joined this party I realized my question should have been "Do we engage in too much using gedit as root bashing" :) – WinEunuuchs2Unix Feb 21 '18 at 0:12
4

You could create a one-liner comment when you see sudo gedit with a link to this answer: How do I start Nautilus as root?

GUI addicted users won't even have to go to terminal to gedit a root owned file. They can cruise in nautilus and drop down 20,000 leagues to the file and simply right click to edit it as root.

Here is a little .gif I made after following the answer and installing:

sudo apt install nautilus-root

nautilus-admin.gif

This is Nautilus using pkexecfor folders, files and gedit.

1

Is a letter to the editor a viable option? That is, go to the source of the problem, where gksu is being recommended.

As you mention, the author claims

There is however no viable alternative at present.

However, alternatives have been put forth here. Rather than worrying about updating old Q&As here, why not get the author/editor to revise the new article that promotes the undesirable use of the tool?

  • Even better yet why not a letter to the developer? "Fix your program to be like Windows and prompt for Administrator password as necessary". – WinEunuuchs2Unix Feb 26 '18 at 16:23
0

I read on the french forum documentation that as of 2017 one should use :

gedit admin:///path/to/document

Would'nt gksu be more appealing ?

  • It would, if it worked. – muru Feb 25 '18 at 1:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .