Here's an updated and comprehensive guide on how to enable swipe gestures for browser history navigation in Google Chrome and Mozilla Firefox on Linux, focusing on systems that use the Wayland display server. This guide now includes specific instructions for setting Chrome to run on Wayland using the chrome://flags
method.
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:
- Open Google Chrome.
- Type
chrome://flags
in the address bar and press Enter to open the experimental features page. - Use the search bar to look for "Preferred Ozone platform".
- Find the flag and select "Wayland" from the dropdown menu.
- 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
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.
Comments