Subject: update-alternatives, list alternatives?

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 10:10:44 -0400

I'm having another headache...

I want to make Icedove the default mail client.
I had this done on the last Jessie system I had (on a now defunct hdd).
But I can't recall how I did it, if it was with update-alternative or 
some other means..
And something that's been bothering me for a while is:
I can't seem to find or figure out how to list all the alternatives I 
can manage with update-alternatives.
I mean, I can get a list for a particular item, like x-www-browser or 
editor, but I want a list of all those possible things to update 
(x-www-browser, editor, etc.)
Is there such a list somewhere?
Thanks,
Tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: The Wanderer <[email-masked]>
Date: Fri, 16 Sep 2016 10:29:28 -0400

> Is there such a list somewhere?

From the man page,

update-alternatives --get-selections

looks like it should do what you want, at least as far as alternative
groups currently present on the system. (Naturally, because any package
can add a new link group - or the administrator can do it manually, if
desired - nothing can provide a list of every possible link group which
could exist.)

I don't see any obvious sign of a generic "mail client" link group
listed there, though.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

---

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 15:10:25 -0400

On 09/16/2016 10:52 AM, The Wanderer wrote:
> (Is there a particular reason you replied to me privately, rather than
> to the mailing list?)
>
>> I should probably mention that I'm using chromium as my browser;
>> getting firefox or iceweasel to use icedove is like falling off a log
>> it's so easy. I had it working on the Jessie on an hdd that just died
>> on me (thankfully not until I'd downloaded and made an install disk
>> to install on the other hdd, which I'm using now.) But in my old age,
>> I can't remember for the life of me how I did it. I don't believe it
>> was with update-alternatives. I think I edited some config file
>> somewhere, but for the life of me, I can't recall where.
>
> A quick bit of Googling finds a discussion of a similar subject from a
> few years back:
>
> http://forums.bodhilinux.com/index.php?/topic/3063-solved-chromium-mailto-link-doesnt-open-on-thunderbird-xdg-email/
>
I haven't the slightest idea where to find
settings panel >default applications >email
As the forum thread doesn't say what settings panel where.
And I can't find anything in chrome://settings that corresponds to mail 
or default applications.
nor is there anything in my systemmenu under settings for default 
applications.
Perhaps the forum user was referring to something in the default wm 
(mate or something?) which I don't use.
I'm using openbox with the fbpanel.

> I'm not sure this is the _only_ way to do it, or necessarily the best,
> but someone did report it worked for them.
>

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Liam O'Toole <[email-masked]>
Date: Fri, 16 Sep 2016 23:19:24 +0100

> I'm using openbox with the fbpanel.

openbox doesn't have a GUI for setting up the association you want.
Instead, go to the file ~/.config/mimeapps.list (creating it if
necessary) and add the following:

[Added Associations]
x-scheme-handler/mailto=icedove.desktop

See the documentation[1] for more details.

1:
https://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.1.html

-- 

Liam

---

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 18:55:58 -0400

> https://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.1.html

I did this, and restarted openbox, and still get a terminal with mutt 
when I click a mailto: in chromium, but thanks for this,
I believe it's how I got it working on my prior jessie installation,
no idea why it isn't working on this one.

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Dutch Ingraham <[email-masked]>
Date: Fri, 16 Sep 2016 18:04:04 -0500

On Fri, Sep 16, 2016 at 06:55:58PM -0400, Tony Baldwin wrote:
> I did this, and restarted openbox, and still get a terminal with mutt when I
> click a mailto: in chromium, but thanks for this,

I actually have that entry under the heading [Default Applications], not [Added
Associations].  You may need to reboot for that file to be re-read.

---

From: Anthony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 16:50:49 -0400

I've tried removing and re-creating the symlinks for mail, Mail and 
mailx in /etc/alternatives an pointing them to icedove, and still when I 
  click on any mailto link, I get a terminal with Mutt.
I don't even have mutt configured on this machine, my mail provider 
seems to not like mutt
I've googled until my eyes bled, etc., etc., but I have yet to find a 
solution to this.
I just want icedove to be the default mua, and to work with chromium 
when I click on a mailto:// link.

Any assistance appreciated.
Thanks,
Tony

-- 
http://www.baldwinlinguas.com
translations, localization,
multilingual web development
EN, ES, FR, PT

---

From: Dutch Ingraham <[email-masked]>
Date: Fri, 16 Sep 2016 16:45:28 -0500

On Fri, Sep 16, 2016 at 04:50:49PM -0400, Anthony Baldwin wrote:
> I just want icedove to be the default mua, and to work with chromium when I
> click on a mailto:// link.

I don't have Icedove handy, but on Thunderbird, I just go to 
edit -> preferences -> advanced, then click "check now" under "System
Integration," then check the box(es) of my choice.  Doesn't Icedove have this
functionality?

---

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 10:56:44 -0400

> I don't see any obvious sign of a generic "mail client" link group

My apologies to the Wanderer, who will now be seeing this twice, as I 
mistakenly replied to him off-list... (keep forgetting to use reply-list)

Indeed:
# update-alternatives --get-selections | grep mail
mailx                          auto     /usr/bin/bsd-mailx

but also:
# update-alternatives --config mailx
There is only one alternative in link group mailx (providing 
/usr/bin/mailx): /usr/bin/bsd-mailx
Nothing to configure.

it seems it won't let me set a mail client

I should probably mention that I'm using chromium as my browser; getting 
firefox or iceweasel to use icedove is like falling off a log it's so easy.
I had it working on the Jessie on an hdd that just died on me 
(thankfully not until I'd downloaded and made an install disk to install 
on the other hdd, which I'm using now.)
But in my old age, I can't remember for the life of me how I did it.
I don't believe it was with update-alternatives.
I think I edited some config file somewhere, but for the life of me, I 
can't recall where.

thanks,
Tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Ric Moore <[email-masked]>
Date: Fri, 16 Sep 2016 18:20:44 -0400

> I think I edited some config file somewhere, but for the life of me, I

Crank up Settings Manager and edit your desires with "Preferred 
Applications". Ric

-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html

---

From: Tony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 18:54:09 -0400

> Crank up Settings Manager and edit your desires with "Preferred

What is this settings manager of which you speak?
I can't seem to locate any such pkg on my system

LLAP
tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Ric Moore <[email-masked]>
Date: Fri, 16 Sep 2016 22:39:10 -0400

> I can't seem to locate any such pkg on my system

Sorry, I later caught that you were using a minimalist DE. XFCE4 or LXDE 
are pretty lightweight and have all the nice bells and whistles you 
could want. Sorry, wish I could better help. Ric

---

From: Anthony Baldwin <[email-masked]>
Date: Fri, 16 Sep 2016 19:09:16 -0400

> I can't seem to locate any such pkg on my system

Interestingly, as can be seen in this screenshot: 
http://tonybaldwin.me/images/091616190007.jpg
Icedove is set to "always check to see if [it] is the default on startup"
and yet, it hasn't checked, asked or pestered me about its status as 
default or not even once, although it appears to be set as default for 
mail (or that option is greyed out.. I can't figure out which, although, 
perhaps greyed out makes sense since update alternatives says there are 
no options for mail, but insists on keeping it as "bsd-mailx).

---

From: Greg Wooledge <[email-masked]>
Date: Fri, 16 Sep 2016 11:47:10 -0400

> it seems it won't let me set a mail client

The other alternative for mailx is heirloom-mailx and I would strongly
recommend that one over bsd-mailx.  heirloom-mailx has lots more
features, including the ability to specify MIME attachment files from
the command line.

In general, if you're wondering how to find out what the alternatives
are for a given virtual package:

$ apt-cache showpkg mailx
...
Reverse Provides: 
mailutils 1:2.99.98-2
heirloom-mailx 12.5-4
bsd-mailx 8.1.2-0.20141216cvs-2

So, three choices.  I only knew about the latter two.

---

From: The Wanderer <[email-masked]>
Date: Fri, 16 Sep 2016 11:03:46 -0400

> mistakenly replied to him off-list... (keep forgetting to use reply-list)

No worries.

> I think I edited some config file somewhere, but for the life of me, I 

Apparently the "correct" way to do this (as opposed to the easiest,
which may be the one I linked you to in private mail but which will
probably break if the relevant package is ever updated) involves
fiddling around with xdg-email or xdg-open or the related suite of commands.

Setting the default programs which those commands will use is apparently
done via 'xdg-mime default', but I don't know what MIME type to tell it
to configure in order to affect handling of mailto: URLs, and none of my
digging so far has turned up anything useful. (There are a few search
results which explain a way to do it assuming you're using the full
GNOME graphical interface, including their settings dialogs, but that's
not exactly a good or a portable solution.)

-- 
   The Wanderer

---

From: Greg Wooledge <[email-masked]>
Date: Fri, 16 Sep 2016 10:13:43 -0400

> Is there such a list somewhere?

ls /etc/alternatives

I don't know if even that is complete.  However, it should be a good
start.