I'm using Trisquel 8
Terminal based web browser works as another user
$ pkexec --user webbrowser lynx
Ranger is also working
$ pkexec --user webbrowser ranger
But GUI based web browser is not working
$ pkexec --user webbrowser env DISPLAY=:1 XAUTHORITY=$XAUTHORITY abrowser
Failed to connect to Mir: Failed to connect to server socket: No such file or
directory
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :1
If I try with my user that is currently logged in
$ pkexec --user sabrina abrowser
It works.