Feature Freeze Exception: Seeding the official Firefox snap in Ubuntu Desktop

Hey Gunnar, spellchecking has been discussed there before Desktop: allow access to host hunspell dictionaries - snapd - snapcraft.io , it doesn’t seem to be resolved at the time though and isn’t as easy as granting access to one directory

2 Likes

On my Ubuntu 21.10 some time ago i installed firefox snap and then removed it. Now with the updates i don’t see FF snap reinstalled. Should i reinstall ‘by hand’?
thanks.

The snap will be installed automatically in the following scenarii:

  • installing a fresh 21.10 from a recent ISO
  • dist-upgrading from 21.04

If you dist-upgraded some time ago, the change wasn’t in place yet, so yes, you’ll need to re-install the snap manually (if that’s what you want to use, otherwise the deb remains available and supported).

1 Like

Thanks for the feedback @laney!

Your issue with cursors is very likely https://gitlab.gnome.org/Community/Ubuntu/gnome-sdk/-/issues/6.

For any issue that didn’t fix itself automagically and which you can still reproduce, bug reports are welcome on the upstream tracker (make sure to mention “snap” in the bug title for easier triaging). I’m personally triaging and investigating all of them.

2 Likes

Thanks, in fact on my Ubuntu 21.10 installed from Beta I found FF snap and manually installed FF deb to compare, while on my Ubuntu 21.10 installed from an older ISO i see only FF deb.
Thanks again.

Four years ago… But now maybe the most important desktop application — Firefox — will be provided as a snap, and spellchecking is an important aspect of the typing experience. I can just say: Please give this issue some priority. It would be sad if it would still be present at the 22.04 release.

12 Likes

You’re right Gunnar. Strictly speaking, this is a functional regression, so that’s not looking good.

I filed upstream bug 1732755 to keep track of it. As has already been discussed in the past, there’s no obvious and easy to implement solution, but we’ll work something out. Suggestions welcome.

9 Likes

filed https://bugzilla.mozilla.org/show_bug.cgi?id=1732815 upstream to track the screen sharing issue

1 Like

This spellchecker thing should be a no-go according to me…
Almost everything I write is through my web browser, and I am changing languages several times a day, I really need this feature. Half the Europeans use several languages in their daily life.

8 Likes

this is one of the reasons why the deb will still be around for the next release, so things can be sorted before the LTS …

5 Likes

While we acknowledged the problem and I agree this is not as convenient as using the host’s hunspell dictionaries, please note that you can install spellchecking dictionaries in firefox from about:addons, which works around the problem.

5 Likes

Clicking links in Evince to open them in Firefox does not work:

$ evince
env: ‘/snap/bin/firefox’: Permission denied

see also the Apparmor denial

= AppArmor =
Time: Oct  1 11:37:16
Log: apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/bin/snap" pid=20253 comm="env" requested_mask="x" denied_mask="x" fsuid=1001 ouid=0
File: /usr/bin/snap (exec)
Suggestions:
* adjust snap to ship 'snap'
* adjust program to use relative paths if the snap already ships 'snap'

So it’s rather a problem with the apparmor browser abstraction file (/etc/apparmor.d/abstractions/ubuntu-browsers), but something that needs to be resolved nonetheless.

2 Likes

more likely a missing entry in /etc/apparmor.d/abstractions/evince to allow execution access to /usr/bin/snap … but that will need input and review by the security team i guess …

4 Likes

Hi @ogra and others, I’m globally setting some Firefox preferences by placing files in /usr/lib/firefox/browser/defaults/preferences. The Snap version does not seem to read this directory. How can I set global preferences for the Snap version?

globally writable dirs for snap packages usually live in /var/snap/<snapname>/current or .../common, not sure if firefox currently uses that dir but this is definitely where system wide configs would live in the snap…

I would like to add that not just Google Earth but I noticed that live radar on Accuweather.com and on Weatherbug.com do not work as well. All three Google Earth, weather websites all work just fine in Chromium (which is also snap application).

A little bit off-topic but has to be said: the default “Ubuntu and Free Software links” are missing on the new, snap version of Firefox. I also suggest adding a link to either the Ubuntu homepage or AskUbuntu as a shortcut on the Firefox Home tab.

1 Like

One thing I’m observing when starting from a migrated profile (deb -> snap) is the following:

Certain content types might have a default handling program associated that worked in the past, e.g. snap:// would have been associated the snap store/ubuntu software/gnome software application. Now, in the snap confined world, such direct calls will not work and just silently fail (you get something like “env: ‘snap://app’: No such file or directory” on the console).

In the snap, you should likely always use xdg-open or the portal in general. However, the average user might not discover that they can reset the association in the settings and will be frustrated by the lack of feedback.

I think those content to app associations must be reset on migration (or amended).

@ppd @ogra Could evince just use xdg-open instead of calling firefox directly? Allowing evince to call /usr/bin/snap directly is not great for security, since i.e. a malicious PDF could embed something like snap install evil --devmode and escape the AppArmor sandbox that is setup for evince AIUI

1 Like

that would be a question to the desktop team i guess … i have not looked at the evince deb in a long time (nor at upstream code) note that this apparmor rule is actually from the deb package …