You are not logged in.

#1 2010-08-28 21:02:42

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

[SOLVED] Vim warning "No protocol specified"

Ever since I upgraded my KDE Sc to 4.5.0 (KDEmod) I've been getting this warning when launching vim with sudo or as root (via doing su - first). As far as I understand from older threads dating back to 2008. It has to do with vim trying to connect to the X server. How can I fix this warning permanently and has it appeared just now?

Last edited by fettouhi (2010-08-29 07:29:22)

Offline

#2 2010-08-29 07:29:04

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

Re: [SOLVED] Vim warning "No protocol specified"

I finally found a solution to the problem:

I put the following line in my root users .bashrc script

export XAUTHORITY=/home/<user>/.Xauthority

then I copied .Xauthority to root also, i.e.

sudo cp ~/.Xauthority /root

and now the warning is gone.

Offline

#3 2010-08-29 16:36:21

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: [SOLVED] Vim warning "No protocol specified"

You can use the -E switch to keep environment variables in sudo, or just use gksudo for all graphical apps.

Offline

#4 2010-08-30 06:47:35

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

Re: [SOLVED] Vim warning "No protocol specified"

You mean by running vim via

vim -E ...

?

Offline

#5 2010-08-30 11:03:52

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: [SOLVED] Vim warning "No protocol specified"

man sudo

Offline

#6 2017-12-29 09:16:44

zezu
Member
Registered: 2017-12-25
Posts: 16

Re: [SOLVED] Vim warning "No protocol specified"

Have the same problem, this command fix it

sudo xhost +local:root

Offline

#7 2017-12-29 09:39:26

seth
Member
Registered: 2012-09-03
Posts: 58,717

Re: [SOLVED] Vim warning "No protocol specified"

Don't
a) necrobump
b) to a solved thread and
c) especially not with such ill-advising rubbish.

Whenever you've xauthority issues, xhost, especially to grant root access, is NOT THE ANSWER.

Offline

#8 2017-12-29 11:25:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,209

Re: [SOLVED] Vim warning "No protocol specified"

What seth said.

Seriously don't bump 7 year old threads. -- https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB