146

It looks like Ubuntu 11.04 will come with overlay scrollbars by default. I do like them, but I don't like the current mix of scrollbar types as many applications don't yet use those overlay scrollbars.

Is there a way to disable overlay scrollbars (without removing the overlay-scrollbar package)?

Jorge Castro
  • 73,717
htorque
  • 66,086

12 Answers12

137

In 12.04 LTS there's a slightly cleaner way to do it. Just run

gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false

in a terminal. Apps opened afterwards will have the non-ayatana scrollbar.

To get the default behavior back, run

gsettings reset org.gnome.desktop.interface ubuntu-overlay-scrollbars

If you are using 12.10 or later, run

gsettings set com.canonical.desktop.interface scrollbar-mode normal

And to return to the default, run

gsettings reset com.canonical.desktop.interface scrollbar-mode
iBelieve
  • 5,434
Erigami
  • 4,536
68

You can disable the scrollbars either

htorque
  • 66,086
30

You can remove the scrollbars completely by typing

sudo apt-get remove overlay-scrollbar liboverlay-scrollbar
Oli
  • 299,380
18

Just disabling or removing the overlay-scrollbars as described by the other answers will get you back the scroll bars, but they will be missing the stepper buttons at the end of the bars because they have been disabled in the Ambiance theme. To re-enable them, put the following in the ~/.gtkrc-2.0 file:

style "default" {
  engine "murrine" {
    stepperstyle = 0
  }
}

and the following into the file ~/.config/gtk-3.0/gtk.css:

.scrollbar {
  -GtkScrollbar-has-backward-stepper: 1;
  -GtkScrollbar-has-forward-stepper: 1;
}

Usually, restarting the applications is enough for the changes to apply.

Michael Wild
  • 1,739
5

Simply use utility dconf-editor or gconf-editor. If it is not already present you can install this from Ubuntu Software Center.

This utility is like Windows registry-editor where you can tweak system settings. From entry org > gnome > Desktop > Applications.you find an item named ubuntu-overlay-scrollbars. Toggle the item off, logout/login and you're ready.

Salem
  • 19,864
  • 6
  • 65
  • 90
Marcel
  • 51
4

Maybe you're talking about ayatana scrollbar!

in the case that you want to have the old scrollbar style you only need to use the next command:

sudo apt-get remove overlay-scrollbar liboverlay-scrollbar liboverlay-scrollbar3

enter image description here

Zanna
  • 72,312
Kesymaru
  • 341
4

In Ubuntu 12.04 you can just install Ubuntu Tweak and the option to disable the vertical overlay scrollbar is in Tweaks -> Miscellaneous. You'll need to log-off or reboot for the changes to take effect.

If you want the overlay scrollbar back at some point, you just go and enable it back again in the app. In addition you get a large number of tweaks at your disposition. I'd say this is the easiest way to achieve this.

Gabriel
  • 2,502
3

Try the following:

echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

You'll probably need to log off once.

More information / ideas can be found here.

jokerdino
  • 41,732
Pavlos G.
  • 8,954
3

On 15.10 wily (libgtk-3-0) this worked for me:

export GTK_OVERLAY_SCROLLING=0
1

When you try to uninstall liboverlay-scrollbar doesn't find it! To get rid of the transparent bars was easily fixed. I use leafpad.

Open a terminal :

  1. gksudo leafpad /etc/X11/Xsession.d/99disable-overlay-scrollbars
  2. Put your password in.
  3. Type export LIBOVERLAY_SCROLLBAR=0
  4. Save, Exit and reboot.

No more overlay slidebars or transparent slidebars.

Binarylife
  • 16,662
freebird
  • 386
0

Enabling classic/old style scrollbars

For Ubuntu 14.x there are two ways:

Just use command:

gsettings set com.canonical.desktop.interface scrollbar-mode normal

Or install Unity Tweak Tool.

sudo apt-get install unity-tweak-tool

Go to System > Scrollbars and set to Legacy.

Changing colors and appearance

After one of these two steps, you can further enhance the look of scrollbars if you are using default Ambiance theme. To do this, fire up (if you don't have sublime editor then replace it with whatever editor you are using like nano or gedit).

sudo subl /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css

Press Ctrl+F and type .scrollbar to find style section for scrollbars. Mine looks like below (annotated with /* MODIFIED ... / comments below):

.scrollbar,
.scrollbar.vertical {
    /* MODIFIED: next 3 lines */
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
    -GtkScrollbar-stepper_size = 14;
    -GtkRange-slider-width: 14;
    border-radius: 20px;
    border-image: none;
}

.scrollbar.trough,
.scrollbar.trough.vertical {
    border-color: shade (@bg_color, 0.8);
}

.scrollbar.slider,
.scrollbar.slider:hover,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.slider.vertical:hover,
.scrollbar.button.vertical {
    border-width: 1px;
    border-style: solid;
    border-color: shade (@bg_color, 0.86);
    /* MODIFIED: next 1 line */
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (@dark_bg_color, 1.08)),
                                     color-stop (0.5, @dark_bg_color),
                                     to (shade (@dark_bg_color, 0.94)));
    box-shadow: inset 1px 0 shade (@bg_color, 1.1),
                inset -1px 0 shade (@bg_color, 1.01),
                inset 0 1px shade (@bg_color, 1.1),
                inset 0 -1px shade (@bg_color, 1.1);
}

Final result:

enter image description here

-1

I was able to get rid of the overlay scrollbars using dconf-editor, by setting:

com.canonical.desktop.interface.scrollbar-mode='normal'

(Caveat, not sure about stepper buttons.)

Intuitively, if 'off' is normal, shouldn't it be the default? Someone deemed 'overlay-auto' the default. Just thankful to be rid of this horrifically unhelpful 'feature'. It cost me about two hours to find a solution. Hope to resolve the stepper-buttons issue based on the above information (thank you).