Page 2 of 6

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:18 pm
by Richard
@Fehlix,
first one failed.

Code: Select all

$ su-to-root -X -c '/usr/bin/baobab&'
0.0
gksu-run: gksu/|usr|bin|baobab&/29052-0-T430_TIME17397126
gksu-run: 76b214f1cf5e4b62468b8233c3db801c

No protocol specified
Unable to init server: Could not connect: Connection refused

(baobab:29063): Gtk-WARNING **: cannot open display: :0.0
[7]+  Done                    baobab
richard@T430:~
Second one works fine. Produces a complete display of all drives and partitions

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:21 pm
by Adrian
The & should be placed outside the quotes, but that's not what MX Cleanup calls.
It's strange, why is it not working for you, it works perfectly on my system and on a clean Live ISO (I know because I'm just building the monthly snapshots).

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:24 pm
by fehlix
Richard wrote: Fri Jun 15, 2018 1:18 pm Second one works fine.
That was my guess: The Nr1-call is within mx-cleanup, which is not starting.

EDIT: To summarize:

This call 'baobab&' is made with mx-cleanup, which is started via 'su-to-root -X -c 'mx-cleanup'
and this call works: su-to-root -X -c '/usr/bin/baobab'
So I assume: changing mx-cleanup to call 'baobab' insteaad of ' 'baobab&'
will make DUA run from with mx-cleanup.

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:27 pm
by Adrian
fehlix wrote: Fri Jun 15, 2018 1:24 pm
Richard wrote: Fri Jun 15, 2018 1:18 pm Second one works fine.
That was my guess: The Nr1-call is within mx-cleanup, which is not starting.
Not really...
https://github.com/MX-Linux/mx-cleanup/ ... w.cpp#L182

It works for me, it works in Live environment, there's nothing wrong with the command.

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:30 pm
by fehlix
Adrian wrote: Fri Jun 15, 2018 1:27 pm
fehlix wrote: Fri Jun 15, 2018 1:24 pm
Richard wrote: Fri Jun 15, 2018 1:18 pm Second one works fine.
That was my guess: The Nr1-call is within mx-cleanup, which is not starting.
Not really...
https://github.com/MX-Linux/mx-cleanup/ ... w.cpp#L182

It works for me, it works in Live environment, there's nothing wrong with the command.
I'know. Seems the security content and/or environment stops this somehow.

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:46 pm
by Adrian
Does it work for you?

Do any of you guys log in to root directly?

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:49 pm
by fehlix
Seems to be the security context not passed through:
The call goes from mx-cleanup started within root-environment.
Simulating this with

Code: Select all

su-to-root -X -c '/usr/bin/baobab&' 
or with this

Code: Select all

su-to-root -X -c "sh -c '/usr/bin/baobab&' "
will not start DUA.
Providing some more security context
will start it:
su-to-root -X -c "sh -c 'env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /usr/bin/baobab&'"
EDIT:
Starting without the background ampersand, keeps the security context in place:
SO both of thos simulations will start:

Code: Select all

su-to-root -X -c '/usr/bin/baobab ' 
or with this

Code: Select all

su-to-root -X -c "sh -c '/usr/bin/baobab ' "

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:57 pm
by fehlix
Adrian wrote: Fri Jun 15, 2018 1:46 pm Does it work for you?

Do any of you guys log in to root directly?
Well it workes for me.
Log-in as root. Good point, reminds me another user who done this recently ;=)
I would have never thought about log in in to root.

Re: MX Cleanup

Posted: Fri Jun 15, 2018 1:59 pm
by Richard
As Adrian mentioned, moving the ampersand outside the quotes, works as expected.
With a space or without before the ampersand.
Not root.

Re: MX Cleanup

Posted: Fri Jun 15, 2018 2:21 pm
by fehlix
Richard wrote: Fri Jun 15, 2018 1:59 pm As Adrian mentioned, moving the ampersand outside the quotes, works as expected.
With a space or without before the ampersand.
Not root.
MX-cleanup calls it as 'baobab&' within ths security context of root.
Both calls even looking similar 'baobab &' and 'baobab&' are not identical.
The first calls the program and then send it into a backgroud process,
the 2nd opens it within a backgrund process.
My hope was that only the little change to add a space inbetween
will keep the security context.