Just installed Eclipse Mars on Lubuntu 14. While scrolling up and down in the console or editor - I get a kind of black rectangle covering some text, or the test is kind of twisted visually (lines become non-straight). Anyone know how to fix this? Haven't had this in previous versions of Eclipse on the same comp.
3 Answers
Exactly the same thing happened to me installing Eclipse Mars on Lubuntu 14 Toshiba Satellite notebook. I was really looking forward to the day of the Eclipse annual release of Mars and I was disappointed to be so disappointed with 5 minutes on installing.
Anyway, I can confirm that setting environment variable SWT_GTK3=0 by way of export does circumvent the problem. If you open a terminal and type "export SWT_GTK3=0" in the shell, you will also need to start Eclipse via the command line while remaining in the same shell. If you start Eclipse via a desktop launch icon, Eclipse will not see the SWT_GTK3 environment variable and the problem will persist. This is because environment variables in Linux are per-process and an application launched from the desktop is running in a different process to a shell process in a terminal.
So that Eclipse always sees the correct SWT_GTK3 environment variable after starting your machine, best you export SWT_GTK3=0 globally. To do this on Lubuntu, follow these steps:
- Open a terminal window
- Open the file /etc/profile for editing as sudo (e.g. sudo gedit /etc/profile)
- Add the line export SWT_GTK3=0 at the end of the file.
- Save file, quit editor and reboot your machine.
- Launch Eclipse Mars and hopefully your scrolling problem is fixed.
This worked for me but, as always, YMMV.
btw. You can check the SWT-GTK3 environment variable was exported after rebooting by opening a terminal window and typing the 'env' command. You should see SWT_GTK3=0 in the list of environment variables and values that are displayed.
It seems like a new bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=469027
It happens also under Kubuntu. Anyway the workaround, at least for me, is to export the following environment variable:
SWT_GTK3=0

- 718
- 4
- 18
-
Thanks. I don't really know what that means. Do you mean type in shell "export SWT_GTK3=0" ? cause this didn't work – jreing Jul 01 '15 at 20:37
I solved my problem in Ubuntu 15.04 with Eclipse Mars by adding the following code in the start of data in the Exec option in eclipse.desktop (/home/.local/share/applications):
Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 /usr/lib/jvm/...
In that way you leave intact your OS preferences and act only on Eclipse starting script.

- 5,567
- 5
- 33
- 54