Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having problems with some programs when using overlay-scrollbars, mainly Code::Blocks and Eclipse.

I've found several ways of disabling the overlay scrollbars completely, for all applications, but I like them and I don't want to do this.

Is there a way to blacklist only this applications from using the new scrollbars?

share|improve this question

I am going to answer my own question. Thanks to the user "SevenMachines" in ubuntuforums, I've found a way to disable overlay scrollbars for a specific application. I did a shell script with the following (for eclipse, for example):


Then, make it executable, and using the "Menu editor", changed eclipse to point to the script.

share|improve this answer
I can confirm this works and is awesome! – Joe Simpson Apr 29 '11 at 14:15
Worked beautifully for me too. Kind of annoying that you have to do it though... – Joakim Berglund Apr 29 '11 at 15:17
+1, precious tip ! – Delete May 3 '11 at 17:28
This is a fantastic solution, thank you! It allowed me to troubleshoot some of the problems I had with overlay scrollbars and Inkscape. – Glutanimate Mar 27 '13 at 2:13

Alternatively, in your .bashrc add the following

alias eclipse="LIBOVERLAY_SCROLLBAR=0 eclipse"

In fact, you may also want to add UBUNTU_MENUPROXY=0 so unity menus work properly with eclipse, so that becomes:


[Note: that this will only take effect once you restart your bash shell]

share|improve this answer

You could edit the .desktop File like this:

cp /usr/share/applications/eclipse.desktop ~/.local/share/applications/

...then put...


to the Exec Field that the file looks afterwards like this:

[Desktop Entry]
Comment=Eclipse Integrated Development Environment

I use the unity-launcher-editor to easily change this via a GUI.

share|improve this answer
i think this is a very good solution to the problem as it leaves the installation of eclipse untouched and doesn't require you to write additional scripts and stuff... thx! – xmoex May 1 '12 at 8:20

/usr/bin/eclipse is a start script by itself. You can edit this in a text editor and add the following lines (the same as mentioned in other answers), below the line GDK_NATIVE_WINDOWS=true.

share|improve this answer

A more generic alternative to the above answers would be this simple script that I called "regular-scrollbars":


Save that someplace on your path, and then you can use the menu editor to add "regular-scrollbars" before any command you want (as long as it only has one argument - try "$@" if you think you'll need more than one).

This means you won't have to make a new script for any other programs you want to revert to the old scrollbars.

I really like the bashrc alias example too though, you could probably make it more generic by providing a list of programs you want to revert and having bashrc loop over them, adding the aliases.

share|improve this answer

I have got the following working in Ubuntu 14.04 with Eclipse Mars 4.5.2, thanks to

$ more ~/.local/share/applications/eclipse.desktop
[Desktop Entry]
Comment=Eclipse Integrated Development Environment
Exec=env LIBOVERLAY_SCROLLBAR=0 SWT_GTK3=0 /opt/eclipse/eclipse
share|improve this answer

For the specific issue of overlay scrollbars in Eclipse, I was able to get them working properly by following the instructions in this blog post and a related Ubuntu question.

You edit the eclipse launch script.

sudo gedit /usr/bin/eclipse

And comment out an environment variable that is working around some old bugs that are supposedly now fixed.


The next time I launched Eclipse, the scroll bars worked.

share|improve this answer
Don't do that! Editing files under /usr/bin/ is bad as they're solely managed by dpkg. They will be overwritten without any noticed upon the next (security) update of the package they belong to. – Axel Beckert 2 days ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.