Pinch zoom in browsers on Ubuntu 20.04 with Wayland

7,278

Solution 1

works on chrome with wayland

google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland

Solution 2

Pinch zoom has now been implemented in Firefox 86.

It is not enabled by default yet, but you can enable it in Firefox by visiting the URI about:config and setting apz.gtk.touchpad_pinch.enabled=true.

Share:
7,278
ghadeezz
Author by

ghadeezz

Updated on September 18, 2022

Comments

  • ghadeezz
    ghadeezz over 1 year

    Many forum posts say to hold 'ctrl' when pinching, but that doesn't do anything for me on any browser (tried firefox and chrome). Fun thing is that pinch zoom works on PDF files in the default viewer (on both wayland and xorg), also on images in the GNOME default viewer.

    I've tried the whole libinput-gestures thing but it's not what I'm looking for, it lets me map 'ctrl' + '+' to the pinch gesture, which just increases the scale of the pages instead of doing this clean zoom on a particular part of the page, not throwing the layout off. I've seen posts of people saying that it should work on chrome by default, but I've had no luck with this.

    On firefox I installed this extension and pinch zooming still doesn't work, only the 'shift' scroll alternative. I'd prefer to use chrome though.

    How should I go about trying to enable pinch zoom? I feel like I've tried most of the things I found over several furious googling sessions.

    • Andrea Avesani
      Andrea Avesani almost 4 years
      On Firefox you can try to enter in about:config, agree that you take responsibility for the tweaks, and search "zoom" in the search bar. Then you can switch to "true" the first apz.allow_zooming and restart Firefox. It works on Mac, but it didn't on my PopOs installation (tried on X and Wayland)
  • testing_22
    testing_22 over 2 years
    And how do I enable it...?
  • Anshul Sahni
    Anshul Sahni about 2 years
    Does this work on Ubuntu also, I'm using 20.04 but it doesn't seems to work on this