Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

MX Cleanup

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

Re: MX Cleanup

#11 Post by Richard » Fri Jun 15, 2018 1:18 pm

@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.
MX171: Lenovo T430-2017: i5-3320M, 8 GBRAM, 4.15.0-1-amd64, intel_pstate, 119 GB SSD
MX171: AA1(ZG5)/EeePC-1005HA: DualCoreN270, 1 GBRAM, 4.15.0-1-686-pae, 150 GB HDD
DC9, LibO610, Dbox, PM, FF, mPDFed, CherryT, Vbox. ____ Linux Counter #288562

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 8699
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

#12 Post by Adrian » Fri Jun 15, 2018 1:21 pm

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
Forum Guide
Forum Guide
Posts: 1156
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#13 Post by fehlix » 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.

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.

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 8699
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

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

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1156
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#15 Post by fehlix » Fri Jun 15, 2018 1:30 pm

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.

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 8699
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Cleanup

#16 Post by Adrian » Fri Jun 15, 2018 1:46 pm

Does it work for you?

Do any of you guys log in to root directly?

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1156
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#17 Post by fehlix » Fri Jun 15, 2018 1:49 pm

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 ' "

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1156
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#18 Post by fehlix » Fri Jun 15, 2018 1:57 pm

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.

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

Re: MX Cleanup

#19 Post by Richard » 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.
MX171: Lenovo T430-2017: i5-3320M, 8 GBRAM, 4.15.0-1-amd64, intel_pstate, 119 GB SSD
MX171: AA1(ZG5)/EeePC-1005HA: DualCoreN270, 1 GBRAM, 4.15.0-1-686-pae, 150 GB HDD
DC9, LibO610, Dbox, PM, FF, mPDFed, CherryT, Vbox. ____ Linux Counter #288562

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1156
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Cleanup

#20 Post by fehlix » Fri Jun 15, 2018 2:21 pm

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.

Post Reply

Return to “Forum en Español”