A workaround for mutt users

UPDATE: On my debian system, I configured it by putting mutt.desktop in ~/.local/share/applications. Just use find to copy mutt.desktop from your system. Create direcotories if they aren't there.

$ mkdir -p ~/.local/share/applications
$ find / -name mutt.desktop -exec cp {} ~/.local/share/applications/ \;

Edit mutt.desktop and add your terminal executable path there. On my machine, it looks like this.

$ cat ~/.local/share/applications/mutt.desktop
[Desktop Entry]
Comment=Simple text-based Mail User Agent
Comment[de]=Einfaches, Text-basiertes Mailprogramm
Exec=urxvtc -e mutt 

Now run xdg-utils's xdg-settings.

$ xdg-settings set default-url-scheme-handler mailto mutt.desktop

Now go to bottom of this web page and click on mail button there. If it opens mutt in a new terminal, voila. If not, read the full post, I hope it will help you.

I don't use some heavy desktop managers like gnome, kde. I prefer minimalistic setup with DWM windows manager. So I have to manage many things manualy. Today I came with a solution to those who have problems using terminal based mail client mutt or something like that. But they can't open it from some browser or terminal app.

There are lots of guides which were not working for most users. So here is how I made it work. Just create a script in /usr/bin and name it mailto. In this script type this.

# vim /usr/bin/mailto 


$TERMINAL -e mutt "$@" 


You may use your terminal name like urxvt or whatever you use if $TERMINAL variable isn't set.

Install xdg-utils if you don't have already installed. It will install a tool, xdg-email. Open and edit it as root. In the end you will see a function 'detectDE' in this xdg-email script. Just remove that whole function and type mailto there.

# vim /usr/bin/xdg-email


if [ x"$DE" = x"" ]; then
    # if BROWSER variable is not set, check some well known browsers instead
    if [ x"$BROWSER" = x"" ]; then



That's it. Now open xdg-email someone@abdullah.today in terminal and it will open a mutt window. Enjoy.