Chromium: Stop using custom user agent, work towards generic one

Ubuntu’s Chromium build uses a custom user agent in many ways. It included “Ubuntu” in the .deb versions, and now it includes “snap” in the snap versions. Also, it adds a “Chromium/version” field. This breaks many websites that do aggressive user agent matching, such as Netflix and Microsoft Teams.

(Yes, unfortunately I have to use the latter every now and then, and I do not want to install the proprietary blob app for it.)

Chromium snap’s current user agent is “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/81.0.4044.129 Chrome/81.0.4044.129 Safari/537.36”

While normal Chrome’s current user agent is “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36”

Pretty much every incompatibility-related issue is solved by spoofing the user agent and removing the “snap Chromium/81.0.4044.129” part, simply claiming to be normal Chrome. There is not really any point in differentiating between Chromium and Chrome, but it breaks many websites, and it’s also a nasty feature for browser fingerprinting.

Identifying as Chromium will only annoy users and have them install the proprietary Chrome browser instead, so “Netflix works” and “they can join their meeting”.

In order to work around such issues, Vivaldi has already decided to just use Chrome’s user agent, because otherwise things broke for no obvious reasons:

Moreover, Google has decided to semi-deprecate user agents altogether in upcoming Chrome releases:


So with these upcoming changes in Chrome, can Chromium in Ubuntu please follow suit, and no longer differentiate from whatever string Google will use for Chrome?

1 Like

Cross-linking the corresponding bug report on Launchpad.

That’s an interesting suggestion, thanks for the links.

If I read correctly Google’s proposal, by version 85 the UA string will be frozen. At that point we should remove our patch that adds the Ubuntu/snap token (depending on the packaging format) and we should be good to go.

This needs to be discussed further, thanks for starting the conversation!

2 Likes

@mpt I know you did some research on User Agents in browsers in Ubuntu and fingerprinting in the past, your opinion would be welcome.

More likely Chromium 83. There they want to freeze the version and unify the OS’es. That seems like a good moment to stop carrying that patch to me.

In my opinion it’s not worth it to risk breaking websites in unexplicable ways just to say that we’re a Chromium snap in the UA. As unfortunate as it is, Chrome has become the new IE6, and every website just expects you to use Chrome.

I also firmly oppose that, but if that results in having a bad experience that is hard to understand for novice users, who’ll just think “Linux doesn’t work”, I don’t think we’re on the right track either.

I don’t really have anything to add here. I agree that improving compatibility, and reducing fingerprinting (as described in the linked articles), are both more important than measuring what proportion of Chrom* users are using a Chromium snap.

2 Likes

+1 on this proposal, and I especially agree on the fingerprinting and privacy reasons that have been discussed.

Snapcraft can produce useful metrics about the install base of the snap so I don’t really know why such a specific and identifiable UA would be useful in the first place.

So, seeing that there isn’t really anyone against changing this, here or on Launchpad, I would say that the patch should probably be dropped in the next Chromium release.