LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Closed Thread
  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: 41
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 stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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: 41
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 stable
Posts: 5,908

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

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
7 members found this post helpful.
Old 01-10-2012, 12:22 PM   #7
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Blog Entries: 1

Rep: Reputation: 34
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"
 
Old 09-24-2014, 04:44 AM   #9
aerique
LQ Newbie
 
Registered: Sep 2014
Posts: 1

Rep: Reputation: Disabled
Aaaaaaand... in 2014, thank you gnuzilla!
 
Old 04-29-2015, 09:24 PM   #10
yogeshg1987
LQ Newbie
 
Registered: Jan 2010
Location: Chennai, India
Distribution: Ubuntu 9.10, 9.04, 8.04
Posts: 2

Rep: Reputation: 0
Aaand in 2015, thank you, gnuzilla..
 
Old 05-25-2015, 08:05 PM   #11
ranixlb
Member
 
Registered: Apr 2002
Location: middle east- Lebanon- sidon (or saida if u like) city
Distribution: Redhat 9.0 and knoppix
Posts: 35

Rep: Reputation: 15
thanks gunzilla
 
Old 01-01-2016, 03:05 PM   #12
RootBash
LQ Newbie
 
Registered: Jan 2016
Posts: 1

Rep: Reputation: Disabled
And in 2016, thank you gnuzilla
 
Old 01-19-2017, 08:31 AM   #13
ImNotARobot
LQ Newbie
 
Registered: Jan 2017
Posts: 1

Rep: Reputation: Disabled
Talking

2017, thanks gnuzilla!
 
Old 04-26-2020, 06:53 AM   #14
ThanksGnuzilla
LQ Newbie
 
Registered: Apr 2020
Posts: 1

Rep: Reputation: Disabled
In 2020, thanks gnuzilla!
 
Old 06-25-2023, 12:14 PM   #15
ramenspazz
LQ Newbie
 
Registered: Jun 2023
Posts: 1

Rep: Reputation: 0
Talking

In 2023, Thanks gnuzilla. A true hero in our time of need.
 
  


Closed Thread

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration