You are not logged in.

#1 2008-03-07 09:10:52

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

vim :No protocol specified

Hi ,
whenever I open vi/vim as root in terminal,I get this error:

root@myhost:~# vim
[b]No protocol specified[/b]

what happened?:(

while as local user it is perfectly OK.:|

Offline

#2 2008-03-07 15:59:01

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim :No protocol specified

can you try

$type vim

for me?

Offline

#3 2008-03-08 04:05:05

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: vim :No protocol specified

root@myhost:~# type vim
vim is hashed (/usr/bin/vim)

^Output,what that means? sad

Offline

#4 2008-03-08 06:55:45

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: vim :No protocol specified

some help smile

Offline

#5 2008-03-08 16:03:38

calef13
Member
Registered: 2007-06-10
Posts: 142

Re: vim :No protocol specified

I get this error too but only with kate and other gui editors. As far as I can tell, it's a security measure. The xorg server doesn't allow connections which have root privileges which involve programs started from the shell. I don't know why this is affecting vim, but int the meantime, you could use 'kdesu kate [filename]' as a workaround, which is what I used to do when I was too lazy to learn copy/paste in vim smile

Offline

#6 2008-03-08 16:56:41

eerok
Member
From: Canada
Registered: 2005-03-20
Posts: 171

Re: vim :No protocol specified

I've encountered this problem only in KDE so I think it's not anything xorg is doing.


noobus in perpetuus

Offline

#7 2008-03-09 01:06:46

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: vim :No protocol specified

^yes.even I am on kdemod :?

Offline

#8 2008-03-10 16:35:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: vim :No protocol specified

Oooh, I get it now.

This is vim trying to connect to your X clipboard, when running as root. Can you ignore it? I would. Otherwise, you can do the typical "allow root to access the X server" thing, using xhost.

Offline

#9 2008-03-11 06:48:52

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: vim :No protocol specified

I've had this issue as well but even opening a konsole window, then su-ing to another users account, *not roots*, I get precisely the same error.  It does not matter which user I try to run programs from/to and its driving me batty. 

Oddly enough, if I do ctrl-alt-F1, switch to VT1, login then any program I wish to run as another user from within my new shell's KDE session, works fine as expected...however, when I try to switch back to VT7 (the normal vt in use) my session has died & gone to the KDM screen. 

Is anyone else having similar behaviour or are these two issues unrelated?  If they're not related I'll delete this & start another thread.

Offline

#10 2008-03-11 18:34:18

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: vim :No protocol specified

sry if it is offtopic:
does archlinux bundles "sux" ,the "x" wrapper for "su" sessions?sux exports X credential as root.

ontopic:
also,for the error vim throws out,will there be any solution by editing /etc/vimrc ?

I am missing 2 important features of vim in archlinux(I know it is possible!)
1.I cannot press middlebutton(wheel) to paste something from selected text to vim editor.same happens with paste also.
2.I cannot scroll through the file text sad neutral

these 2 are enabled by default in almost all distros.Debian included.
So,Is there any solution.:) thanks for the support smile

Offline

#11 2008-03-11 19:18:02

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: vim :No protocol specified

sux is in the aur.

1. you cannot paste at all? how about shift - insert (that should paste)?

Offline

#12 2008-03-11 19:24:59

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: vim :No protocol specified

^YUP.ofcourse,that works.but in Debian,for eg:a simple middle button press is enough

Offline

#13 2008-08-31 21:41:56

gejr
Member
Registered: 2007-05-23
Posts: 92

Re: vim :No protocol specified

Sorry for bringing up this rather old thread, but I just want to add that for me this was resolved by stopping the gpm daemon.

Offline

#14 2009-02-12 23:59:06

caecusum
Member
Registered: 2007-08-26
Posts: 29

Re: vim :No protocol specified

I found this searching through the forum and just wanted to add that I seem to have the same problem, but only when I have

set title

in my .vimrc

In case that helps anyone

Offline

#15 2010-02-01 14:23:51

Scoobi_FreeBSD
Member
Registered: 2010-02-01
Posts: 1

Re: vim :No protocol specified

The "No protocol specified" error is from Vim's failure to connect to the X server.  Either unset the DISPLAY environment variable or start Vim with the -X option to prevent it from connecting to the X server.  The 'set title' option requires Vim to try to talk to the X server to set the terminal window title.

As for why Vim cannot connect to the X server, in my case it's only when I'm 'su root'; I can probably eliminate that by executing

xhost +local:

on the local X server.

Offline

#16 2010-08-28 20:49:43

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: vim :No protocol specified

I'm getting this warning at the moment with vim since I upgraded to KDE SC 4.5.  How can I remove this warning permanently? Where can I put

xhost +local:

I don't have a .vimrc in my home folder.

Offline

#17 2010-08-28 20:54:09

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: vim :No protocol specified

Given that the last post in this thread to receive an answer was in 2008 you'd be better 0ff starting a new thread.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#18 2010-08-28 21:12:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: vim :No protocol specified

Closing: follow the new thread https://bbs.archlinux.org/viewtopic.php?id=103808


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB