galternatives cannot add or choose alternatives

Bug #1309709 reported by monkeybrain2012
This bug affects 13 people
Affects Status Importance Assigned to Milestone
galternatives (Debian)
Fix Released
galternatives (Ubuntu)
Fix Released

Bug Description

Open the galternatives interface, go to an item that has alternatives installed, try to add the alternative with Add, Browse .. Locate the path . On clicking 'OK' the dialogue window just disappears without the path being added.

I can add the alternative with the command line "sudo update-alternatives install .." the alternative then shows up in galternatives but trying to click and choose it has no effect.

Ubuntu 14.04 64 bit. galternatives version 0.13.5+nmu2ubuntu1. The same version works in Ubuntu 13.10.

I have the default unity interface, but galternatives does not work in lxde and gnome-session-fallback metacity sessions either, so it is not a unity/compiz problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in galternatives (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
David Cesarino de Sousa (davidcesarino) wrote :

To those that are not familiarized with the command line, and are in a hurry to configure your java definitions properly (say, you just installed Trusty and need this working right now), you can do this:

1. Unpack the tar.gz file from the Oracle site to /usr/lib/jvm/java-7-oracle-jdk-amd64

2. Perform the following commands:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/java 1000
sudo update-alternatives --install /usr/bin/jexec jexec /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/lib/jexec 1000
sudo update-alternatives --install /usr/bin/keytool keytool /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/keytool 1000
sudo update-alternatives --install /usr/bin/orbd orbd /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/orbd 1000
sudo update-alternatives --install /usr/bin/pack200 pack200 /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/pack200 1000
sudo update-alternatives --install /usr/bin/policytool policytool /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/policytool 1000
sudo update-alternatives --install /usr/bin/rmid rmid /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/rmid 1000
sudo update-alternatives --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-7-oracle-jdk-amd64/bin/rmiregistry 1000
sudo update-alternatives --install /usr/bin/servertool servertool /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/servertool 1000
sudo update-alternatives --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/tnameserv 1000
sudo update-alternatives --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/unpack200 1000

3. And then select the proper alternatives (in case you had another distribution installed, like OpenJDK) with the commands:

sudo update-alternatives --config java
sudo update-alternatives --config jexec
sudo update-alternatives --config keytool
sudo update-alternatives --config pack200
sudo update-alternatives --config policytool
sudo update-alternatives --config rmid
sudo update-alternatives --config rmiregistry
sudo update-alternatives --config servertool
sudo update-alternatives --config tnameserv
sudo update-alternatives --config unpack200

For each of these, you will be prompted to select the alternative you want. You will be prompted with a list of choices. Select the one you just defined in the commands under item 2, above. They are the ones pointing to java-7-oracle-jdk-amd64.

This is pretty self-explanatory. Just in case someone on the web find this on Google and needs help. ;-)

Revision history for this message
Achmed (mistral-f) wrote :
Revision history for this message
Margarita Manterola (marga-9) wrote :

Indeed, nothing the galternatives package is supposed to do is working.
  There's a combo box that says "Manual"/"Auto", changing it gets immediately reverted.
  There are radio buttons, clicking on them gets immediately reverted
  There are add and delete buttons, none of them do anything

This basically renders the package completely useless. I think it should either be fixed or removed from trusty. As it is, it leads users to think that there's something useful in that program, when there's not.

Revision history for this message
Margarita Manterola (marga-9) wrote :

The problem is that update-alternatives is located in /usr/bin/update-alternatives but the code of galternatives has the path hardcoded at /usr/sbin/update-alternatives.

Revision history for this message
Glen Shrubsall (stinkeye) wrote :

Yes, Saucy has a link to /usr/bin/update-alternatives
I created the same in Trusty and now works.
sudo ln -s /usr/bin/update-alternatives /usr/sbin/

Revision history for this message
NoOp (glgxg) wrote : Re: [Bug 1309709] Re: galternatives cannot add or choose alternatives

On 05/26/2014 08:41 AM, Glen Shrubsall wrote:
> Yes, Saucy has a link to /usr/bin/update-alternatives
> I created the same in Trusty and now works.
> sudo ln -s /usr/bin/update-alternatives /usr/sbin/

Thanks! Works for me.

Revision history for this message
Margarita Manterola (marga-9) wrote :

Reported it to debian in, submitting a patch there to fix the issue.

Changed in galternatives (Debian):
status: Unknown → Fix Committed
Revision history for this message
Margarita Manterola (marga-9) wrote :

As the bot says, a new galternatives has been uploaded to Debian. It includes quite a bunch of fixes, not all of which might justify uploading to Trusty, but definitely the one that makes the program do something again.

Changed in galternatives (Debian):
status: Fix Committed → Fix Released
Revision history for this message
NoOp (glgxg) wrote :

Please do upload to Trusty. The comment #6 symlink workaround gets overwritten (I do not know from where or how) and needs to be added again before galternatives is useful. Trusty is LTS and if the issue isn't fixed, then you might as well remove from Trusty completely.

Revision history for this message
Rohan "HEXcube" Villoth (hexcube) wrote :

The fixed version from Debian has made it into Utopic and Vivid, but still not backported or updated in Trusty. Trusty's galternatives backport/update requires immediate attention.

Revision history for this message
Hamid Pourgholi (hamid-pourgholi) wrote :

Installed galternative today. Doesn't work.

Using kernel:
4.3.0-040300-generic #201511020949 SMP Mon Nov 2 14:50:44 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Margarita Manterola 's :

sudo ln -s /usr/bin/update-alternatives /usr/sbin/

helped me, Ubuntu : 14.4.03 LTS

Revision history for this message
Rohan "HEXcube" Villoth (hexcube) wrote :

The bugfixed galternatives version 0.13.5+nmu3 is in upstream Debian and synced into Ubuntu 14.10 and up (See ). Since galternatives 0.13.5+nmu2ubuntu1 - the one in ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐Ÿ๐Ÿ’.๐ŸŽ๐Ÿ’๐‹๐“๐’ ๐‘ป๐’“๐’–๐’”๐’•๐’š ๐‘ป๐’‚๐’‰๐’“'s repo is non-functional and 0.13.5+nmu3 seems to be backward compatible, I think this qualifies for a backport through Stable Release Updates ( ). So, I request galternatives package be included in Trusty SRU.

Yangfl (mmyangfl)
Changed in galternatives (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.