Clicked an event invite, got a .ics file, and had no idea what to do with it? Here's the setup that actually works on Ubuntu with the snap version of Firefox.
The Problem
Firefox snap is sandboxed — it can't hand files directly to desktop apps. If you try to associate .ics files with Firefox, you'll end up in a loop of tabs opening endlessly. Ask me how I know.
The fix is a three-part setup: tell Firefox to save .ics files to disk, set GNOME Calendar as the system handler, and point GNOME Calendar at your Google account by default.
Step 1: Stop Firefox Fighting Over .ics Files
Firefox's internal handler for .ics files defaults to "always ask", which causes the loop. Set it to save-to-disk instead.
Close Firefox first, then edit:
~/.mozilla/firefox/<your-profile>/handlers.json
Find the text/calendar entry and change "action":4 to "action":0:
"text/calendar":{"action":0,"extensions":["ics","ifb","ical","icalendar"]}
Also clean up the system mime association so Firefox isn't listed as a handler:
xdg-mime default org.gnome.Calendar.desktop text/calendar
And check ~/.config/mimeapps.list — remove firefox_firefox.desktop from the [Added Associations] line for text/calendar if it's there.
Step 2: Connect Google Calendar to GNOME Calendar
Open Settings → Online Accounts → Google, sign in, and make sure Calendar is toggled on.
Step 3: Set Your Google Calendar as the Default Import Target
By default GNOME Calendar imports to a local "Personal" calendar. To fix that, find your Google Calendar's source UID:
grep -rl "mattsouthgate@gmail.com" ~/.cache/evolution/sources/
You'll get a path like:
~/.cache/evolution/sources/<account-uid>/<calendar-uid>.source
Take that <calendar-uid> and set it as the default:
gsettings set org.gnome.Evolution.DefaultSources default-calendar '<calendar-uid>'
The Workflow
- Click an
.icslink in Firefox — it saves to~/Downloadsautomatically - Open Files → Downloads → click the
.icsfile - GNOME Calendar opens with an import dialog, defaulting to your Google Calendar
- Hit Import
Not quite one-click, but reliable — and no more tab storms.
No comments:
Post a Comment