Hi,
I’m a developer at Mozilla working on Firefox Desktop.
I’m on a team that has been making various improvements to our migration wizard, which is the tool for migrating data (bookmarks, history, logins, etc) from other browsers into Firefox.
One thing we’ve been looking at recently, is ways that we can improve the experience when Firefox is installed as a Snap. Currently, when Firefox is installed as a Snap, the application sandbox prevents us from reading other browser data directories (for example, the Chromium profile data directory) to get the list of profiles as well as the resources that those profiles might have to migrate.
We faced a similar hurdle with Safari after Apple shipped macOS 10.14 - Firefox was prevented by the operating system from reading the contents of the Safari data folder when the user had initiated a migration. Our solution on that platform was to open a native file picker in folder-selection mode and to gave instructions to the user to have them select the “Safari” folder from that file picker. Doing so gives Firefox read permissions on the directory to import the contents. It’s somewhat awkward, but it ultimately works, and our data suggests that a sufficient set of users are able to complete that flow.
We’re hoping to do something similar for the Snap package issue. We can detect when Firefox is installed as a Snap, and we can detect the existence of the Chromium data folder, and (in theory) we can show the user a folder picker that allows them to select that folder, and grant Firefox access to it using the XDG Desktop Portal mechanism.
We’re having some difficulty making this experience smooth, and we were wondering if any of you had any advice or suggestions on how we could do so. Specifically:
-
In Ubuntu 20.04, it appears that the default version of xdg-desktop-portal doesn’t support folder selection. It looks like this is, however, supported in 22.04. Can I presume that as 20.04 is a LTS that there’s little likelihood of folder selection support being backported to that series?
-
Ideally, we could open the file picker at the parent folder of the Chromium data folder, and instruct the user to select the data folder and choose “Open”. Unfortunately, it seems that we cannot initialize the file picker at that particular location. Is there anyway around that limitation? Failing that, are there any keyboard shortcuts that users can use to quickly hop to a particular path in a native file picker? (macOS, for example, has Cmd-Shift-G for such a purpose).
Alongside those questions, if any of you have any other suggestions on how we can make it as smooth as possible for users to grant us access to the Chromium profile data, we’d love to hear it.
Thanks for reading this wall of text! All the best,
-mconley