How to Make Scrollbar Always Visible in Ubuntu 18.04

gnome shell

This quick tutorial shows how to make the scrollbars of GTK3 applications always visible, like Gnome terminal does, no matter whether the mouse cursor is moved over or not.

The scrollbar is only visible when the mouse cursor is moved mover in most of GTK3 applications. It will disappear in a few seconds once the cursor’s moved away.

On a per-app basis, you can start application by setting GTK_OVERLAY_SCROLLING=0 environment variable.

For example, open terminal (Ctrl+Alt+T) and run command to launch Gedit text editor:

GTK_OVERLAY_SCROLLING=0 gedit

Advertisements

To apply for all applications for current user, open terminal (Ctrl+Alt+T) and run command to edit .profile file:

gedit ~/.profile

When the files opens in text editor, add following 2 lines in the end and save the file.

export GTK_OVERLAY_SCROLLING=0
gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment '{"GTK_OVERLAY_SCROLLING": "0"}'

To apply changes, simply log out and login back.

To restore the changes, edit .profile file again and remove the previous lines.