0sama's Website!

GNU/Linux

How To Enable Kinetic Scrolling In Chrome And Firefox.

Kinetic Scrolling is enabled by default on Xrog Firefox but not on Chrome. I have only tried Chrome's Kinetic scrolling on Wayland, so I dont know if it works on Xorg.

Firefox

For Xorg

  1. Open Firefox and type following in the url:

    about:config

  2. Search

    apz. gtk. kinetic_scroll. enabled

  3. enable/disable it.

For Wayland

  1. Open terminal and type:

    MOZ_ENABLE_WAYLAND=1 firefox

  2. Scroll some random pages you will realize that it has been enabled.

  3. To automatically set it open " bash.profile " and paste the following code:

    
    if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
        export MOZ_ENABLE_WAYLAND=1
    fi
    [[ -f ~/.bashrc ]] && . ~/.bashrc
                                
  4. Save and restart!

You can also use 2 fingure swipe to go forward and backwards.

Chrome And Its Derivatives

For Wayland Only(I have not used chrome on Xorg)

Steps Are Almost The Same As Firefox.

  1. Open terminal and type:

    chromium --ozone-platform-hint=auto

  2. Just replace chromium to any other chrome derivative browser e.g:

    brave --ozone-platform-hint=auto

  3. To automatically set it go to " /home/$User/.config " and look for "chromium-flags.conf" file.

  4. If you cant find it then simply create a new file by its name. The name will change according to the application e.g "brave-flags.conf"

  5. Paste the following code inside it:

    
    # This line will be ignored.
    --ozone-platform-hint=auto
                                
  6. Save and restart!

To Enable 2 Fingure Gesture

Just add the following into the previously mentioned flag:


--enable-features=TouchpadOverscrollHistoryNavigation
                        

PWA's And Web Applications.

If you have installed a PWA from chrominum then when you will click on its icon the wayland support wont turn on. To fix that follow the steps below:

  1. go to " /home/$User/.local/share/applications/ " and look for anything that starts with chromium/brave/chrome etc

  2. These files will have random names like "brave-jdklklfpinionkgpmghaghehojplfjio-Default.desktop" These are those individual PWA's

  3. Open every single one of them through a text editor.

  4. In the "Exec=" part you will notice the name of the program is written alown with some flags. We only need to add the previous flag in it.

  5. Copy Paste and thats it! Here is how it will look:

    Exec=/usr/lib/brave-bin/brave --ozone-platform-hint=auto --profile-directory=Default --app-id=jdklklfpinionkgpmghaghehojplfjio

Troubleshooting

Only For Brave Or Anyother whose run script is avaiable.

If chrome doesnt read that confi file then you may have to go to

  1. "/usr/bin"

    and search for

    brave or chrominum
  2. Paste the following inside the file after the definition of XDG_CONFIG_HOME:

    
    # Allow users to override command-line options
    USER_FLAGS_FILE="$XDG_CONFIG_HOME/brave-flags.conf"
    if [[ -f $USER_FLAGS_FILE ]]; then
       USER_FLAGS="$(cat $USER_FLAGS_FILE | sed 's/#.*//')"
    fi
                            
  3. Replace "brave" to your desired browser.

  4. Save , quit and restart!

Still Doesnt Work?

This Might Help You Out!