LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-10-2004, 02:29 AM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Symbolic link in /etc/alternatives not working as intended


1) I have just installed vim-gtk. Various links in /etc/alternatives have been changed to reflect the installation of vim-gtk, as follows:

lrwxrwxrwx 1 root root 12 Apr 10 22:24 editor -> /usr/bin/vim
lrwxrwxrwx 1 root root 28 Apr 10 22:24 editor.1.gz -> /usr/share/man/man1/vim.1.gz
lrwxrwxrwx 1 root root 12 Apr 10 22:24 ex -> /usr/bin/vim
lrwxrwxrwx 1 root root 28 Apr 10 22:24 ex.1.gz -> /usr/share/man/man1/vim.1.gz
lrwxrwxrwx 1 root root 13 Apr 10 22:43 vi -> /usr/bin/vim
lrwxrwxrwx 1 root root 28 Apr 10 22:24 vi.1.gz -> /usr/share/man/man1/vim.1.gz
lrwxrwxrwx 1 root root 12 Apr 10 22:24 view -> /usr/bin/vim
lrwxrwxrwx 1 root root 28 Apr 10 22:24 view.1.gz -> /usr/share/man/man1/vim.1.gz

I changed the symbolic link for vi from /usr/bin/vim to /usr/bin/gvim.
Code:
ln -sf /usr/bin/gvim vi
Update: I tried using update-alternatives --install

Code:
update-alternatives --install /usr/bin/vi vi /usr/bin/gvim 130
Code:
update-alternatives --display vi
shows the best current editor is /usr/bin/gvim.

However, when I key in the command vi <filename>, the text-based vim instead of gvim is launched. Shouldn't gvim be launched instead?

2) Do I need to edit vi.1.gz -> /usr/share/man/man1/vim.1.gz to something else after changing vi -> /usr/bin/gvim ?

Thanks !

Last edited by davidas; 04-10-2004 at 07:07 PM.
 
Old 04-10-2004, 01:55 PM   #2
Goll
LQ Newbie
 
Registered: Jun 2003
Location: €urope
Distribution: Debian GNU/Linux
Posts: 16

Rep: Reputation: 0
just a guess.. try
Code:
ln -sf /usr/bin/gvim /usr/bin/vi
you are not giving the path to actual vi ....
 
Old 04-10-2004, 07:09 PM   #3
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
/usr/bin/vi is a symbolic link pointing to /etc/alternatives/vi, which in turn selects the 'best' vi alternatives to use based on priorities.

Thanks

Quote:
Originally posted by Goll
just a guess.. try
Code:
ln -sf /usr/bin/gvim /usr/bin/vi
you are not giving the path to actual vi ....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 09:27 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
symbolic link ilnli Slackware 6 01-04-2005 05:05 PM
symbolic link jsetter Linux - Newbie 4 11-22-2004 07:18 AM
Symbolic link. bulzbb Linux - General 8 03-19-2004 04:57 AM


All times are GMT -5. The time now is 11:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration