71GA
71GA

Reputation: 1401

Hiding gvim from the system

I am on Debian 10 and if I install package vim I don't get support for system clipboard like described here. The only way to get the clipboard support on Debian 10 is to install either vim-gtk or vim-gui-common packages which both install gvim.

And I don't like that, because then I have two editors in my file browser:


enter image description here


So I tried to sudo chmod -x /bin/gvim but then my system couldn't see vim as well! Why is that? So my question is how can I hide gvim from my system while not affecting vim and keep clipboard functionalities?

Upvotes: 0

Views: 36

Answers (1)

phd
phd

Reputation: 94726

$ ls -lAF /usr/bin/{g,}vim
lrwxrwxrwx 1 root root 22 Jul 28  2013 /usr/bin/gvim -> /etc/alternatives/gvim*
lrwxrwxrwx 1 root root 21 Jul 28  2013 /usr/bin/vim -> /etc/alternatives/vim*

$ ls -lAF /etc/alternatives/{g,}vim
lrwxrwxrwx 1 root root 16 Jul 28  2013 /etc/alternatives/gvim -> /usr/bin/vim.gtk*
lrwxrwxrwx 1 root root 16 Jul 28  2013 /etc/alternatives/vim -> /usr/bin/vim.gtk*

They point to the same binary. Making gvim non-executable automatically makes vim non-executable.

So you cannot really "hide" gvim but you can remove the symlinks:

sudo rm /usr/bin/gvim /etc/alternatives/gvim

Upvotes: 1

Related Questions