LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-28-2008, 12:34 PM   #1
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 33
How to add a program to update-alternatives


My preferred editor is not listed when I run
Code:
sudo update-alternatives --config gnome-text-editor
How do you add items to this? Thanks
 
Old 03-28-2008, 04:26 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,747

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Don't know. Never heard of it.

Which GNU/Linux distro are you using? What application are you trying to run? etc, etc, etc.

Give more information relative to the problem, and you are more likely to get an answer.
 
Old 03-28-2008, 06:43 PM   #3
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by bigrigdriver View Post
Don't know. Never heard of it.

Which GNU/Linux distro are you using? What application are you trying to run? etc, etc, etc.

Give more information relative to the problem, and you are more likely to get an answer.
I'm running Ubuntu (both Gutsy and Hardy beta on laptop/desktop).

I want to use SciTE text editor as my gnome-text-editor, but after installing SciTE using Synaptics, I do not have an option to select it when I run this code
Code:
sudo update-alternatives --config gnome-text-editor
I would like to add SciTE to that list. Thanks.
 
Old 03-28-2008, 08:46 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,747

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
This might help: http://blog.stevenkroon.com/2006/08/...-alternatives/
 
Old 03-28-2008, 10:01 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by Mountain View Post
My preferred editor is not listed when I run
Code:
sudo update-alternatives --config gnome-text-editor
How do you add items to this? Thanks
I'm not really a ubuntu and/or debian-fan/-user, but ...
The man-page for the tool suggests two directories for you
to look at (you did read the man-page, right?).
Number 1:
/etc/alternatives
(holds links to the actual program to use, eg. editor is a
symlink to /usr/bin/vim)

Not a good place to start futzing around ...

Number 2:
/var/lib/dpkg/alternatives
Hmmm ... text-files, with content like:
Code:
auto
/usr/bin/gnome-text-editor
gnome-text-editor.1.gz
/usr/share/man/man1/gnome-text-editor.1.gz

/usr/bin/gedit
50
/usr/share/man/man1/gedit.1.gz
/usr/bin/vim.full
45
Hmmm ... might be a good place to start toying, of course I have
NO idea whether the maintainers of deb/*bunut share that view ;}



Cheers,
Tink
 
1 members found this post helpful.
Old 12-07-2011, 05:08 PM   #6
gnuzilla
LQ Newbie
 
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17

Rep: Reputation: Disabled
Add new option to update-alternatives link, Correct Answer

To add a new item to update-alternatives, use the following options.

Code:
update-alternatives --install /usr/bin/$LINK $PROVIDES /usr/bin/$BIN $XX
So for example... (Assuming Luajit is not available in the --config list for /usr/bin/lua)
If The link I'm updating is /usr/bin/lua, which provides lua-interpreter. I want to add Luajit, with a priority of 90, to the /usr/bin/lua link.

Code:
update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/luajit-2.0.0-beta8 90

I'm providing the correct answer so it will be available, for anyone who lands here from Google. I hate having high relevancy results, not provide the appropriate information. I'm aware this is a 3+ years old thread.

BTW, update-alternatives is a Debian family specific command. I wouldn't need to be told explicitly which distro someone uses, to address something implicitly distro specific.

Last edited by gnuzilla; 12-07-2011 at 05:10 PM. Reason: Bad title
 
4 members found this post helpful.
Old 01-10-2012, 12:22 PM   #7
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 694
Blog Entries: 1

Rep: Reputation: 32
I have a doubt, is there a way to add man pages particularly for eg like the java man page using update-alternatives for curiousity sake?
 
Old 06-09-2013, 11:12 AM   #8
iansane
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
And in 2013 I thank you gnuzilla :-)

It's like when you go to the hardware store and ask where the hammers are and the (insert rediculous job title like Industrial systems technical sales associate)says "duh... what are you going to do with it?" instead of the correct answer which would be "I don't know" or "isle 4"
 
  


Reply

Tags
browser, default, links, mailto, set, url


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
How do you use update-alternatives --set? vwr0527 Linux - Newbie 1 11-07-2007 11:49 PM
GForge program alternatives mikecrowe Linux - Software 1 02-26-2007 04:31 PM
completely replacing exim with qmail -- update-alternatives? johnMG Debian 1 09-26-2005 04:13 PM
learning to program (qbasic alternatives) enric Programming 11 01-10-2005 05:53 AM
Please help to explain the syntax for 'update-alternatives' davidas Linux - Newbie 1 04-11-2004 06:22 AM


All times are GMT -5. The time now is 04:04 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