It sounds like it is graphical application which fails to access your $DISPLAY
. So you need to make sure sudo
preserves $DISPLAY
environment variable and user root
is allowed to access it. For the former look at /etc/sudoers
and man sudoers
, specifically env_keep
. For the latter you can (for one off) just do xhost +
or add pam_xauth
to sudo
PAM configuration or tell sudo
to preserve $XAUTHORITY
variable or do xhost +si:localuser:root
and I am sure this list is not complete.