Chromium: disable left swipe back navigation on RPi running in kiosk mode with Chromium?
Asked Answered
F

1

6

I have a RPi 4 running in kiosk mode with a 7inch display which opens up Chromium at boot with the following parameters (which disable pinch zooming and info-bar):

chromium-browser --noerrdialogs --disable-infobars --kiosk --incognito --disable-pinch http://localhost

I am attempting to remove the back swipe navigation although I haven't been successful, here's the parameters I have passed with their respective sources:

chromium-browser --noerrdialogs --disable-infobars --kiosk --incognito --disable-pinch --disable-features="TouchpadOverscrollHistoryNavigation"

(found here)

chromium-browser --noerrdialogs --disable-infobars --kiosk --incognito --disable-pinch --overscroll-history-navigation=0 

(also found here)

chromium-browser --noerrdialogs --disable-infobars --kiosk --incognito --disable-pinch --back-gesture-horizontal-threshold=10000

(found here) This last one was more an attempt to set the horizontal swipe to a ridiculous amount of pixels to prevent triggering the back navigation, but obviously it did not work.

I have also tried navigating to chrome://flags/#overscroll-history-navigation and disabling it from there although in a new instance of Chromium this doesn't have any effect.

Is there a way to achieve this? Thanks in advance

Ferde answered 14/5, 2021 at 17:8 Comment(0)
R
4

Well, I started a bounty to maybe solve this problem. However, I just found the solution right after this.

I also can confirm all chromium flags and command line switch don't work.

But I just found this solution:

https://mcmap.net/q/558120/-disable-chrome-two-fingers-back-forward-swipe

Add the following CSS:

html, body {
  overscroll-behavior-x: none;
}
Rustin answered 8/7, 2021 at 10:5 Comment(2)
Where do you put that CSS if you just show an immutable webpage in kiosk mode?Brophy
You could try an userscript or a custom css extension. Maybe find a solution here: superuser.com/questions/52967/…Rustin

© 2022 - 2024 — McMap. All rights reserved.