termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
781 stars 160 forks source link

Problems with pkexec in proot #121

Closed ghost closed 4 years ago

ghost commented 4 years ago

hey guys. i've been setting up debian 9 proot environment on android device using debootstrap. and i know the package called gksu in linux. which i added user accounts and allows me to run synaptic in desktop menu. which allows me to authenticate using gksu which i modified the synaptic.desktop changing the exec=synaptic-pkexec to exec=gksudo synaptic

However since newer versions of linux distro uses pkexec and admin:/// uri scheme. i've been setting up user accounts in proot-distro in ubuntu. but since gksu is obsolete. pkexec won't work in some cases. maybe something to do with policy kit. tried to changing the synaptic desktop entry to exec=sudo synaptic with the option to run it in terminal emulator. but it seems it dosen't prompt me in the terminal with password user input to run synaptic. tried to set the sudo authentication to NOPASSWD in /etc/sudoers.d/user but it seems it still the same

tried. $ XAUTHORITY=${HOME}/.Xauthority synaptic-pkexec but failed causing an error. about Failed to connect to Xauthority no such file or directory

is there a walkaround to run pkexec in proot. or other alternatives to pkexec to work in proot?

michalbednarski commented 4 years ago

I've tried sudo env HOME=$HOME synaptic and it works (at least with Xephyr / ssh -Y)

ghost commented 4 years ago

I did it. i just need to install lxqt-sudo (a Sudo Qt Frontend for LXQT) and it acts like pkexec. though the appearance dosen't match arc theme. just plain classic qt