Run software with graphic ui using sudo on Debian 9

Sometimes it's necessary to run software as root. For example when running KVM for booting a local hard drive, flash drive, sd-card etc.

# allow kvm to open a window while running as root
xhost +si:localuser:root

written by uniq on 2018-03-11