After installed vim-gnome, every time I execute "sudo vim", it will print one line
Bash
$ sudo vim # doing something, and quit it
No protocol specifiedThis is caused by xauth.
Firstly, check the .Xauthority in your $HOME, if it does not exists, create it as follow:
Bash
$ cd ~
$ touch .Xauthority
$ xauth generate $DISPLAY . trustedAnd then, you may required to make some change for your sodoers.
CAUTION: any change to sudoers should be very carefully. Please keep a root session before the follow command
Bash
echo 'Defaults env_keep += "DISPLAY XAUTHORITY"' | sudo tee /etc/sudoers.d/fix-no-protocol-specified-issueSince you had changed something in /etc/sudoers.d/*, please check your sodoer is normal
Bash
sudo whoamiIf it was damaged, please delete the file "/etc/sudoers.d/fix-no-protocol-specified-issue" in root, and let me know.
Finally, please check you vim. It could works fine.
Update:
Does not work when I restart my laptop. Add this file into my gnome-shell starting service list:
Bash
/usr/bin/touch $HOME/.Xauthority && /usr/bin/xauth generate $DISPLAY . trusted
Comments
No comments yet — be the first to write one.