:: Re: [DNG] pkexec in Chimaera
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Litt
Fecha:  
A: dng
Asunto: Re: [DNG] pkexec in Chimaera
tempforever said on Sun, 7 Nov 2021 14:19:54 -0500

>I'm logged on user "a" (with very few permissions), on the same system
>exists user "b" (in sudo group).
>When I run pkexec --user root mousepad (for example), it prompts for
>user "b" password, instead of root password.
>If I remove user "b" from sudo group, the above example will prompt for
>root password.
>I would like to keep user "b" in sudo group, and enter root user's
>password.  I believe gksu used to do this.  Is this possible to do any
>more in devuan?
>
>In beowulf, I was allowed to run "su -c mousepad" but now that fails:
>(mousepad:3105): Mousepad-CRITICAL **: 13:59:58.624: Failed to
>initialize xfconf: The connection is closed
>which is why I am now using pkexec


Try this:

su -c - root mousepad

Remember to put the dash between -c and root.

If you get the same results, perform the following:

su -c - root xterm

Now, within that xterm, run the mousepad command and see what goes
wrong. It's probably a wrong directory, or perhaps some missing
environment variable, either of which can be cured by a shellscript.

The shellscript, call it my_shellscript.sh, might look something like
the following:

#!/bin/sh
cd /my/special/directory
export MY_ENV_VAR="my special environment variable"
exec mousepad

If you use the shellscript, your command will be :

su -c - root my_shellscript.sh

SteveT

Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques