<div dir="ltr"><div class="gmail_extra">Indeed $SUDO_USER works for applications that check $SUDO_USER, for example, the following work similarly in the case of lxdm-config :</div><div class="gmail_extra"><br></div><div class="gmail_extra">pkexec /usr/bin/env USER=$USER /usr/bin/lxdm-config<br></div><div class="gmail_extra">pkexec /usr/bin/env SUDO_USER=$USER /usr/bin/lxdm-config<br></div><div class="gmail_extra">pkexec --keep-user-env /usr/bin/lxdm-config<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Note : the problem when using "env" is that "/usr/bin/env" is matched by org.freedesktop.policykit.exec.path , so it's not a solution (all programs in need to keep $USER would get the same action policy) : that's why I wrote this patch.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Using $SUDO_USER or $USER both require a patch</div><div class="gmail_extra"><br></div><div class="gmail_extra">JP</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-27 16:29 GMT+01:00 Colin Walters <span dir="ltr"><<a href="mailto:walters@verbum.org" target="_blank">walters@verbum.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><u></u>




<div><div> </div>
<div> </div>
<div> </div>
<div>On Sat, Feb 27, 2016, at 07:01 AM, Jean-Philippe Guillemin wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Hi, <br></div>
<div>Many X applications require root privileges, but at the same time want to keep the original $USER env variable<br></div>
</div>
</blockquote><div> </div>
<div>Isn't the more correct precedent for this the `SUDO_USER` environment variable?<br></div>
<div> </div>
<div> </div>
</div>

<br>_______________________________________________<br>
polkit-devel mailing list<br>
<a href="mailto:polkit-devel@lists.freedesktop.org">polkit-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/polkit-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/polkit-devel</a><br>
<br></blockquote></div><br></div></div>