Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

My solution to gksu being deprecated/Buster.

Here you can discuss every aspect of Debian. Note: not for support requests!
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

My solution to gksu being deprecated/Buster.

#1 Post by Deb-fan »

Well didn't want to put this up in tips,tricks etc. It's not worthy of being there, also understand, this is not officially approved by anyone (not even myself in particular) and there are better ways, one such shall be discussed in this stupe thread and will probably get around to implementing it on my Debian 10 OS's as well. Ok ...

I have long used and like gksu/do, however it's long been unmaintained also and found to have some security bugs as well. However Debian has removed it from the software repositories, so it's no longer available in the normal sense and a supposedly better and newer model implemented to open graphical apps with root/sudo privileges, namely polkit ... = pkexec and ///admin this and that. Myself however, want things back as they were. I type "gksudo thunar" in a run dialogue-etc, gnome-keyring pops up, asks for my password and then launches the file-manager with priv's as I wanted.

So what I did ... I just added the Stretch/oldstable repo's back in sources.list,
# Added to get gksu/do + depends from Stretch repos.
deb http://deb.debian.org/debian oldstable main contrib non-free
Then "apt update" to refresh packages and installed gksu from there with "apt install -t oldstable gksu". Afterwards commented out the oldstable repo and refreshed packages again to be anal. That's a wrap, I have my gksu and gksudo cmds working once again as I prefer them.

As mentioned this is unapproved and generally looked down upon. There are in fact better alternatives to this dorkishness, one of which is lxqt-sudo(available in stock repositories), does the same thing as gksu/do but as far as I know is actively maintain and doesn't have the known sec issue which gksu does. So in preference you(and likely I will) could install it instead and then add a bash alias for the thing to .bash_aliases or whichever file you maintain your aliases in. Because lxqt-sudo is aggravating to type. If polkit gives me any grief about it's use. I will disable/mask the thing with the "systemctl" command so that it shuts up. :)
PS, Also note, that if you use Gnome/Wayland, such may not work regardless (even with Xwayland blahblah. Poss even with polkit disabled/masked.) Dunno ... I however don't give a whit about Gnome or Wayland and am using Openbox and Xorg, shrugs. If were going to dork with Gnome it'd surely be Cinnamon or MATE desktop, more shrugs. Just a heads up fellows. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1388
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 65 times

Re: My solution to gksu being deprecated/Buster.

#2 Post by None1975 »

Deb-fan wrote: open graphical apps with root/sudo privileges
It's a bad habit.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: My solution to gksu being deprecated/Buster.

#3 Post by CwF »

Why would you do this?
I purged gksu in stretch. Since stretch pkexec works fine if you set it up. gksu adds no functionality not otherwise available? My stretch and busters all have a root thunar, terminal, etc. No gksu.

You probably need to add the policy file for thunar, it is that easy?
Thunar as ROOT, omg danger danger little Robinson... I use it daily.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#4 Post by Deb-fan »

Yeah should just embrace the changes ... In the end resistance is futile, the borg are consolidating their control of gnu/Nix fellas !!! :D I don't care though, I like gksu, it still works and unless I switch it out for the aforementioned lxqt-sudo (probably will) will keep using what I like. Yeah ... I think many nixers are uber paranoid about privacy and security. Seen more than a few that are obviously completely clueless in many aspects of either too.
They nail all their windows shut, set booby-traps and have a moat dug around their pc but leave a bridge to the backdoor and it's wide open. :)
Been doing this for like 8-9yrs now, not a single problem. Going to assume after a TON of time, effort and experience I may (just maybe) have learned enough about tech and gnu/Nix to somewhat know what the hades I'm doing. :D

OMG ... don't enable a root account, whatever you do, sudo, sudo is the only way, PERIOD !!!!! Yeah ok, always generally set up a root acct, zero problems ever resulted, in fact doing so saved me a few times when visudo/sudo or something similar was borked, had I not been able to login as root and fix it, I'd have had to fix it another way ie: Chroot or whatever. Still think it's fact that many nixers border on paranoid schizo's from what I've seen.

PS, yeah could just add a policy file as needed or opt for polkit style, I don't want or have to, so I'm not going to. :D
Most powerful FREE tech-support tool on the planet * HERE. *

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: My solution to gksu being deprecated/Buster.

#5 Post by Bulkley »

CwF wrote:Why would you do this?
I purged gksu in stretch. Since stretch pkexec works fine if you set it up.
pkexec is a pain to set up. I've done it and dislike it. If I was designing Debian that would be one of the first to go along with systemd and associated crap. Give me gksu any day of the week. So, Deb-fan, if you want to use gksu, as long as you are aware of the risks go for it. I do.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#6 Post by Deb-fan »

Pointless observation and includ rant: In many ways think gnu/Linux is regressing, when it was an uber diverse sub-culture of geeks who were contributing cause they love tech, it was rich and full. Now with so much control consolidated in the hands of a few (commercial interests, like Redhat etc etc.) It in my view has been diving towards the toilet. Not that all those kickbutt volunteers and passionate geeks aren't still around contributing just that many high level decisions are out of their hands now.

The whole Unix philosophy thingy, something made to do one thing, do it well and be interoperable with everything else. I don't so much dislike systemd, actually generally impressed with it but things in my view are moving in the wrong direction. Installed a minimal netinstall of Buster and have been hacking away at it, trying to get it to be what I want of it. One thing is that my beloved Ceni isn't of use to me any longer and am looking around for an equally good/effective minimal wifi/networking solution = networkd atm and one thing I noticed is just how problematic and complex handling something like /etc/resolv.conf has gotten. Sixty-four different things want to screw with it now, when it used to be a matter of editing a file, add your friggin dns server(s) of choice ... on with life.

Can still hack it (ie: even resorted to chattr +i temporarily) aka: Mega chmod'ing the thing so even root can't edit it without changing it back !!! But damn, this is progress ???? It's one simple friggin file to choose what dns servers get used. I'm supposed to get Redhat certified to deal with resolv.conf now ?!?!?!?
Most powerful FREE tech-support tool on the planet * HERE. *

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: My solution to gksu being deprecated/Buster.

#7 Post by CwF »

While I don't mind having obsolete packages, it better have a good reason. Something for which there is no alternative. GKSU offers zero. There is literally nothing it adds. All root options are available within ONE click. That's zero keystrokes. Why is it better to use an obsolete package to add a popup dialog box within which you are required to enter some password or clutter the screen with a echoing terminal behind the verboten gui when with pkexec you can turn it all into a click?

It would take less time to set it up than typing this. ?

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#8 Post by Deb-fan »

Bulkley wrote:
CwF wrote:Why would you do this?
I purged gksu in stretch. Since stretch pkexec works fine if you set it up.
pkexec is a pain to set up. I've done it and dislike it. If I was designing Debian that would be one of the first to go along with systemd and associated crap. Give me gksu any day of the week. So, Deb-fan, if you want to use gksu, as long as you are aware of the risks go for it. I do.
Thanks, yep ... and absolutely fellow nixer. :) Anything they can do we/someone can undo or find a work around to. At least as things stand at present. Will have to wait and see what the future holds. Sheesh would start eval'ing Bsd(s) but reality is if gnu/Nix is pooched, the Bsd's days are numbered along with too. Really need to do more boning up on systemd=oom and ways to work around it, to fully understand the thing and get very familiar with it.

Definitely don't want to have to learn Gentoo, arghhhh but will if I have to ! Don make me, pleaz don make me ! :)

Dang it CwF posted while I was mid-rant !!!
While I don't mind having obsolete packages, it better have a good reason. Something for which there is no alternative. GKSU offers zero. There is literally nothing it adds. All root options are available within ONE click. That's zero keystrokes. Why is it better to use an obsolete package to add a popup dialog box within which you are required to enter some password or clutter the screen with a echoing terminal behind the verboten gui when with pkexec you can turn it all into a click?

It would take less time to set it up than typing this. ?
The end thing is that it's stupid and pointless, a person with admin rights to a system or an attacker who gets them can NUKE a system(or network) ... PERIOD. I don't need friggin polkit thinking it's going to protect me from myself. My computer and the OS's on them DO WHAT I WANT THEM TO DO, THEY'RE MINE. Not the other way around dude. People can still launch anything/everything as root regardless. That's called being the admin !!!
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 75 times
Been thanked: 85 times

Re: My solution to gksu being deprecated/Buster.

#9 Post by wizard10000 »

I'm gonna say what I said in the other thread. Wonder how many folks here are running X as root?

:D
we see things not as they are, but as we are.
-- anais nin

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: My solution to gksu being deprecated/Buster.

#10 Post by CwF »

Deb-fan wrote: That's called being the admin !!!
You're missing my point. It may be a useless excercise to switch, yes. One is current, one is obsolete. There is no usabilty advantage to gksu. You are not able to do something with gksu I can't without it.

Basically, I offer a fresh chair cover but you won't get up. Then you do get up to go over and retrieve the old cover and fuss to put it on.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#11 Post by Deb-fan »

Hey not saying you don't have a point too CwF. Just that I prefer it the older way, will eventually move on but right now I like what I'm accustom to and don't feel like switching. Sheesh, even went ahead and disabled polkit altogether for awhile with no noticeable ill effects, outside of some minor error complaints in like "sudo journalctl -p 4" or summin.

Still think it's patatoe/pahtatoe kind of thing and doesn't do anything worthwhile. Admin is still admin, can do whatever they wish, as it should be. If I want to open a file-manager and muck around as root, can and will do so. How in hades is having an editable policy file supposed to make this more secure ? I can edit or modify the stupid policy files as I please too !!!! So could someone else, if they had local or remote access !!! Either way, endgame I think policy files are stupid, shrugs. Though will settle on an effective approach that works for me ... eventually.

Gave all due warnings and advisement's associated with this topic.

@Wizard10k, yeppers still an excellent point fellow nixer. :D Though Wayland is on the way too. Which I see valid technical reasoning behind it. Even though I don't have a fraction of the skill or understanding of the big picture, the real bigwigs involved with gnu/Linux do. Not even sure I'm qualified to opine overmuch on things. However, until such time as the freedom to choose what I like and how I can config things is taken away, I'll keep doing what works for me.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 75 times
Been thanked: 85 times

Re: My solution to gksu being deprecated/Buster.

#12 Post by wizard10000 »

Deb-fan wrote:@Wizard10k, yeppers still an excellent point fellow nixer. :D Though Wayland is on the way too. Which I see valid technical reasoning behind it. Even though I don't have a fraction of the skill or understanding of the big picture, the real bigwigs involved with gnu/Linux do. Not even sure I'm qualified to opine overmuch on things. However, until such time as the freedom to choose what I like and how I can config things is taken away, I'll keep doing what works for me.
openbox + Nvdia? It's liable to be quite some time before Wayland darkens my doorstep :mrgreen:
we see things not as they are, but as we are.
-- anais nin

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#13 Post by Deb-fan »

^ Hopefully, thinking the same. :) Though the speed @ which systemd spread was more quickly than I'd honestly expected too. Also the degree to which the/any alternatives were effectively knocked aside in the deal. Again I don't dislike the thing, same goes for the proposed justifications behind Wayland, agree with a bunch of them, what I can grok about the technical aspects of it. Redhat has long been famous for using the Fedora userbase as crash-test dummies pretty much. Trying new things out on them as they've seen fit etc blahblah. Looks like that's big time being extended along with all the influence over the key components of gnu/Nix they've amassed. IBM thought Redhat and whatever they have rights and control over was/is worth 34billion bucks. Last time I checked Redhat was just starting to clear 1bil per Yr. So someone said sure, we'll give you 34yrs worth of your profit for X. What exactly is X and how far down the rabbit hole does it go ?

Of course this is a gross over simplification just saying it's somewhat disconcerting to me. I don't really have the understanding of the big picture as pertains to open source or the technical skills either. Am a reasonably proficient end-user and Debian fanboi. Arghhh n oh well, guess we'll see. May have to start boning up on my upstream compilation skills ala: Gentoo + Slackware style.

Also BOO!!! :evil:
Last edited by Deb-fan on 2019-10-30 16:11, edited 1 time in total.
Most powerful FREE tech-support tool on the planet * HERE. *

debbieanne
Posts: 14
Joined: 2018-05-03 14:46
Been thanked: 1 time

Re: My solution to gksu being deprecated/Buster.

#14 Post by debbieanne »

I want to thank OP and everyone for this thread because I learned about pkexec and setup two policy files for gedit and featherpad. I like it because I don't have to "xhost +" and "sudo -i" anymore. It's just "pkexec gedit ..." and I'm editing system files.

Thanks, everyone!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: My solution to gksu being deprecated/Buster.

#15 Post by Head_on_a_Stick »

debbieanne wrote:It's just "pkexec gedit ..." and I'm editing system files.
Don't do that!

Do this instead:

Code: Select all

gedit admin:///full/path/to/system/file
^ That will open a copy of the file in gedit as your normal user and only invoke root (via gvfs) to save the file.

EDIT: and remove those polkit rules.

@OP: please don't recommend dangerous practices, some people use their computers for important stuff (apparently).
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#16 Post by Deb-fan »

^ Welkies Debbie. :)

@Wiz10k: Also from what I understand Openbox may be killed off, if not rewritten due to Wayland !!!! That alone is reason to stop all work on any such Waylandish thingy until such time as any needs of Openbox have been seen to !!!! The Xwayland thing aggravates me as well. Backwards compatibility, blahblahblah, we'll just run an X server along with our new thingy, blahblahblah. Touch Openbox and die you IBM-borg bastids !!! :twisted:

Oops, nother mid-rant poster !

Some people using their comps for "important" stuff might actually know what they're doing chief. ;) Or they may want to put some effort into learning. I included 1,700 disclaimers and warnings, what more am I reasonably supposed to do. Figure out how to make my post text red (and make it appear to be dripping blood.) The polkit thing is stupid, it's stupid ... plain and simple. I prefer to be treated like an adult, don't need my computer deciding it gets to tell me what to do and how to do it. Arghhhh, have a lot of respecto for you Hoas but in many things we're never going to see eye to eye. You've been harping on Frankendeb's and how they're a horrible disaster waiting to happen for years. I ran Frankendebs without any problems ... for YEARS. Many of us can actually competently make our own choices and admin our friggin OS installs. :)
Last edited by Deb-fan on 2019-10-30 16:23, edited 1 time in total.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: My solution to gksu being deprecated/Buster.

#17 Post by Head_on_a_Stick »

Deb-fan wrote:You've been harping on Frankendeb's and how they're a horrible disaster waiting to happen for years. I ran Frankendebs without any problems ... for YEARS.
And I have YEARS of threads in which people have fucked their systems completely by mixing repositories. I think my body of evidence is substantially more significant than yours :P
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#18 Post by Deb-fan »

Whatever you say-type dude. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#19 Post by Deb-fan »

Whatever you say-type dude. :) I've also seen 8 gazillion threads of people who couldn't identify their vidcard-graphics and figure out which module was needed or how to install it. Polkit or no polkit and policy files. Incompetent nixers can and will pooch their OS's. The only way to change that would be to make an OS that's automagic and fool-proof. Imo this is actually possible but would mean stripping away so much freedom would render gnu/Linux a meaningless joke in terms of what it's supposed to be.
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: My solution to gksu being deprecated/Buster.

#20 Post by Deb-fan »

Also freedom comes with the power to make mistakes and bad choices and to hopefully learn from them. I learned a TON from imploding gnu/Nix installs far and wide, esp at first. Now it's once every other blue moon and usually resort to restoring a backup cause I don't want to spend the time to fix whatever problem I've inflicted. Also there ya go, people who use their comp's for important stuff might want to think about a backup/restore plan. Something goes wrong, wham restore a backup, even on this ancient pc I'd be back in business in 15mins or so. :D
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply