Thanks for your report.

>From pkexec's man page:

"The environment that PROGRAM will run it, will be set to a minimal
known and safe environment in order to avoid injecting code through
LD_LIBRARY_PATH or similar mechanisms. In addition the PKEXEC_UID
environment variable is set to the user id of the process invoking
pkexec.

As a result, pkexec will not allow you to run X11 applications as
another user since the $DISPLAY and $XAUTHORITY environment variables
are not set.

These two variables will be retained if the 
org.freedesktop.policykit.exec.allow_gui annotation on an action is set to a 
nonempty value; this is discouraged, though, and should only be used for legacy 
programs.
"

So unless you added a specific policy file, this is the expected
behaviour (for ref on x11 you can run GUI apps without a policy file by
passing $DISPLAY and  $XAUTHORITY on the command line like this: pkexec
env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gtkorphan)

I'm closing this report.

** Changed in: perl (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1712477

Title:
   cannot open display:  at /usr/lib/x86_64-linux-gnu/perl5/5.26/Gtk2.pm
  line 126.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1712477/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to