Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 12:55 pm

Ok well, first the standard warnings. Yes it appears to work fine and there's zero reasons that occur to me that it shouldn't. This will also work no doubt on other versions of (ubuntu) based Linux Mint. Anyway back to the compulsory warning. Do at your own risk. Nothing wrong with making a backup beforehand too.

I think doing away with gksu, the pkexec and admin:/// developments for launching graphical apps with elevated privileges is dumb and that it's being poorly handled by whomever upstream. Bottom-line is it's overall foolish as folks can still launch any apps they wish with root/sudo privileges anyway. For those who want to just keep using the handy gksu/gksudo commands to launch them. Here's a proven solution to install them on current Linux Mint main releases.

First off create a directory in your users home. Just using the file manager as an example. Of course right click in /home, create folder and to keep it simple name it gksudebs. Click on this to enter this folder, next right click and select "Open terminal here". When the terminal opens copy and paste this, so that wget will retrieve the package we're after. It'll be downloaded into the current working directory. At the moment that should be /home/yourusername/gksudebs.

Code: Select all

wget http://mirrors.kernel.org/ubuntu/pool/universe/libg/libgksu/libgksu2-0_2.0.13~pre1-9ubuntu2_amd64.deb
That's what will happen you'll now have that .deb sitting in your gksudebs folder. Next we get the other we need, the actual gksu .deb. Enter this into that terminal ...

Code: Select all

wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gksu/gksu_2.0.2-9ubuntu1_amd64.deb
Ok we have what we need to install and get gksu/gksudo working as usual again. While still in that same terminal (still open in that folder containing your .deb(s), type the following to install them.

Code: Select all

sudo dpkg -i *.deb
Which is what will happen, those .deb(s) will be installed and configured. I've done this, were no errors or indications of any problems and did at this point test launching some apps with gksudo, which works as expected.

Notes: Here is the webpage I snatched this from, I haven't tried his "long method", was considering something very much like this myself and just happened to stumble on this extremely easy to follow example. So there it is ... PROFIT!!!! :)

NOTE: LMDE3 users can do much similar to the method demonstrated here. Get the required .deb(s) from a reasonably trusted source or add a Debian repo or compatible Debian stable based distro's software repositories which still has them and just install from there. General consensus DO NOT mix Debian and ubuntu. Though that is another subject. :D

redlined

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by redlined » Sun Jan 13, 2019 1:20 pm

hi LuvNix!

This sentence doesn't make sense to me :?
I think doing away with gksu, the pkexec and admin:/// developments for launching graphical apps with elevated privileges is dumb and that it's being poorly handled by whomever upstream
it sounds as if you are saying "in doing away with gksu, (the) pkexec and admin:///" which is not accurate in context of entire sentence, as I understand it. (it does read as I think you intend it, if semicolon is used in place of that comma, so more a grammatical nitpick allowing confusion than a bad statement) Also a note to readers may be well served - that while gksu has been removed the other elevated privilege commands su, sudo, pkexec and admin:/// are all still present.

I also feel it would be wise to include some of the warnings and the example commands shared that reference thread you linked that show rdepends of gksu so folks can determine if they even need gksu for anything, otherwise why even bother to install it?
$ apt-cache rdepends gksu
gksu
Reverse Depends:
gexec
wicd-gtk
spacefm-gtk3
spacefm
|menu
$ aptitude why gksu
i menu Suggests gksu | kde-runtime | ktsuss
ps, from ref thread, Quote of the Day: "Might as well play sudoku until this mess is figured out" :mrgreen:

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Sun Jan 13, 2019 1:34 pm

:lol:
just a few minutes ago i wanted to see what would happen if i too my gksu and libgksu packages from arch and mix them with my mint 19. well it opens up with no issues but i don't get the save to keyring option which is what i really want
do you get a prompt to save to keyring? and if so does opening a gksu app next time offer to save to keyring again or is the password saved?
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 1:53 pm

^ Mixing Mint and Arch ? Nopers yet again, that's a whole different ballgame my friend. :D Yes the keyring thing pops up, you enter pass as it's always been and are good to go, graphical app launches, user PROFITS !!! Nope there's no option to save password.

@Redlined, not getting into all that fellow nixer. People are free to use the method(s) described and linked to or not. Though getting rid of convenient ways to launch graphical apps with privileges, without providing a reasonable replacement is craptastic in my view.

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Sun Jan 13, 2019 2:37 pm

this is what i mean about saving the password. which window do you get when you open gksu something?

arch
Image

mint19
Image
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 2:59 pm

^ Hey that's a really good looking desktop. The pop-up is just plain jane, thought it might be some weird default theme being set because I was booted into openbox but nope, set it to boot into mate session and it's the same. Assuming it's just the default theme in action. It's only a simple pop-up, enter password in field, press enter or click the Cancel or Ok buttons. Not worried about messing around with theme's to try to get it better looking.

For my next personal project, kicking around setting up a good looking conky. Hopefully can just track down some config files for good ones online. Been a long time but remember conky being friggin addictive and also a PITA. Sheesh desktop on this LM install while booted in OB and on my main Os are so plain, if I don't do something soon to brighten them up, I'll have to start going to therapy. :)

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Sun Jan 13, 2019 3:18 pm

the whole point of my using gksu is to save to session or keyring. if i can't do that in mint19 i don't see any real use for gksu :( in mint19 which is odd since in arch you get cutting edge software but gksu works as it always has like in mint17
so to me makes no difference which i use in mint19 and i'll stick with pkexec. (but at the same time i'll just keep my arch packages of gksu/libgksu in mint19)
my mission is to have a setup that eliminates me entering a password if i need some root actions without having an extra password service running
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 3:30 pm

^ Might explore installing different theme's, not sure but may be involved in how that pop-up looks ? Also am not sure if I fully understand what you're wanting in terms of "saving password". You mean you want to enter xyz-command and have it run without entering your pass ? If that's the case, look this over, as it might do what you want. Letting your user run gksu/gksudo or this pkexec deal to launch apps w/o password. Am not overly familiar with /etc/sudoers.d but it can be used for mucho cool stuff.

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Sun Jan 13, 2019 4:40 pm

i'm not expecting anything i just want this window to open in mint 19 (has nothing to do with themes though) ubuntu 18 removed this option which affects mint19. how can i get this in mint19? again i don't expect anything just wondering why i can't get this with mint19? if you find the answer than i'm not worthy :D i have butchered mint19 earlier and i did get this window to open but did not save the password

Image
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 5:23 pm

^ Not the person to ask about gnome-keyring fellow nixer. Not interested in getting educated on that topic at the moment. Being gnu/Linux am 150% sure there's a fix or more than a few. The sudoers.d thing could work great if it's just for personal computer use. I mean whatever you add, with no pass, will be persistent vs for xyz-session only. You've already said that's not what you're going for, so all I can think to type/say is ... google knows everything. Someone just has to ask the right questions. :D Wish you luck, sounds like it's something you really want done.

Have my own fish to fry too, default conky is hideous. Just as expected ... arghhhh. Will be roaming looking for decent .conkyrc files. Though have the strong urge to just forget it. Spend 99.87% of the time looking at a web browser or other app, so generally don't care if the Os desktop has any bling, bling or even a friggin wallpaper etc. Main goal here is sharing what I think is a decent fix for this launching graphical apps nonsense Linux Mint is dealing with. Of course desktop gnu/Linux users want this type of thing. Tried to help those LM users out with a straight forward way to go about it and/or any other ubuntu users or buntu based distro users out there who may find and maybe get use from this.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Sun Jan 13, 2019 7:36 pm

Yep me again ... also want to point out something cool about this type of thing. There are archives of packages + depends, old iso's, sourcecode etc and so forth where you can find whatever packages you want and software can be taken and used from these. Just because xyz-package is no longer maintained, doesn't mean it doesn't still work fine. Of course this is a do your research, learn enough to know what you're doing regarding using whatever software. Also people who may have a much beloved LM release or any other distro but the repo's for them are shutdown, the same release, one back, one forward etc.

Can still be used depending. Just think this is cool stuff and pointing it out for whoever may be interested.
Offtopicness: @Trytip ... Have you tried starting a support thread about this issue in whichever forum section it'd fit ? Don't have an Arch install, so makes it much harder to investigate things like what you're dealing with. However you went about getting Arch's version of gnome-keyring, it's depends etc so forth installed to a LM release isn't a support thread that belongs in normal Mint support. Situation as it is leaves me with a bunch of questions and flying blind in terms of anything I could try to suggest. I could fire up one of the many good Arch based distro iso's, with access to Arch's repo's and AUR with a live session. Still that's A LOT of time and trouble. There's zero chance I'll go through setting up a minimal Arch install to mess with an issue someone else is having. Hey you seem like a cool nixer but still ... that's a big negatory my friend. :D Can still speculate about things and maybe some gnome-keyring guru who visits this forum could pop up ?

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Sun Jan 13, 2019 10:38 pm

no need for that my friend, to be honest i was working on gksu with keyring a while back but gave up after i broke quite a few things so i wouldn't advice anyone to go on a quest and get it working. in my arch it just works, i needed no extra help aside installing gksu and libgksu
Last edited by trytip on Tue Jan 15, 2019 11:36 pm, edited 1 time in total.
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Tue Jan 15, 2019 2:16 pm

On the one hand, hey this junk made me research and learn some stuff. On the other, yep ... this is stupid. Ok great, Polkit ( with properly written .policy files) and using pkexec can, hopefully in some ways, if everything is setup correctly make an app launched with elevated privileges more secure. Limiting what it can actually do with it's priv's. Though bottom-line, none of that really matters. Any user with root or sudo powers on a system can still launch and run those apps with full powers regardless. Which totally renders the polkit etc etc meaningless for the most part.

Think removing the convenient use of gksudo and etc to launch graphical apps with privileges is only going to encourage nixers to abuse sudo. Though if someone bothers to do their research into what the variations of sudo actually mean/do and thus learn the correct usage, sudo can be used as often as someone likes without harm anyway.

Edit: Nope more commentary. :) For me am going with the method described. Installing the packages to restore gksu/gksudo and getting on with life. Pointless 2 cents fellows.

User avatar
trytip
Level 11
Level 11
Posts: 3576
Joined: Tue Jul 05, 2016 1:20 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by trytip » Tue Jan 15, 2019 3:02 pm

i'll give you a workaround for pkexec that has a policy. when you enter pkexec thunar or whatever pkexec if it has an individual policy you can edit it to allow you and open it with no password. it's useful if you want to limit password entries. but as with all files i compress them so i can easily undo my mess. rightclick and compress on a file will quickly back it up

i'll let you figure out if this is useful or not. for instance timeshift used to have an individual policy which you can edit and use with no password but they got wise and updated it with a generic policy
/usr/share/polkit-1/actions/
Last edited by trytip on Tue Jan 15, 2019 11:27 pm, edited 1 time in total.
Image

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Tue Jan 15, 2019 3:31 pm

^ No worries but not the point. Can think of plenty of ways to work around this. Many of them generally unacceptable in terms of what's considered good practice in gnu/Nix. Anything which involves launching privileged apps without password will definitely be considered bad form. Was just trying to point out a bit about what's involved to anyone who may be interested. Why using the method outlined in this thread isn't such a bad idea. It does require someone confirm with pass-etc.

Oh well ... overall I could give a whit about the polkit/pkexec etc junk. Wouldn't have much problem getting around or setting things up in a way that works well for me no matter. The approach shared here does that while using LM. Hopefully will continue working fine until something reasonable and workable enough comes out for the function gksudo-etc long provided.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by TI58C » Thu Apr 04, 2019 7:23 am

Hi LuvNix,

Thanks for this tutorial/post. Just did a 19.1 install (came from 17.3). Have not been active on this forum for a long time, so did not know about removal of gksudo. And missed it dearly.

Understand that gksu is no longer maintained, and that new way of doing things (pkexec. admin://) is probably better. Your method of installing gksu will give me a bit more time to adapt (I'm an old man and rather set in my ways). Thanks again.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

bartv
Level 1
Level 1
Posts: 8
Joined: Wed Feb 15, 2017 7:03 am

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by bartv » Wed Jul 10, 2019 9:47 am

What's wrong with creating a gksu link to pkexec? Seems to work just fine.

User avatar
Flemur
Level 17
Level 17
Posts: 7076
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by Flemur » Wed Jul 10, 2019 10:20 am

LuvNix wrote:
Sun Jan 13, 2019 12:55 pm
I think doing away with gksu, the pkexec and admin:/// developments for launching graphical apps with elevated privileges is dumb and that it's being poorly handled by whomever upstream.
That was a terrible idea, apparently a poor attempt at fixing a non-existent problem. Besides that, the new stuff never worked** for me so I installed gksudo, etc, as you suggest, a long time ago. Works great, just like it used to.

**

Code: Select all

$ xed admin:///etc/fstab 
** (xed:1777): WARNING **: 08:05:57.846: The specified location is not mounted
and xed displays a blank page with a titlebar saying "fstab (admin:///etc)", whatever that means; it's not the fstab file.

I particularly enjoy the friendly, informative messages! The culprit behind this garbage is hilighted:

Code: Select all

$ pkexec xed /etc/fstab
==== AUTHENTICATING FOR org.
freedesktop

Code: Select all

.policykit.exec ===
Authentication is needed to run `/usr/bin/xed' as the super user
Authenticating as: xxxxx,, (xxxxx)
Password: 
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.
freedesktop

Code: Select all

.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
$
"No session for cookie!" sounds like the soup guy in Seinfeld.

"freedesktop" consistently excretes crappy software with horrible documentation and is ruining linux.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 19.1 Xfce/fluxbox
Manjaro openbox/fluxbox

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by LuvNix » Wed Jul 10, 2019 2:18 pm

Had to take a break from the forums for awhile. Glad if this thread has made people's computing experience more enjoyable. Gksu/do still working fine in Debian 9.8 and 9.7. When do get around to upgrading to Buster will see if a similar work around keeps gksu (and/or lxqt-sudo) working.

New and approved methods kept failing for me too Flemur, eventually will have to commit to learning the details involved. Don't think upstream is making all these changes arbitrarily. Has to be some valid basis just think their main concern isn't so much gnu/Linux in a personal users environment and more focused on enterprise/commercial applications.

Where lions share of the money is coming from. Wayland is looming too, though will likely keep on using Xorg for a long time to come regardless.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Install gksu so gksu and gksudo work again in Mint 19. 64bit.

Post by TI58C » Fri Aug 02, 2019 2:25 pm

Hear hear !

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Post Reply

Return to “Tutorials”