This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't launch gvim via sudo from Konsole.

Tags: None
(comma "," separated)
mmoses
Registered Member
Posts
3
Karma
0
I recently switched my desktop from Gnome to KDE. In gnome-terminal, I was able to do this:
Code: Select all
$ sudo gvim

Since switching to KDE, however, the above command yields the following and then starts console VIM.
Code: Select all
$ 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

Is there some configuration setting somewhere I need to change to get this to work?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
You could try to uncomment the line
Code: Select all
Defaults env_keep += "HOME"

in your sudoers file (using visudo).

Alternatively you can try to used kdesu/kdesudo instead of sudo.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
mmoses
Registered Member
Posts
3
Karma
0
Adding HOME to env_keep did the trick. I should have the same problem on my Gnome boxes, though, right? The contents of my various sudoers files are all the same, so I'm not sure where the difference is.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Yeah, I don't know if Gnome does anything special. If you still have Gnome installed you could try to comment out the line in sudoers again and see if it still works in Gnome.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
mmoses
Registered Member
Posts
3
Karma
0
I still have Gnome installed on my laptop. I've gone back and forth a few times now with that setting and haven't seen the same behavior. Oh well. It'll just have to be one of those things I research when there aren't more pressing concerns. Thanks for your help.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]