Page 3 of 4

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 01:35
by Deb-fan
Here, here NFT5 ! :) For real, it's your OS, we're all free to setup and config in a way that works best for each of us. One of the many great things about Debian and gnu/Linux period. How many years did all these people who are flipping out and self righteously strutting around shaking fingers at people use gksu/do ? How many times did it blow up their computer(s) or kill them etc ? :D

Like I said some folks here clearly need to get over themselves. Don't remember any vote in which any of these dudes were elected the grand imperial poobah or high mucky muck over anyone else on this forum.

Also just for the record Bulkley and NFT5, what Wizard10k if referring too is the fact that every display manager other than GDM = (gnome display manager of course)starts the X process as root. Pop open a terminal on your system and watch in "top". It'll show who owns the process, if its root, it'll say it.

Note: I know lightdm does, I don't even have a DM anyway, really don't care if the X process is running as root regardless. Though w/o a DM, the Xorg process is running under my user. It's been awhile so not 100% all DM's other than GDM do so either. Oh well, life goes on fellow nixers. :)

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 04:02
by NFT5
pcalvert wrote:What about using su-to-root instead of gksu, like this?:
Code: Select all
su-to-root -X -c <application>



Nope.

Code: Select all
chris@BOSSDESK:~$ su-to-root -X -c dolphin
kdesu(13194)/kdesu (kdelibs) KDESu::PtyProcess::exec: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/process.cpp : 293 ]  Running "/usr/bin/su"
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(13194)/kdesu (kdelibs) KDESu::PtyProcess::exec: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/process.cpp : 293 ]  Running "/usr/bin/su"
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(13194)/kdesu (kdelibs) KDESu::PtyProcess::WaitSlave: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/process.cpp : 379 ]  Child pid 13199
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line ""
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line "kdesu_stub"
kdesu(13194)/kdesu (kdelibs) KDESu::PtyProcess::exec: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/process.cpp : 293 ]  Running "/usr/bin/su"
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(13194)/kdesu (kdelibs) KDESu::PtyProcess::WaitSlave: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/process.cpp : 379 ]  Child pid 13202
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line ""
kdesu(13194)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /build/kde4libs-5CvfXW/kde4libs-4.14.38/kdesu/su.cpp : 259 ]  Read line "kdesu_stub"

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 04:23
by Deb-fan
Public apology, sorry Sunrat, have no idea why I read what you'd said and interpreted it so harshly. What you'd typed was nowhere near as big a reprimand as I was taking it to be and so ended up lashing out. Sorry fellow nixer ...

Had just gotten done successfully following a tute to do something I was wanting and was popping in to report it and share a link about it. Seen this thread and went cyber berserk ! Though do stand by some of what I'd typed, not directed @ you/Sunrat. Some folks do come off as pretty friggin arrogant in how they treat others, it's belittling in the way they seem to assume oh you're new, therefor you're stupid, can't read, couldn't possibly know how to do competent research etc etc etc. So you just be a good widdle dumbarse and don't touch anything or push any buttons kay ? :D

It's friggin software, wish life were like gnu/Linux, take a few precautions, enter a few commands and it's fresh start, do over. Not like the world hangs in the balance if someone newbish to gnu/Nix breaks an install. Personally think breaking stuff can be a great learning tool. Though saving time and CYB = covering your butt by learning a working backup/restore method can definitely help. You get to break more stuff, in less time thataway. :D

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 07:21
by sunrat
Apology accepted.
Over the years we've had possibly hundreds of posts where people have added the wrong repos and hacked things they shouldn't have hacked. It's very hard to support and best not to encourage it.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 07:38
by Deb-fan
^ Nn worries definitely see where you're coming from fellow nixer. The gnu/Nix gawds punished me for being an overly sensitive ahole, the project I'd thought had succeeded, while works is not right. So it's back to the drawing board. Dratz ! Running on coffee fumes here. :)

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 09:48
by wizard10000
Bulkley wrote:Not me. I don't even use sudo. I still use su (although I have added the -) when I need to use access root.


Are you running X using a display manager that's not GDM? If so, X is running under the root account. This is the reason I quit using display managers :)

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 12:44
by anticapitalista
wizard10000 wrote:
... If so, X is running under the root account. This is the reason I quit using display managers :)


Why is that so 'wrong' now in buster, but was perfectly acceptable in all previous Debian releases?

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 15:04
by Bulkley
wizard10000 wrote:Are you running X using a display manager that's not GDM? If so, X is running under the root account. This is the reason I quit using display managers :)


I don't use a display manager. I log in with sx (alias for startx). That's one more thing I haven't been able to do with Buster.

BTW, I use Openbox with Tint2 and keep this thing as simple as possible. I get to listen to music or radio, watch video, play games and do any office stuff I need. It all works so I see no pressing need to change it. I suppose this is the good enough syndrome that frustrates those who make new stuff.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 15:42
by wizard10000
Bulkley wrote:BTW, I use Openbox with Tint2 and keep this thing as simple as possible.


Same. openbox just works :)

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 17:05
by Head_on_a_Stick
anticapitalista wrote:
wizard10000 wrote:
... If so, X is running under the root account. This is the reason I quit using display managers :)


Why is that so 'wrong' now in buster, but was perfectly acceptable in all previous Debian releases?

It was never acceptable, rootless X is a major improvement.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 17:13
by Head_on_a_Stick
Deb-fan wrote:
^ That will open a copy of the file in gedit as your normal user and only invoke root (via gvfs) to save the file.


Keep having to ask myself, what the hades am I missing here ?!?!?

Using a graphical editor with sudo, gksu{,do} or su-to-root runs the whole application with root privileges for the entire time it is open, that's why it's such a bad idea. Any bugs in the program or the underlying graphics stack will be exposed with elevated permissions.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-10-31 23:26
by Deb-fan
^ Don't get me wrong I get that, that aspect of it is perfectly clear. Still don't really see much of a benefit and plenty of possible gotcha's and doors left open regardless of what they try to implement. Folks can still run anything as root, truth be told using sudo seldom caused any issues when was new to gnu/Nix and never would if someone used the right flags, at least I don't think it would.

The couple times I did end up messing up file ownership, took all of 20mins to learn what the problem was and the simple fix of chown'ing it back. Another reason newbish folks may want to keep a root account around. Obviously I've elected to keep using gksu, thing will likely remain working fine for the life of Buster if I want to use it and for now I do. Mentioned in previous posts, I've used the dang thing for 8 or so years now without problems. Figure doing so awhile longer isn't going to cause harm. :)

More pointless observations about this nonsense: How long do people tend to leave file-managers running as root normally ? I mean generally if I've launched thunar/etc with priv's it means I'm actively doing something which requires priv's to get done. Not like people just leave one running 24/7 and if they do that's their preference and risk. Though keeping it real, someone could easily enough set things up to login as root or visudo blahblah all commands no password if they please. Which of course was the bane of window$ for a long time, nixers can still do so in mere minutes if that's their decision. Edit: Goes without saying it'd be a bad decision though, shrugs.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-11-01 02:21
by pcalvert
wizard10000 wrote:Are you running X using a display manager that's not GDM? If so, X is running under the root account.

Who the heck thought that was a good idea? It looks like I'll be dumping LightDM soon and going back to using xinit.

Phil

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-11-01 02:29
by Deb-fan
Lol ... this thread, as pretty much every gnu/Linux forum thread ... EVER, has jumped the topic track and headed off into let's talk about anything/everything territory. :D Also as usual I contributed more than my share of off-topicness too. :D

So shall continue, I speculate and wonder, with X running under a user process, not as root, is Xorg no longer vulnerable to the processes snooping on each that I've read about ? I mean user processes likely still but could they snoop on root ones too ? Yeppers xinit = startx, don't have a display manager either. Shameless self promotion goes > here. The snippet about using the .profile file in your users home directory automatically runs startx for someone. Though the stuff for that used in Head_on's tute appears better than what I used for it. Still have it setup the way it is in my stupe tute but meaning to getting around to using his for it (.profile edit.) :)

Edit: @Bulkley what isn't working under Buster ? Method for autologin + startx w/o display manager linked above is confirmed working in Buster. Also 100% sure Head_on's will too, guy knows his gnu/Nix. Of course like my way of doing it, well not so much mine ... Was just grabbed from varied info online but has been very well tested on Stretch, using it in Buster too.

Re: My solution to gksu being deprecated/Buster.

PostPosted: 2019-11-01 09:59
by wizard10000
pcalvert wrote:Who the heck thought that was a good idea? It looks like I'll be dumping LightDM soon and going back to using xinit.


Quite a few people aren't going to be able to do this as X without a display manager requires a modesetting video driver. root has to launch the driver if the kernel can't.

GDM starts X as root and then passes ownership to the user who just logged in.