gksudo dropped in LM 19 - goodness knows what else

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
pbear
Level 9
Level 9
Posts: 2706
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

gksudo dropped in LM 19 - goodness knows what else

Post by pbear » Thu Jun 07, 2018 3:04 am

I periodically drop by the Ubuntu forum to see what sort of fun they're having and noticed a thread about gksudo. Turns out it has been dropped in Ubuntu 18.04 and it's not yet clear what one is supposed to use instead.

Intrigued, I fire up the Cinnamon 19 beta I have installed in VirtualBox. Try running gksudo xed. No such command. Just to be sure, try man gksudo. Nope. Per linked thread, sudo -H xed works, but unclear whether that avoids the permissions issues for which we were using gksudo in the first place. To round out the picture, I take a look at the Mint Release Notes and the Ubuntu Release Notes, neither of which mention the change.

Wonder what else has changed. Not asking for advice. Just running up the flag pole as FYI to the community.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

pdc_2
Level 8
Level 8
Posts: 2419
Joined: Mon May 11, 2009 1:21 am

gksu dropped in LM 19

Post by pdc_2 » Thu Jun 07, 2018 3:32 am

so this has been mentioned in various threads etc

eg https://itsfoss.com/gksu-replacement-ubuntu/

if before you would have done

Code: Select all

gksudo gedit /etc/default/apport
now they deferentially request you do

Code: Select all

gedit admin:///etc/default/apport


this link also covers the topic https://www.linuxuprising.com/2018/04/g ... heres.html

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Sir Charles » Thu Jun 07, 2018 3:48 am

It has been (is being) discussed in L M Forums as well. See:viewtopic.php?f=61&t=268140
pbear wrote:
Thu Jun 07, 2018 3:04 am
Wonder what else has changed.
I haven't been running LM 19 beta that much yet, but one change, major in my opinion, that I have noticed, is the change to the update policy. Fire up the Update Manager and have a look at the preferences and all the already by default checked options and levels. There is now the possibility to "opt in" for automatic updates.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
Pjotr
Level 21
Level 21
Posts: 13867
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Pjotr » Thu Jun 07, 2018 4:11 am

Short summary:

For editing system config files, use xed in combination with admin://. For example, for editing /etc/default/grub:

Code: Select all

xed admin:///etc/default/grub
(Note the three consecutive dashes)

The first time you use admin:// in a session, you'll be asked for your password twice.

For file management with root permissions, use pkexec:

Cinnamon:

Code: Select all

pkexec nemo
Mate:

Code: Select all

pkexec caja
Xfce:

Code: Select all

pkexec thunar
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Hoser Rob
Level 15
Level 15
Posts: 5666
Joined: Sat Dec 15, 2012 8:57 am

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Hoser Rob » Thu Jun 07, 2018 7:55 am

Mint 19 is based on Ubuntu 18.04. So pretty much all changes in Ubuntu 18.04 not related to a specific DE will also change in Mint 19.

altair4
Level 19
Level 19
Posts: 9756
Joined: Tue Feb 03, 2009 10:27 am

Re: gksudo dropped in LM 19 - goodness knows what else

Post by altair4 » Thu Jun 07, 2018 8:20 am

Fun fact:

The only distribution that enables a one-to-one substitution of pkexec for gksu automatically for its default editor AND file manager is Xubuntu 18. OK ... OK ... there are 15642 Linux distros out there so there may be another.

pkexec requires a policykit "rule" for ever application that wants to use it. In Xubuntu one is already created for thunar ( /usr/share/polkit-1/actions/org.xfce.thunar.policy ) and one is already created for mousepad ( /usr/share/polkit-1/actions/com.ubuntu.pkexec.mousepad.policy ).

In Mint's XFCE edition there is the same one for thunar but none for xed. At least not in the Beta version so far.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pbear
Level 9
Level 9
Posts: 2706
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: gksudo dropped in LM 19 - goodness knows what else

Post by pbear » Thu Jun 07, 2018 11:01 am

When discussing Linux with folks in real life, I'm careful to caution, "Yes it's free, but it's also complicated and very poorly documented."

Enough. So long, and thanks for all the fish.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
Pjotr
Level 21
Level 21
Posts: 13867
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Pjotr » Thu Jun 07, 2018 3:38 pm

pbear wrote:
Thu Jun 07, 2018 11:01 am
"Yes it's free, but it's also complicated and very poorly documented."
Complicated: not really, usually.... Poorly documented: absolutely! Developers like to develop, and unfortunately not to explain. This is a real shortcoming, but that's where other people can jump in to help....
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
slipstick
Level 5
Level 5
Posts: 943
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: gksudo dropped in LM 19 - goodness knows what else

Post by slipstick » Thu Jun 07, 2018 4:36 pm

pbear wrote:
Thu Jun 07, 2018 11:01 am
When discussing Linux with folks in real life, I'm careful to caution, "Yes it's free, but it's also complicated and very poorly documented."
I just started reading this. It is intended to be humorous (I think), but there is a lot of truth in there and much of it applicable to Linux, unfortunately.
The UNIX-HATERS Handbook
Last edited by slipstick on Thu Jun 07, 2018 7:57 pm, edited 1 time in total.
In theory, theory and practice are the same. In practice, they ain't.

pdc_2
Level 8
Level 8
Posts: 2419
Joined: Mon May 11, 2009 1:21 am

the strength of the forum

Post by pdc_2 » Thu Jun 07, 2018 7:09 pm

Yes it's free, but it's also complicated
I guess if one has got to use gksu or gksudo then one has climbed part-way up the mountain; so kudos there: more expert than one might think!!

often what seems hard is because it is new; practice makes permanent;

If we can't practice using the script; or technique; or phrase;

then in a nice friendly forum like Mint, we can ask others for help; what I really like is to see folks who I regard as really knowledgable; posting issues they have had; and asking for help from others; I think that is great;

there seem to be folks on the forum who may well use linux in their work each day; they post very fluent and deeply experienced pieces of advice; how great is that;

what I taken on board recently was the coaching to "advocate then enquire": so you say out loud what you are thinking; and you ask others for their views; their views help one re-assess one's one views; then you say 'em again; changed;

whilst Bob Geldof sang (tongue in cheeh!!) ......."I am an island, entire of myself I am an island" .....maybe it doesn't work for the rest of us ..

(I am sure this is going to get shunted off to Chat!!)

User avatar
Kilz
Level 4
Level 4
Posts: 200
Joined: Mon Apr 04, 2011 8:00 pm

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Kilz » Thu Jun 07, 2018 9:47 pm

It appears lxqt-sudo is still available and does pretty much the same thing.
I trust Microsoft about as far as I could comfortably spit a dead rat
Ubuntu is my past, it is no longer the place it once was, on its forums you are no longer free to voice your opinion.
64bit Linux Powered

User avatar
kukamuumuka
Level 15
Level 15
Posts: 5953
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: gksudo dropped in LM 19 - goodness knows what else

Post by kukamuumuka » Fri Jun 08, 2018 12:57 am

It will cause a massive sudo abuse. :(

lmuserx4849

Re: gksudo dropped in LM 19 - goodness knows what else

Post by lmuserx4849 » Fri Jun 08, 2018 1:38 am

pbear wrote:
Thu Jun 07, 2018 3:04 am
...
Wonder what else has changed. Not asking for advice. Just running up the flag pole as FYI to the community.
All releases have "Release Notes" and "Announcements". Also, highly recommend reading Clem's LM blog.

Go to Download > All Versions > Select 19, then select your Desktop & Arch, and you'll find the links to "Releases Notes" and "Announcements". At the bottom, there is a link to "Ubuntu release notes". This won't cover everything, but it's a good start :-)
Gksu, which used GTK+, was removed and all the tools which were using it were migrated to pkexec.
https://www.linuxmint.com/rel_tara_cinn ... atsnew.php
https://linuxmint.com/rel_tara_mate_whatsnew.php
LM 19 is based on Ubuntu 18.04. If there is some software you use a lot, you could search for it and see what version will be installed on 18.04, thus LM 19. I was kind of disappointed to see gimp 2.8 and not 2.10. At least libreoffice is 6.0.3, although 6.0.4 is out.

I'm on 17.3 now, so I get to learn all about systemd, journald, etc. I've been keeping up to date on gimp, libreoffice, and some other utilities and development stuff. The biggest change will be desktop. I'm currently using KDE, going to try Mate. I may go to debian or suse, if I can't break from kde. I like the rolling release of Arch, but I've had major problems with it. The LTS is a little to long for me.

UPDATE: I see you already looked at the Release Notes. You need to go one link further, "What's new in Linux Mint 19 Cinnamon".
Last edited by lmuserx4849 on Fri Jun 08, 2018 2:08 am, edited 2 times in total.

User avatar
Moem
Level 19
Level 19
Posts: 9737
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: the strength of the forum

Post by Moem » Fri Jun 08, 2018 1:56 am

pdc_2 wrote:
Thu Jun 07, 2018 7:09 pm
I guess if one has got to use gksu or gksudo then one has climbed part-way up the mountain; so kudos there: more expert than one might think!!
This is true. I've been using Mint for two years now and I've never felt the need to use either.
(I am sure this is going to get shunted off to Chat!!)
You seem to be trying to force my hand. Don't do that, okay?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

lmuserx4849

Re: gksudo dropped in LM 19 - goodness knows what else

Post by lmuserx4849 » Fri Jun 08, 2018 1:59 am

pbear wrote:
Thu Jun 07, 2018 11:01 am
When discussing Linux with folks in real life, I'm careful to caution, "Yes it's free, but it's also complicated and very poorly documented."

Enough. So long, and thanks for all the fish.
Just to clarify:
“Free software” is a matter of liberty, not price.

“Open source” is something different: it has a very different philosophy based on different values. Its practical definition is different too, but nearly all open source programs are in fact free. We explain the difference in Why “Open Source” misses the point of Free Software.

“Free software” means software that respects users' freedom and community. Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software. Thus, “free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer”. We sometimes call it “libre software,” borrowing the French or Spanish word for “free” as in freedom, to show we do not mean the software is gratis.

http://www.gnu.org/philosophy/free-sw.html
Out of curiosity, how are non-linux environments better documented or easier?

man pages are maintained, applications have [h]elp options, the installation doc directory (/usr/share/doc) has additional information, and there is always the source. In the early '90's, when users bought distributions at a brick and mortar store (i.e., CompUSA) there were hardcopy manuals. Today RedHat, OpenSuSE, archlinux have great online documentation. Various applications have good doc too (i.e., libreoffice, gimp...). In this environment, we all should be volunteering or donating money to projects. There are also hard copy books: Linux Bible, How Linux Works, UNIX and Linux System Administration Handbook, Debian Handbook.... As far as desktops go, imho, KDE is much better documented than GNOME and its' forks.

User avatar
greerd
Level 6
Level 6
Posts: 1058
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: gksudo dropped in LM 19 - goodness knows what else

Post by greerd » Fri Jun 08, 2018 9:09 am

altair4 wrote:
Thu Jun 07, 2018 8:20 am
pkexec requires a policykit "rule" for ever application that wants to use it. In Xubuntu one is already created for thunar ( /usr/share/polkit-1/actions/org.xfce.thunar.policy ) and one is already created for mousepad ( /usr/share/polkit-1/actions/com.ubuntu.pkexec.mousepad.policy ).

In Mint's XFCE edition there is the same one for thunar but none for xed. At least not in the Beta version so far.
I put the pkexec xed problem, or lack of a polkit rule, on the Mint 19 cinnamon blog. Odyseus answered with a work around pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xed. Lots of typing but works good. Or another way to run xed privileged is to run it from within a privileged nemo, pkexec nemo then open up your file with xed and privileges are inherited.

User avatar
Pjotr
Level 21
Level 21
Posts: 13867
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: gksudo dropped in LM 19 - goodness knows what else

Post by Pjotr » Fri Jun 08, 2018 10:04 am

greerd wrote:
Fri Jun 08, 2018 9:09 am
altair4 wrote:
Thu Jun 07, 2018 8:20 am
pkexec requires a policykit "rule" for ever application that wants to use it. In Xubuntu one is already created for thunar ( /usr/share/polkit-1/actions/org.xfce.thunar.policy ) and one is already created for mousepad ( /usr/share/polkit-1/actions/com.ubuntu.pkexec.mousepad.policy ).

In Mint's XFCE edition there is the same one for thunar but none for xed. At least not in the Beta version so far.
I put the pkexec xed problem, or lack of a polkit rule, on the Mint 19 cinnamon blog. Odyseus answered with a work around pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xed. Lots of typing but works good. Or another way to run xed privileged is to run it from within a privileged nemo, pkexec nemo then open up your file with xed and privileges are inherited.
This is a much better way to do it:
viewtopic.php?f=47&t=270721#p1478156

... and I've put that on the blog, as well. :)
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
greerd
Level 6
Level 6
Posts: 1058
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: gksudo dropped in LM 19 - goodness knows what else

Post by greerd » Fri Jun 08, 2018 10:58 am

Pjotr wrote:
Fri Jun 08, 2018 10:04 am
This is a much better way to do it:
viewtopic.php?f=47&t=270721#p1478156

... and I've put that on the blog, as well. :)
Yea, I tried that, and it works but there is no Elevated Privileges red bar across the top, I like the red bar. Hopefully they'll add a polkit rule for xed.

altair4
Level 19
Level 19
Posts: 9756
Joined: Tue Feb 03, 2009 10:27 am

Re: gksudo dropped in LM 19 - goodness knows what else

Post by altair4 » Fri Jun 08, 2018 12:22 pm

greerd wrote:
Fri Jun 08, 2018 9:09 am
altair4 wrote:
Thu Jun 07, 2018 8:20 am
pkexec requires a policykit "rule" for ever application that wants to use it. In Xubuntu one is already created for thunar ( /usr/share/polkit-1/actions/org.xfce.thunar.policy ) and one is already created for mousepad ( /usr/share/polkit-1/actions/com.ubuntu.pkexec.mousepad.policy ).

In Mint's XFCE edition there is the same one for thunar but none for xed. At least not in the Beta version so far.
I put the pkexec xed problem, or lack of a polkit rule, on the Mint 19 cinnamon blog. Odyseus answered with a work around pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xed. Lots of typing but works good. Or another way to run xed privileged is to run it from within a privileged nemo, pkexec nemo then open up your file with xed and privileges are inherited.
Just for giggles I copied /usr/share/polkit-1/actions/com.ubuntu.pkexec.mousepad.policy from Xubuntu, changed all the references from mousepad to xed, removed some fluff, and ended up with this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

  

 <vendor>xed</vendor>
 <vendor_url>http://gnome.org/</vendor_url>
 <icon_name>text-editor</icon_name>


 <action id="org.gnome.xed">
 
 <description>Run xed as root</description>
 
 <message>Authentication is required to run xed as root.</message>
 
 <defaults>
 <allow_any>no</allow_any>
 <allow_inactive>auth_admin</allow_inactive>
 <allow_active>auth_admin</allow_active>
 </defaults>
 <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/xed</annotate>
 <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
 </action>

</policyconfig
Then added it as: /usr/share/polkit-1/actions/com.ubuntu.pkexec.xed.policy to Cinnamon 19.
Seems to work:
pkexec-zed.png
pkexec-zed.png (31.37 KiB) Viewed 2919 times
I did get a curious error when closing it though - which I do not get when I run pkexec mousepad in Xubuntu: Set document metadata failed: Setting attribute metadata::xed-position not supported

Anyway, I'm not recommending anyone else do this as I'm obviously doing something wrong since this whole thing would take about 15 nanoseconds for someone who knew what they were doing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
greerd
Level 6
Level 6
Posts: 1058
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: gksudo dropped in LM 19 - goodness knows what else

Post by greerd » Fri Jun 08, 2018 1:36 pm

altair4 wrote:
Fri Jun 08, 2018 12:22 pm
Cool, I used your file and it looks to be working good. I not getting any 'xed-position not supported' error. I added '_keep' to allow_active similar to org.nemo.root.policy (auth_admin_keep) which I think starts a timer. But yea, it would be nice for an official rule!

Thanks

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">

<policyconfig>

 <vendor>xed</vendor>
 <vendor_url>http://gnome.org/</vendor_url>
 <icon_name>text-editor</icon_name>


 <action id="org.gnome.xed">
   <description>Run xed as root</description>
   <message>Authentication is required to run xed as root.</message>
   <defaults>
    <allow_any>no</allow_any>
    <allow_inactive>auth_admin</allow_inactive>
    <allow_active>auth_admin_keep</allow_active>
   </defaults>
  <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/xed</annotate>
  <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
 </action>

</policyconfig

Post Reply

Return to “Software & Applications”