MX Cleanup

Este forum es para los usuarios de MX hispanoparlantes
Message
Author
User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

Re: MX Cleanup

#11 Post 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
Last edited by Richard on Fri Jun 15, 2018 1:57 pm, edited 1 time in total.
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

#12 Post 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).

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#13 Post 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.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

#14 Post 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.

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#15 Post 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.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

#16 Post by Adrian »

Does it work for you?

Do any of you guys log in to root directly?

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#17 Post 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 ' "
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#18 Post 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.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

Re: MX Cleanup

#19 Post by Richard »

As Adrian mentioned, moving the ampersand outside the quotes, works as expected.
With a space or without before the ampersand.
Not root.
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#20 Post 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.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “Forum en Español”