Ubuntu 17.10: sudo / gksu / gksudo not working, cannot open display

In case you try to start any application under Ubuntu and you get something like that:

fpanzer@nb-fpanzer:~$ sudo gsmartcontrol
No protocol specified
Unable to init server: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt

(gsmartcontrol:4153): Gtk-WARNING **: cannot open display: :0

Try to allow „root“ to run applications under your (user-)display:

xhost +SI:localuser:root

Update: if you disable Wayland, things magically start working as they should. Disable Wayland, it sucks. Just use xorg.

1 Kommentar zu „Ubuntu 17.10: sudo / gksu / gksudo not working, cannot open display“

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Nach oben scrollen