Where does mate-default-applications-properties keep its info?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
yellowfinch
Level 4
Level 4
Posts: 325
Joined: Tue Aug 30, 2016 1:58 pm

Where does mate-default-applications-properties keep its info?

Post by yellowfinch »

I don’t see anything relevant in dconf.

Now that I’ve uninstalled Thunderbird, I want to make Betterbird the default e-mail app. (In fact, I partly expected that to happen automatically.)

But the field for the default e-mail app is now empty and greyed.

I thought it might be based on the MimeType field in the corresponding .desktop file (which would explain why we often have to log out and log back in after installing an app, in order for its launcher to be detected and added to the mintMenu), but my betterbird.desktop file does contain the same thing as in thunderbird.desktop

Solving this mystery might also help me deal with the Brave browser. As it is, I have to use its own “Set as default” button again after each invocation of mate-default-applications-properties, even if I don’t change anything there, because the default browser setting always reverts to Chromium, which is the only one available according to the GUI.
jcolannino
Level 1
Level 1
Posts: 1
Joined: Wed Nov 15, 2023 5:32 pm

Re: Where does mate-default-applications-properties keep its info?

Post by jcolannino »

Hi,

I've been searching for an answer to this and found it in the source code of the Preferred Applications tool here: https://github.com/mate-desktop/mate-co ... -capplet.c (in the set_changed function on lines 66-178.)

Any call to g_app_info_set_as_default_for_type points to a mime type that you'll want to edit in ~/.config/mimeapps.list, whereas any call to g_settings_set_string points to a dconf setting you'll need to change.

Just peruse the switch-case block to figure out which things you'll need to change for each application.

In my case (changing the browser), I set the following mime-types to `firefox.desktop`, which is found under `/usr/share/applications`:

Code: Select all

x-scheme-handler/http
x-scheme-handler/https
text/html
x-scheme-handler/about
Because of how the dropdowns in the tool get populated, don't try to set the default application graphically or you'll run into the same issue again (I wish the tool would let you set any application you want.)

Also, if a desktop file doesn't exist for the application in question, just create one and then reference it in the above file.
billyswong
Level 8
Level 8
Posts: 2239
Joined: Wed Aug 14, 2019 1:02 am

Re: Where does mate-default-applications-properties keep its info?

Post by billyswong »

I tested installing Betterbird myself (after resolving some Flatpak screw-up in my computer viewtopic.php?t=408099)
Betterbird installed via Flatpak successfully come up in MATE Preferred Application Mail Reader choice in my LM 21.1 computer.

Here is the content of eu.betterbird.Betterbird.desktop

Code: Select all

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=betterbird --file-forwarding eu.betterbird.Betterbird @@u %u @@
Icon=eu.betterbird.Betterbird
Terminal=false
Type=Application
MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall;application/x-extension-ics;
StartupNotify=true
StartupWMClass=betterbird
Categories=Network;Email;
Actions=ComposeMessage;OpenAddressBook;
Name=Betterbird
Name[ast]=Veceru de corréu Betterbird
Name[ca]=Client de correu Betterbird
Name[cs]=Poštovní klient Betterbird
Name[da]=Betterbird - e-post/nyhedsgruppe
Name[de]=Betterbird-E-Mail und -Nachrichten
Name[el]=Ηλεκτρονική αλληλογραφία Betterbird
Name[es_ES]=Cliente de correo Betterbird
Name[es_AR]=Cliente de correo Betterbird
Name[fi]=Betterbird-sähköposti
Name[fr]=Messagerie Betterbird
Name[gl]=Cliente de correo Betterbird
Name[he]=Betterbird דוא״ל/חדשות
Name[hr]=Betterbird e-pošta/novosti
Name[hu]=Betterbird levelezőkliens
Name[it]=Email Betterbird
Name[ja]=Betterbird 電子メールクライアント
Name[ko]=Betterbird
Name[nl]=Betterbird e-mail/nieuws
Name[pl]=Klient poczty Betterbird
Name[pt_BR]=Cliente de E-mail Betterbird
Name[ru]=Почтовый клиент Betterbird
Name[sk]=Betterbird - poštový klient
Name[sv]=E-postklienten Betterbird
Name[uk]=Поштова програма Betterbird
Name[vi]=Trình điện thư Betterbird
Name[zh_CN]=Betterbird 邮件/新闻
Name[zh_TW]=Betterbird 郵件
Comment=Send and receive mail with Betterbird
Comment[ast]=Lleer y escribir corréu electrónicu
Comment[ca]=Llegiu i escriviu correu
Comment[cs]=Čtení a psaní pošty
Comment[da]=Skriv/læs e-post/nyhedsgruppe med Betterbird
Comment[de]=E-Mails und Nachrichten mit Betterbird lesen und schreiben
Comment[el]=Διαβάστε και γράψτε γράμματα με το Betterbird
Comment[es_ES]=Lea y escriba correos y noticias con Betterbird
Comment[es_AR]=Lea y escriba correos y noticias con Betterbird
Comment[fi]=Lue ja kirjoita sähköposteja
Comment[fr]=Lire et écrire des courriels
Comment[gl]=Lea e escriba correo electrónico
Comment[he]=קריאה/כתיבה של דוא״ל/חדשות באמצעות Betterbird
Comment[hr]=Čitajte/šaljite e-poštu s Betterbird
Comment[hu]=Levelek írása és olvasása a Betterbirddel
Comment[it]=Per leggere e scrivere email
Comment[ja]=メールの読み書き
Comment[ko]=Betterbird 메일/뉴스 읽기 및 쓰기 클라이언트
Comment[nl]=E-mail/nieuws lezen en schrijven met Betterbird
Comment[pl]=Czytanie i wysyłanie e-maili
Comment[pt_BR]=Leia e escreva suas mensagens
Comment[ru]=Читайте и пишите письма
Comment[sk]=Čítajte a píšte poštu pomocou programu Betterbird
Comment[sv]=Läs och skriv e-post
Comment[uk]=Читання та написання листів
Comment[vi]=Đọc và soạn thư điện tử
Comment[zh_CN]=阅读邮件或新闻
Comment[zh_TW]=以 Betterbird 讀寫郵件或新聞
GenericName=Mail Client
GenericName[ast]=Client de correu
GenericName[ca]=Client de correu
GenericName[cs]=Poštovní klient
GenericName[da]=E-postklient
GenericName[de]=E-Mail-Anwendung
GenericName[el]=Λογισμικό αλληλογραφίας
GenericName[es_ES]=Cliente de correo
GenericName[es_AR]=Cliente de correo
GenericName[fi]=Sähköpostiohjelma
GenericName[fr]=Client de messagerie
GenericName[gl]=Cliente de correo electrónico
GenericName[he]=לקוח דוא״ל
GenericName[hr]=Klijent e-pošte
GenericName[hu]=Levelezőkliens
GenericName[it]=Client email
GenericName[ja]=電子メールクライアント
GenericName[ko]=메일 클라이언트
GenericName[nl]=E-mailprogramma
GenericName[pl]=Klient poczty
GenericName[pt_BR]=Cliente de E-mail
GenericName[ru]=Почтовый клиент
GenericName[sk]=Poštový klient
GenericName[sv]=E-postklienten
GenericName[uk]=Поштова програма
GenericName[vi]=Phần mềm khách quản lý thư điện tử
GenericName[zh_CN]=邮件新闻客户端
GenericName[zh_TW]=郵件用戶端
Keywords=Email;E-mail;Newsgroup;Feed;RSS
Keywords[ast]=Corréu;Corréu-e;Noticies;Discusiones;Mensaxes;Canales;RSS
Keywords[ca]=Correu;Email;E-mail;Mailing;Llistes;Notícies;RSS
Keywords[cs]=Email;E-mail;Pošta;Elektronická pošta;Diskusní skupiny;Čtečka;RSS
Keywords[da]=Email;E-mail;Epost;E-post;E-brev;Newsgroup;Nyhedsgruppe;Nyhedskilde;Usenet;Feed;RSS
Keywords[de]=Mail;E-Mail;Newsgroup;Nachrichten;Feed;RSS;Post;News;Usenet;online;lesen;schreiben
Keywords[el]=Email;E-mail;Newsgroup;Feed;RSS;ημαιλ;Αλληλογραφία;Ροή;ΡΣΣ;Συζητήσεις;Γράμματα
Keywords[es_ES]=Email;Correo electrónico;Noticias;Discusiones;Mensajes;Canales;RSS
Keywords[es_AR]=Email;Correo electrónico;Noticias;Discusiones;Mensajes;Canales;RSS
Keywords[fi]=Mail;E-Mail;Email;Newsgroup;Feed;RSS;posti;sähköposti;maili;meili;Usenet;uutisryhmät;syöte
Keywords[fr]=Mails;Mels;E-Mails;Emails;Courriels;Courriers;Newsgroup;Feed;RSS;Poster;Betterbird;Lire;Écrire
Keywords[he]=דוא"ל;דוא״ל;מייל;אי-מייל;אימייל;הודעות;מוזילה;תאנדרבירד;ת׳אנדרבירד;ת'אנדרבירד;ת׳אנדרברד;ת'אנדרברד;דואל;
Keywords[hr]=email;e-mail;e-pošta;pošta;RSS
Keywords[hu]=Email;E-mail;Levél;Levelezés;Hírcsoport;Feed;Hírforrás;RSS
Keywords[it]=Email;Mail;Posta;Newsgroup;Feed;RSS
Keywords[ja]=Eメール;イーメール;mail;e-mail;email;メール;電子メール;ニュースグループ;ネットニュース;RSS;フィードリーダー;書く;読む
Keywords[nl]=Email;E-mail;Newsgroup;Feed;RSS;Nieuwsgroep;Post
Keywords[ru]=Email;E-mail;Newsgroup;Feed;RSS;почта;письма;новости;фиды
Keywords[sk]=Email;E-mail;Elektronická pošta;Diskusné skupiny;Čítačka kanálov;RSS
Keywords[uk]=Email;E-mail;Newsgroup;Feed;RSS;пошта;новини;подачі;стрічка
Keywords[vi]=Mail;E-Mail;Email;Newsgroup;Feed;RSS;Thư điện tử;Gửi thư
Keywords[zh_CN]=Mail;E-Mail;Email;Newsgroup;Feed;RSS;电子;邮件;新闻;Betterbird;雷鸟;电邮;邮箱;阅读器;
X-Flatpak=eu.betterbird.Betterbird

[Desktop Action ComposeMessage]
Name=Write new message
Name[ast]=Redactar mensaxe nuevu
Name[ca]=Escriu un missatge nou
Name[cs]=Napsat novou zprávu
Name[da]=Skriv en ny meddelelse
Name[de]=Neue Nachricht verfassen
Name[el]=Σύνταξη νέου μηνύματος
Name[es_AR]=Escribir un nuevo mensaje
Name[es_ES]=Redactar nuevo mensaje
Name[fi]=Kirjoita uusi viesti
Name[fr]=Rédiger un nouveau message
Name[gl]=Escribir unha nova mensaxe
Name[he]=כתיבת הודעה חדשה
Name[hr]=Piši novu poruku
Name[hu]=Új üzenet írása
Name[it]=Scrivi nuovo messaggio
Name[ja]=新しいメッセージを作成する
Name[ko]=새 메시지 작성
Name[nl]=Nieuw bericht aanmaken
Name[pl]=Nowa wiadomość
Name[pt_BR]=Nova mensagem
Name[ru]=Создать новое сообщение
Name[sk]=Nová e-mailová správa
Name[sv]=Skriv ett nytt meddelande
Name[uk]=Написати нового листа
Name[vi]=Viết thư mới
Name[zh_CN]=编写新消息
Name[zh_TW]=寫一封新訊息
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=betterbird eu.betterbird.Betterbird -compose

[Desktop Action OpenAddressBook]
Name=Open address book
Name[ast]=Abrir llibreta de direiciones
Name[ca]=Obre la llibreta d'adreces
Name[cs]=Otevřít Adresář
Name[da]=Åbn adressebog
Name[de]=Adressbuch öffnen
Name[el]=Άνοιγμα ευρετηρίου διευθύνσεων
Name[es_AR]=Abrir libreta de direcciones
Name[es_ES]=Abrir libreta de direcciones
Name[fi]=Avaa osoitekirja
Name[fr]=Ouvrir un carnet d'adresses
Name[gl]=Abrir a axenda de enderezos
Name[he]=פתיחת ספר כתובות
Name[hr]=Otvori adresar
Name[hu]=Címjegyzék megnyitása
Name[it]=Apri rubrica
Name[ja]=アドレス帳を開く
Name[ko]=주소록 열기
Name[nl]=Adresboek openen
Name[pl]=Książka adresowa
Name[pt_BR]=Catálogo de endereços
Name[ru]=Открыть адресную книгу
Name[sk]=Otvoriť adresár
Name[sv]=Öppna adressboken
Name[uk]=Відкрити адресну книгу
Name[vi]=Mở sổ địa chỉ
Name[zh_CN]=打开通讯录
Name[zh_TW]=開啟通訊錄
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=betterbird eu.betterbird.Betterbird -addressbook
billyswong
Level 8
Level 8
Posts: 2239
Joined: Wed Aug 14, 2019 1:02 am

Re: Where does mate-default-applications-properties keep its info?

Post by billyswong »

Try the following command to see if you can get the MIME database in sync with your .desktop files

Code: Select all

update-desktop-database ~/.local/share/applications/
update-mime-database ~/.local/share/mime/
Post Reply

Return to “MATE”