Home Command line utilities Configure Touchpad Settings Using gsettings Commandline Utility
Configure Touchpad Settings Using gsettings Commandline Utility In Linux

Configure Touchpad Settings Using gsettings Commandline Utility

By sk
1506 Views

The gsettings is a command line interface to GSettings which allows us to get, set or monitor an individual key for changes on GNOME desktops. We already looked at how to disable Touchpad when an external Mouse is connected and how to disable Touchpad when typing using gsettings command. From these attached links, refer Method 2 to disable Touchpad when a mouse is connected or when you start typing something on the Keyboard. Well, we can also do a few other things using gsettings, such as;

  • Enable/disable natural scroll,
  • Enable/disable two finger scrolling,
  • Enable/disable tap-to-click feature,
  • Enable/disable two finger scrolling,
  • Configure mouse for left or right hand (Default is left-handed),
  • Configure Touchpad speed,
  • Enable/disable tap and drag feature,
  • Enable/disable edge scrolling feature etc.

This guide has been tested on Ubuntu 18.04 LTS desktop. The steps provided may also work on any Linux distribution with Gnome desktop environment.

Viewing current settings of Touchpad

You can view all current settings related to Touchpad using command:

$ gsettings list-recursively org.gnome.desktop.peripherals.touchpad

Sample output:

org.gnome.desktop.peripherals.touchpad send-events 'disabled-on-external-mouse'
org.gnome.desktop.peripherals.touchpad natural-scroll true
org.gnome.desktop.peripherals.touchpad tap-to-click true
org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled false
org.gnome.desktop.peripherals.touchpad left-handed 'mouse'
org.gnome.desktop.peripherals.touchpad click-method 'fingers'
org.gnome.desktop.peripherals.touchpad speed 0.0
org.gnome.desktop.peripherals.touchpad scroll-method 'two-finger-scrolling'
org.gnome.desktop.peripherals.touchpad tap-and-drag true
org.gnome.desktop.peripherals.touchpad edge-scrolling-enabled true
org.gnome.desktop.peripherals.touchpad disable-while-typing false
Display Touchpad Settings

Display Touchpad Settings

If you want to view the value of a specific setting, use:

$ gsettings get org.gnome.desktop.peripherals.touchpad natural-scroll

This command will display the current setting of Natural scrolling.

Configuring all aforementioned Touchpad settings is very simple. All you have to do is just swap the true/false values to enable or disable the said functions.

Configure Touchpad Settings Using gsettings Command

Let us see how to configure a few touchpad settings using gsettings command in the following examples.

Enable or disable Natural scrolling

For those don't know,  there are two types of scrolling, namely Natural scrolling and Reverse scrolling. Here is the difference between these two types of scrolling.

  • Reverse Scrolling: When we scroll/swipe fingers up on touchpad or trackpad, the scrollbar goes up and content goes down. Like wise when we scroll or swipe fingers down, the scrollbar goes down and the content goes up. I get used to this type scrolling. I guess most users are also get used to reverse scrolling.
  • Natural Scrolling: When we scroll/swipe fingers up on touchpad, the scrollbar goes down and content goes up. When swiping fingers down, the scrollbar goes up and content goes down.

Now, to disable "natural scrolling" feature of the Touchpad, set its value as "false" like below.

$ gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false

To enable the natural-scrolling back, replace "false" with "true" in the above command.

$ gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true

Enable/Disable Tap-to-click feature

To click an item, we simply tap on it. This is the default setting. To double click, we tap twice on touchpad.

If you want to disable tap-to-click feature, simply run:

$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click false

To enable it back, run:

$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true

Enable/Disable two finger scrolling

As you already know, we can scroll up or down using two fingers in the touchpad.

If you want this two-finger scrolling feature disabled, run:

$ gsettings set org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled false

Enable two finger scrolling:

$ gsettings set org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true

Similarly, you can configure all other settings of your Touchpad using gsettings command.

Reset Touchpad settings to default

Just in case, you messed up with your Touchpad and don't remember which is the default value of a particular setting, simply run the following command to reset all Touchpad settings to the defaults:

$ gsettings reset-recursively org.gnome.desktop.peripherals.touchpad

Or,

$ gsettings reset-recursively org.gnome.settings-daemon.peripherals.touchpad

You can also use dconf to reset touchpad settings to default settings like below.

$ dconf reset -f /org/gnome/desktop/peripherals/touchpad/

For more details, refer man pages.

$ man gsettings

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More