It is weird. Nevertheless, "On my Trisquel 8 system, (...) setting DISPLAY=:1 (...) gives the error [Sabrinakitty] report[s]": https://trisquel.info/forum/abrowser-another-user#comment-150088

That is why I thought she was maybe using Trisquel 9 where, for some reason, the proper display would have become :1, rather than :0. But she replied that she uses Trisquel 8, that setting DISPLAY=:1 makes no difference and that executing abrowser through pkexec but with the currently logged user (what I had tested) works. In the end, I believe there is nothing unusual with her system: you would probably face the same error trying to use pkexec to execute a graphical program as another user (who is not not root). The error being the same when DISPLAY is incorrectly set, it looks like it should be different.

I spent time reading documentation and searching the Web, but I could not understand how to make pkexec work in Sabrinakitty's use case. Most people only use pkexec to run programs as root. I ended up suggesting either gksu or sudo -HA. However, as far as I understand, pkexec is the recommended solution nowadays. gksu will certainly not even be in Trisquel 9's repository, because it is not in Ubuntu 18.04's, for security reasons. sudo -HA looks safe. But SUDO_ASKPASS=/usr/bin/ssh-askpass provides a rather ugly window. 'zenity --password' would be a barely better replacement (a configurable title with the option --title, rather than "OpenSSH").

If you want to spend time understanding how to make pkexec work in Sabrinakitty's use case, I would be interested in what you will discover...

Reply via email to