我在 Ubuntu 20.04 上安装了 Gnome 日历。当我转到设置下的默认应用程序时,我无法将 Gnome 日历设置为默认应用程序。文本编辑器是我唯一可以选择的选项。有什么方法可以将 Gnome 日历设为默认日历吗?
此处的解决方案似乎在 Ubuntu 20.04 中已被弃用,不再适用 如何设置 gnome 日历为默认
答案1
gedit /home/yourname/.local/share/applications/mimeapps.list
缩写文件:
[Default Applications]
text/calendar=org.gnome.Calendar.desktop
[Added Associations]
完整文件:
[Default Applications]
application/x-deb=gdebi.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=google-chrome.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
x-scheme-handler/mailto=thunderbird.desktop
message/rfc822=thunderbird.desktop
application/x-extension-eml=thunderbird.desktop
application/x-mimearchive=firefox.desktop
application/x-ms-dos-executable=wine.desktop
application/x-shellscript=gedit.desktop
text/xml=firefox.desktop
application/xhtml_xml=google-chrome.desktop
image/webp=google-chrome.desktop
application/xml=firefox.desktop
application/rss+xml=firefox.desktop
application/rdf+xml=firefox.desktop
image/gif=firefox.desktop
image/jpeg=eog.desktop
image/png=eog.desktop
video/webm=firefox.desktop
application/x-xpinstall=firefox.desktop
x-scheme-handler/enpass=Enpass.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
text/calendar=org.gnome.Calendar.desktop
[Added Associations]
application/x-deb=gdebi.desktop;
x-scheme-handler/https=firefox.desktop;google-chrome.desktop;
x-scheme-handler/ftp=firefox.desktop;google-chrome.desktop;
text/html=firefox.desktop;google-chrome.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
x-scheme-handler/mailto=thunderbird.desktop;
message/rfc822=thunderbird.desktop;
application/x-extension-eml=thunderbird.desktop;
application/x-mimearchive=firefox.desktop;
application/x-ms-dos-executable=ghex.desktop;wine.desktop;
x-content/image-dcf=rhythmbox.desktop;
application/x-executable=ghex.desktop;
application/x-shellscript=gedit.desktop;
application/pdf=libreoffice-draw.desktop;
text/xml=google-chrome.desktop;firefox.desktop;
application/xhtml_xml=google-chrome.desktop;
image/webp=google-chrome.desktop;
application/xml=firefox.desktop;
application/rss+xml=firefox.desktop;
application/rdf+xml=firefox.desktop;
image/gif=firefox.desktop;
image/jpeg=firefox.desktop;eog.desktop;
image/png=firefox.desktop;eog.desktop;
video/webm=firefox.desktop;
application/x-xpinstall=firefox.desktop;
inode/directory=nautilus-folder-handler.desktop;
gio mime text/calendar
答案2
选择。
编辑桌面文件并在其中添加一行 MimeType=whatever。
运行update-desktop-database
或者sudo update-desktop-database
取决于文件是位于用户文件夹还是系统文件夹中。