My solution to gksu being deprecated/Buster.

Here you can discuss every aspect of Debian. Note: not for support requests!

My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 05:18

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. :)
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby None1975 » 2019-10-30 12:34

Deb-fan wrote: open graphical apps with root/sudo privileges

It's a bad habit.
OS: Debian 10.1 Buster / WM: i3wm
Debian Wiki | DontBreakDebian, My config files in github
User avatar
None1975
 
Posts: 947
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: My solution to gksu being deprecated/Buster.

Postby CwF » 2019-10-30 13:02

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.
CwF
 
Posts: 502
Joined: 2018-06-20 15:16

Re: My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 14:00

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
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby Bulkley » 2019-10-30 14:32

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.
Bulkley
 
Posts: 5846
Joined: 2006-02-11 18:35

Re: My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 14:42

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 ?!?!?!?
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby CwF » 2019-10-30 14:51

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. ?
CwF
 
Posts: 502
Joined: 2018-06-20 15:16

Re: My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 14:54

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 !!!
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby wizard10000 » 2019-10-30 15:04

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
User avatar
wizard10000
 
Posts: 103
Joined: 2019-04-16 23:15
Location: southeastern us

Re: My solution to gksu being deprecated/Buster.

Postby CwF » 2019-10-30 15:21

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.
CwF
 
Posts: 502
Joined: 2018-06-20 15:16

Re: My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 15:35

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.
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby wizard10000 » 2019-10-30 15:46

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
User avatar
wizard10000
 
Posts: 103
Joined: 2019-04-16 23:15
Location: southeastern us

Re: My solution to gksu being deprecated/Buster.

Postby Deb-fan » 2019-10-30 16:06

^ 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.
Deb-fan
 
Posts: 445
Joined: 2012-08-14 12:27

Re: My solution to gksu being deprecated/Buster.

Postby debbieanne » 2019-10-30 16:11

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!
debbieanne
 
Posts: 5
Joined: 2018-05-03 14:46

Re: My solution to gksu being deprecated/Buster.

Postby Head_on_a_Stick » 2019-10-30 16:14

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).
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10613
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable