LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Display default mail app (https://www.linuxquestions.org/questions/linux-desktop-74/display-default-mail-app-4175483639/)

PeteRay 11-06-2013 03:25 PM

Display default mail app
 
From a terminal command line, how do I display the default mail agent? I know how to set it, I want to know how to display it.

Thanks
Peter

frankbell 11-06-2013 08:02 PM

Do you mean to start the program or find out what the default mail application is?

The name of the program's executable binary should run it from the command line (For Debian's Icedove, for example, that's icedove, all lower case). If it's the latter, it would help to know what desktop environment you are using. Different desktops have different conventions for storing items such as file associations and the like.

PeteRay 11-07-2013 09:59 AM

Hi Frank,

Thanks for replying.

I'm running Debian 7 with Gnome classic or Xfce, and LinuxMint Olivia with Cinnamon. I don't need to run the mailer, what I need is a command that identifies the default mailer to a bash shell script. Thunderbird is the default on LinuxMint. I wasn't impressed so I switched to Evolution. Now both binaries are on the system, so $(which evolution) and $(which thunderbird) both return results. .thunderbird and .evolution directories both exist in my home directory, sop testing for one or the other won't work. Do you have a suggestion?

Peter

PeteRay 11-09-2013 03:56 PM

Found something. On a LinuxMint machine, under System Settings, I changed the default browser, exited, then ran "find ~ -mmin -1 -type f", which showed me the 2 files that had been modified in the past minute. ~/.local/share/applications/mimeapps.list was a hit, it shows several default apps including the mailer. I can run "grep mailto .local/share/applications/mimeapps.list" to display the default mailer, or "grep http .local/share/applications/mimeapps.list" for the default browser, etc. It works on the Debian box too. I'll use it until it breaks.

Peter


All times are GMT -5. The time now is 11:15 PM.