Enable Pinch to Zoom in Microsoft Edge on Ubuntu Linux

I wrote a post about enabling pinch to zoom in Chrome, Chromium, and Brave on Ubuntu. But that method does not work for Microsoft Edge. The particular flag that you need to set is not available in Edge.

But there is another way.

Edge needs to be launched with the following arguments -

--enable-features=UseOzonePlatform --ozone-platform=wayland

But I don’t want to launch Edge from the command line every time. I want to be able to launch it from the desktop icon or the application menu.

The file that configures the desktop icon is located at /usr/share/applications/microsoft-edge.desktop. It points to some symbolic links that end up at a script located at /opt/microsoft/msedge/microsoft-edge.

This file can be edited, but you must be root to do so.

Use whatever editor you like, and replace the last line with -

exec -a "$0" "$HERE/msedge" --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"

Now, when you launch Edge from the desktop icon or application menu, it will launch with the correct arguments to enable pinch to zoom.

Note, when Edge is updated, the update will overwrite the file you edited. You will need to reapply the changes.

comments powered by Disqus

Related