Enabling Swipe Gestures in Chrome and Firefox on Linux with Wayland

Swipe gestures provide a convenient and intuitive way to navigate through web browsing history. Let’s explore how to enable these gestures in Google Chrome and Mozilla Firefox when running on Linux with the Wayland display server.

Google Chrome

Step 1: Ensure Chrome is Running on Wayland

To use gesture navigation effectively in Chrome, ensure it’s running on Wayland.

  • Enable Wayland through Chrome Flags:

    1. Open Google Chrome.
    2. Type chrome://flags in the address bar and press Enter to open the experimental features page.
    3. Use the search bar to look for “Preferred Ozone platform”.
    4. Find the flag and select “Wayland” from the dropdown menu.
    5. Click the “Relaunch” button at the bottom of the page to restart Chrome with the new settings.
  • Verify Wayland Usage:
    After Chrome restarts, check chrome://gpu to see if “Native GpuMemoryBuffers” are being used, indicating Wayland support.

Step 2: Enable Touchpad Overscroll History Navigation

Activate gesture navigation in Chrome:

  • Append the feature flag for gesture navigation when starting Chrome:

    google-chrome --enable-features=TouchpadOverscrollHistoryNavigation
    
  • Alternatively, you can modify your Chrome shortcut or desktop entry to include this flag permanently.

Mozilla Firefox (Version 106+)

Step 1: Enable Wayland Support

Firefox now supports touchpad gestures natively on Linux starting from version 106, provided it’s running on Wayland.

  • Set the Environment Variable:

    • For a single user, append the following to your .profile:
      echo "export MOZ_ENABLE_WAYLAND=1" >> ~/.profile
      
    • Or modify the Firefox desktop entry:
      cp /usr/share/applications/firefox.desktop ~/.local/share/applications/
      nano ~/.local/share/applications/firefox.desktop
      
      Change the Exec= line to include the Wayland environment variable:
      Exec=env MOZ_ENABLE_WAYLAND=1 firefox %u
      
  • Restart Firefox using the modified launcher or after logging out and back in.

Step 2: Using Gesture Navigation

From Firefox version 106 onwards, horizontal swipes with two or three fingers allow you to navigate back and forward in your browsing history. Test the gestures to ensure they are working as expected.

Conclusion

Setting up Chrome and Firefox for Wayland and enabling gesture navigation enhances your browsing experience by providing quick and intuitive history navigation. This guide ensures you can take full advantage of the capabilities of modern browsers on a modern Linux setup.



Copyright © 2013-present Magesystem.net All rights reserved.