Reply to topic

Can't launch gvim via sudo from Konsole.

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
3118
Karma
20
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.

Image
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
3118
Karma
20
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.

Image
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.

 
Reply to topic

Bookmarks



Who is online

Registered users: alake, Artmessiah, Baidu [Spider], Bing [Bot], bjoernbalazs, blue_bullet, Charblaze, dniitall, edmael, Exabot [Bot], franku, GentooSimon, Google [Bot], google01103, jensreuterberg, jgrulich, jitseniesen, ken300, koriun, La Ninje, lazyit, lucyandfatty, Majestic-12 [Bot], Mamarok, MiceAreVeryNice, odysseus-art, okias, robinh, Steve Guilford, urgo, wes33, Yahoo [Bot]