You are not logged in.

#1 2013-09-06 00:40:08

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

[SOLVED] Unable to launch GVIM via sudo from Konsole

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)

Offline

#2 2013-09-08 20:56:19

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: [SOLVED] Unable to launch GVIM via sudo from Konsole

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.

Offline

#3 2013-09-11 03:17:57

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: [SOLVED] Unable to launch GVIM via sudo from Konsole

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.

Offline

Board footer

Powered by FluxBB