I recently switched my desktop to KDE from Gnome. Under Gnome, using gnome-terminal, I was able to launch GVIM as root using sudo:
$ sudo gvim /path/to/file
Attempting to run the same command using Konsole results in an error:
$ sudo gvim Password: No protocol specified E233: cannot open displayE852: The child process failed to start the GUINo protocol specified Press ENTER or type command to continue
Does anyone know what gnome-terminal (or Gnome) does that Konsole (or KDE) is not doing to cause this error?
Last edited by mlmoses (2013-09-11 03:18:17)
I'm pretty sure this is a Gnome vs. KDE difference instead of a gnome-terminal vs. konsole difference. I installed xfce4-terminal and had the same issue. I was going to make the attempt with gnome-terminal as well, but gnome-terminal wouldn't run properly. I've found a few old posts which mention something about using xhost, but that's not currently installed on my system and I don't know the package to which it belongs.
If anyone has any thoughts, let me know.
So it seems I needed to add the following to my sudoers file.
Defaults env_keep += "HOME"
I'm not sure why this is necessary in KDE, but not in Gnome though.