0

I re-furbish PCs for a small non-profit and we use xubuntu cloned using clonezilla. I am experiencing an issue where I set up an alias:

alias pkexec='pkexec /usr/bin/env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY'

This works fine from the command line and from a menu entry that I edited on my work rig. From my work rig, I get the password prompt that:

Authentication is required to run '/usr/bin/env'  

I enter my password and /usr/bin/hardinfo opens as superuser.

However, when this is attempted on any of my 'clones', pkexec displays the password prompt:

Athentication is required to run /usr/bin/hardinfo 

I enter my password and top show hardinfo starts then crashes or no longer appears as an executing program. I know there is something different between my rig and my clones. I don't know what is it. I'm posting here for your comments and suggestions.

Thanks in advance,

@bacOn,

I set up the function in .bashrc

pkexec() { command pkexec /usr/bin/env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "$@" }

I get a syntax error when I run source .bashrc syntax error unexpected token:

bash: .bashrc: line 146: syntax error near unexpected token `('
bash: .bashrc: line 146: `pkexec(){"command pkexec /usr/bin/env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "$@" "}'

@muru

I modified it and it now works.

pkexec(){ /usr/bin/pkexec /usr/bin/env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "$@" } source .bashrc and boom. it works on my home rig running mint from the commandline. but if I edit a menu entry pkexec /usr/bin/hardinfo, I get the password windows saying that /usr/bin/hardinfo requires authentication to run as root. hardinfo crashes.

But even after all your help, my question still remains, What could have changed on my work rig that would cause a cloned imaged to not work as expected. What troubleshooting steps might assist me in digging into the weeds on an issue that may/may not otherwise affect out future imaged machines.

Thanks for all of your help.

0 Answers0