Enable system-wide inverse/reverse/natural scrolling on Ubuntu

1. Get your mouse device id by running the following in a terminal, you have to choose the right one:

xinput list

Take that number you got (just the number after “id=”) and replace “{device id}” with that number in the following command:

xinput list-props {device id} | grep "Scrolling Distance"

In my case:

xinput list-props 6 | grep "Scrolling Distance"

This will output something like below, remember that “Scrolling Distance” is case-sensitive. If nothing is outputted, you’ve chosen a wrong device id, go back to step 1 and choose another one:

Evdev Scrolling Distance (270): 1, 1, 1

So 270 is your property number, 1, 1, 1 is your scrolling distance, remember this to use later.

It is case sensitive unless you use -i in the grep command. Write down the numbers you find in the output from that command (in my case it was the number 1, shown three times and separated by commas). You will use the negative values of the numbers you get in your output. Also, make sure to write down the property number (it will be in parentheses in the output; in my case, it was (270) in Ubuntu and (273) in Fedora).

Note: If you get no output containing the property “Scrolling Distance” this method will not work for you and you will need to stop here and skip to an alternate way.

2. Create a natural scrolling config file by running the following command in your open terminal:

sudo touch /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

3. Now, config the natural scrolling profile by running the following command (you can use your favorite text editor instead of nano but I use nano):

sudo nano /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

In the file you have opened in your preferred text editor, paste the following (but be sure to change the numbers to the same comma-separated numbers you got from step 3; in my case, the number was 1 so in order to make the scroll inverse, I will change 1 to -1):

Section "InputClass"
        Identifier "Natural Scrolling"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Option "VertScrollDelta" "-1"
        Option "HorizScrollDelta" "-1"
        Option "DialDelta" "-1"

Save the file (Ctrl+O) and exit (Ctrl+X) the text editor. No need for a reboot. Just issue the following command (substituting the property number and the negatives of the numbers you got in the third step, and the device id you got from the second step):

xinput set-prop {device id} {property number} -1 -1 -1

In my case:

xinput set-prop 6 270 -1 -1 -1

Refer from:  Ask Ubuntu, UbuntuWiki



How to keep your Ubuntu to work when the lid closed

Open terminal (Ctrl+Alt+T), execute the following command to open UPower config file:

sudo -H gedit /etc/UPower/UPower.conf

Find the line:


Change it to true:


Reset UPower Service by the following command in Terminal:

service upower restart

What I do right after installing Ubuntu

Screen Shot 2017-06-07 at 8.50.40 PM

  1. Install update through “Software Updater”
  2. Minimize on click:
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true
  1. Move launcher to bottom:
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
  1. Install Arc theme:
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list"

sudo apt-get update && sudo apt-get install arc-theme

wget http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key
sudo apt-key add - < Release.key
  1. Install “Super Flat” icon pack:
sudo add-apt-repository ppa:noobslab/icons
sudo apt-get update
sudo apt-get install flat-remix-icons
  1. Install “Unity Tweak Tool”:


sudo apt install unity-tweak-tool
  1. Change icon size to 22 (Setting > Appearance), scale for menu and title bar to 0.875 (Setting > Display)
  2. Install Java:
sudo apt-get install default-jre
  1. Show your name in the Top menu bar:
gsettings set com.canonical.indicator.session show-real-name-on-panel true
  1. Unikey install:
sudo add-apt-repository ppa:ubuntu-vn/ppa

sudo apt-get update

sudo apt-get install ibus-unikey

ibus restart

=> Add ibus-Unikey in "Text Entry" application
  1. Japanese input install:
sudo apt-get install ibus ibus-unikey ibus-anthy

nano ~/.bashrc

After that, add these lines to the end of the file ~/.bashrc: 

export GTK_IM_MODULE=ibus

export XMODIFIERS=@im=ibus

export QT_IM_MODULE=ibus

-> Save ( ctrl-x, y, enter)


Add anthy in "Text Entry" application