Chrome opens mailto: links wrongly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Mint |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Setup:
Linux Mint 13
Linux 3.2.0-31-generic
MATE 1.4.0
Chrome 22.0.1229.79
Thunderbird 15.0
xdg-utils 1.1.0~rc1-2ubuntu6
Observed:
Clicking a mailto: link in Chrome does three things in this order:
(1) Chrome opens a new window with a new New Tab tab;
(2) Firefox opens with a new window containing a single blank tab; and
(3) Thunderbird opens a new Compose window, properly populated from the link.
Of these, of course only (3) is desired. If the action is repeated without first closing Firefox then modify (2) to open only a new tab in the existing window; this tab is identified as attempting to open the mailto: link.
Chrome is set as default browser and Thunderbird as default email client in:
System > Preferences > Preferred Applications
Explanation: The xdg-utils suite of tools does not seem properly to recognize MATE.
Workaround: Patch /usr/bin/xdg-email:
--- /home/xiong/
+++ /home/xiong/
@@ -378,6 +378,7 @@
elif [ x"$KDE_
elif [ x"$GNOME_
elif `dbus-send --print-reply --dest=
+ elif [ x"$MATE_
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
elif [ x"$XDG_
Result: This induces the desired behavior exactly.
Note: Suspect all scripts included in xdg-utils should be similarly patched.
Changed in linuxmint: | |
status: | New → Won't Fix |
I found that if I ran xdg-email from the command line, it would load Chromium instead of Thunderbird. I checked xdg-mime and saw that Thunderbird was my default mail client.
I then looked at the xdg-email script and determined that the script only has code to recognize common desktops like KDE and Gnome. It does this by looking at the environment variables by using the following script. The mail client usage is influenced by what desktop is being used.
detectDE() FULL_SESSION" = x"true" ]; then DE=kde; DESKTOP_ SESSION_ ID" != x"" ]; then DE=gnome; org.freedesktop .DBus /org/freedeskto p/DBus org.freedesktop .DBus.GetNameOw ner string: org.gnome. SessionManager > /dev/null 2>&1` ; then DE=gnome; CURRENT_ DESKTOP" = x"LXDE" ]; then DE=lxde; "x-terminal- emulator -e mutt"
{
if [ x"$MAILER" != x"" ]; then DE=envvar;
elif [ x"$KDE_
elif [ x"$GNOME_
elif `dbus-send --print-reply --dest=
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
elif [ x"$XDG_
elif [ -r ~/.muttrc ] && which mutt > /dev/null 2>&1; then
DE=envvar
MAILER=
else DE=""
fi
DEBUG 2 "DE is \"$DE\""
}
So I did an experiment, I added the following one line to xdg-email. DESKTOP_ SESSION_ ID" != x"" ]; then DE=gnome;
elif [ x"MATE_
First I ran xdg-email with an email address from the command line and Thunderbird was loaded with the address.
Then I tried clicking a link in Chrome and it opened Thunderbird with the address.
I believe a better fix would involve writing a whole procedure just for Mate in the xdg-email instead of pointing it to the gnome procedure.