Detect Vivaldi based on binary name
ClosedPublic

Authored by broulik on Apr 16 2020, 9:25 PM.

Details

Summary

Vivaldi no longer includes its name in the User Agent, see [1].
Try detecting it based on binary name instead.
This could perhaps also be used to detect other chromium-based browsers such as Brave.

[1] https://vivaldi.com/blog/user-agent-changes/

Test Plan

Should be good for 5.18 - coreaddons should have been an implicit dependency anyway?

  • MPRIS identifies it as Vivaldi again.
  • Its icon doesn't show up and I have no idea where the "vivadi" icon file it specifies in its desktop file is located

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Apr 16 2020, 9:25 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 16 2020, 9:25 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Apr 16 2020, 9:25 PM
broulik edited the summary of this revision. (Show Details)
fvogt accepted this revision.Apr 17 2020, 6:33 AM

Tested, works. I didn't even notice that it broke...

Will probably have to be refactored later to look at environmentDescriptions or environmentNames though.

Should be good for 5.18 - coreaddons should have been an implicit dependency anyway?

Yup.

Its icon doesn't show up and I have no idea where the "vivadi" icon file it specifies in its desktop file is located

Here it used xdg-icon-resource install ... to install the icon in an rpm %post script, so I've got /usr/share/icons/hicolor/*x*/apps/vivaldi.png as usual.

This revision is now accepted and ready to land.Apr 17 2020, 6:33 AM
This revision was automatically updated to reflect the committed changes.