This is copied from here.
When using XWayland apps, sudo synaptic or other GUI programs may result in: No protocol specified. Unable to init server **: cannot open display: :0. A workaround for the GUI sudo permissions issue with Wayland is adding to ~/.profile xhost +si:localuser:root > /dev/null NOTE: this defeats non-root security advantages of Wayland over X11.