I'm glad the outside overlay scrollbars are finally gone.
But the scrollbar is still a razor thin line that becomes a less razor thin scrollbar, but still thin scrollbar, when the mouse hovers.
How can I get a normal scrollbar? I.e., like in other OSes, like in Firefox, a scrollbar that doesn't change depending on what the mouse points to, and with a nice width.
I already tried
gsettings set com.canonical.desktop.interface scrollbar-mode normal
but no luck.
I think you should be cautious there. Many of us will NOT recommend you edit the system-wide defaults for a theme, unless you really do intend to interfere with the activity of all user accounts in the system. If you happen to make an error while doing that, then it affects all user accounts. Another point of caution is that when packages are updated, your changes will be erased.
Another shortcoming of this strategy is that it only changes the behavior of one GTK theme, but you might want to change the scrollbar size in ALL GTK-3.0 themes.
Instead, edit configuration files inside a user account. The trick is to figure out which one is the shortest distance to the desired endpoint. The GTK file you edit is part of a CSS (Cascading Style Sheets) setup, so the customization you put in your account will modify the settings.
In your user account, in the folder ~/.config/gtk-3.0/gtk.css I currently have this in a file called "gtk.css"
If you play around with this a little bit, you'll find it is possible to integrate many specific changes from the theme file you were editing above. At one time I tried very hard to fiddle lots of settings, but I'm in the "keep it simple" mode now.
If you really do want to edit a lot of settings, the right thing to do is to COPY the whole gtk-widgets.css file and put it in your ~/.config/gtk-3.0 folder. Then go to town fiddling with settings.
In the same folder, I have a file named "settings.ini"
This prevents a click in the scrollbar from moving to a certain point in the file, instead it advances just one screen. I prefer that!
The other thing worth knowing is that changing that theme file (either as previously recommended by @Dorian or by a user account change for all GTK-3.0 based themes as I suggest) only changes programs that are based on the GTK-3.0 toolkit. It does not change the scrollbar for all applications. It is only for the ones that read that gtk-3.0 config file. Since you are editing a gtk-3.0 theme, apps written with QT or gtk-2.0 will not change. Hence, changing the scrollbar size of all programs is rather more difficult/tedious than you might expect.
I have changed the scrollbar width in gtk-2.0 as well. This is done in a separate folder ~/.config/gtk-2.0. The file to create is named gtkrc
Note that gtk-2.0 is a differently designed setup so the syntax is different, you can't just copy the gtk-3.0 css into the gtk-2.0 folder.
I have noticed that some applications behave badly when you make the scrollbar different because the size of the "grabber" inside the slider trough is not resized correctly. I suspect the scrollbar-dragging changes in @Dorian's file would help with that. I may come back and try that. I'll let you know.
Summary: The key "old time Linux system administrator advice is" DON'T edit config files on a system-wide basis. You are putting your system at risk, your changes won't last across revisions, and it requires root access, which is never good for cosmetic things like this. Find a way to make changes in your user account.
PS. If you really you want to fiddle around with system files (sometimes I do if I really want to insist all users have my favorite football team colors as their wallpaper and color scheme :) ), the first thing you should do is make a copy of the original file and name the original "gtk-widgets.css.orig". Then when you edit your file, save a copy of your edit as "gtk-widgets.css.20160919", where I have the YYYYMMDD date on the end of it. This way, when the deb package is updated, you'll have a copy of your edited file. The one you edit named gtk-widgets.css will be obliterated by package installation.
Edit this file /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
Look for this line (around line 1200): -GtkRange-slider-width: 10;
And change 10 to a bigger number like 20 or 30, and done :)
I also think they're too small...
See this image:
If you change the scrollbar size to 16 and you want them to stay that way, and not shrink when you don't have the mouse on it, then make the changes in the picture above.
If you use a size other than 16, just experiment with the margin sizes to get it right.
Changing
-GtkRange-slider-width
has no effect on the default GTK+3 theme. Instead, you can do this:(Place the above in
~/.config/gtk-3.0/gtk.css
.)Here are the steps to restore the scrollbars which don't disappear and have permanent width, i.e. "classic" ones. Tested in GNOME Flashback session in Ubuntu 16.04 (works in Unity, too).
Step 1. Make a backup of
/etc/environment
. Runsudo nano /etc/environment
and add there the next line:This will prevent scrollbar's autohide behavior.
Step 2. In order to avoid tampering with the main theme file
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
we'll borrow some code from there, alter it and put it into user profile folder. Create~/.config/gtk-3.0/gtk.css
and put the next lines into it:Step 3. Create
~/.config/gtk-3.0/settings.ini
and add the next lines into it:This will restore page-by-page scrolling behavior when you click the scrollbar on the either side of the slider. If this file already exists, just add the last line in the
[Settings]
section of it.Step 4. Uninstall
overlay-scrollbar
andoverlay-scrollbar-gtk2
packages - you won't need them anymore.P.S. If you use some applications which need superuser rights (i.e. Synaptic, Gedit etc.) then you should also place these
gtk.css
andsettings.ini
files into the root's profile folder:P.P.S. If you find that these scrollbars are too narrow for you, make them broader. Just add the next line to your
~/.config/gtk-3.0/gtk.css
:Increase the width as you see fit (the default is 10). Update
/root/.config/gtk-3.0/gtk.css
also, if needed.I'm using Ubuntu 18.04 and this was the only solution that changed the scrollbar for EVERYTHING, from Firefox to LibreOffice to gnome-terminal. The solutions above worked fine for one or two applications but not for everything.
Note: this gives you REALLY big scrollbars which are good for large monitors because you can see them out of the corner of your eye without looking all the way over to the side of the screen every time you want to grab one. If you want smaller ones, change all the 70px's to a smaller number like 20px or 30px and tweak accordingly.
Put the following text into
~/.config/gtk-3.0/gtk.css
:On Ubuntu 20.04 I have merged some of above solutions in order to just get thicker scrollbar on Libre Office, and not tampering with it's color.
This is the code I've merged from above answers: