Closed Bug 2027556 Opened 1 month ago Closed 8 days ago

User agent says "X11" while running natively on Wayland on Linux

Categories

(Core :: Widget: Gtk, defect)

Firefox 149
Desktop
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nekohayo, Unassigned)

References

(Blocks 1 open bug)

Details

This is essentially the same bug report as bug #1508041, but it was apparently mistaken closed for being in the wrong component. Yet, the bug still exists.

Steps to reproduce

File a bug report here (and see your user agent string posted to the resulting bug report), or go to about:config.

Actual results

  • "Window Protocol" says: wayland
  • "User Agent" says: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0

Expected results

When the window protocol is Wayland, then "X11" should not be mentioned in the "User Agent" string. Either it should say "wayland", or it should say nothing at all in all situations (like what was mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1508041#c6) because Wayland is the inevitable future of the Linux platform, every major desktop environment is dropping X11 entirely this year.

Blocks: wayland
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Yes, we don't want to add more data to fingerprint.

Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Resolution: --- → WONTFIX

it was apparently mistaken closed for being in the wrong component

It wasn't; it was closed as WONTFIX. If it were incorrectly triaged, it'd have been transferred. I'd mark this as a duplicate of it, else we've the same bug triaged twice.

Flags: needinfo?(stransky)
See Also: → 1508041

Okay, it can be removed if you wish.

Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(stransky)
Resolution: WONTFIX → ---

Would we simply remove the "X11" portion of the User-Agent entirely (both on X11 and Wayland)?

That wouldn't yield additional fingerprinting data, but would also remove the erroneous data from the UA.

s/Would/Can/

IIRC there was a conscious webcompat reason to keep it around.

Flags: needinfo?(cpeterson)

What's Chrome's User-Agent when using Wayland?

Removing X11 or dynamically replacing it with Wayland might break websites that try to detect Unix-like platforms by looking for X11. (Though I don't know of any examples offhand.) I don't think we should risk removing X11 unless it's causing problems or Chrome has removed it from their User-Agent string.

Flags: needinfo?(cpeterson) → needinfo?(nekohayo)

With kwayland-6.6.4-1.fc43, chromium-147.0.7727.101-1.fc43 reports:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36

For comparison, firefox-nightly-152.0a1-20260426084440 reports:

Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0

Note that both contain “Linux”, so “X11” should be redundant for your proposed hypothetical.

Flags: needinfo?(nekohayo)

(In reply to Mr. Beedell, Roke Julian Lockhart (RJLB) [:RokeJulianLockhart] from comment #9)

With kwayland-6.6.4-1.fc43, chromium-147.0.7727.101-1.fc43 reports:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36

Thanks for testing. Since Chrome hasn't removed X11, I don't think we should risk removing X11 unless it's causing problems. The risk far outweighs the benefit, so I will close this bug as WONTFIX for now. Some websites may look for X11 to detect all Unix-like platforms, including non-Linux. A use case might be handling platform differences for keyboard shortcuts.

Status: REOPENED → RESOLVED
Closed: 1 month ago8 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.