Eclipse flickering on new line

4.3k views Asked by At

I'm using Ubuntu 16.04 and Eclipse Neon. Everything looks OK but when I press enter, the new line flickering. Switching to the GTK2 solved the problem but I have some other issue in GTK2 such as scroll bar coloring and button coloring in the Dark theme.

Since I don't have any problem in GTK3 and the flickering is the only problem I have, how can I fix it in GTK3?

Here you can see how it flickers in GTK3

enter image description here

EDIT

Recently I tried Eclipse Oxygen 4.7.2 on Ubuntu GNOME, but the problem still exists. It Seems it's not the Unity problem.

3

There are 3 answers

5
mrcl On

I had the same issue and here is what worked for me.

Create a bash script file (e.g. eclipse_gtk2.sh) containing the following commands.

#!/bin/bash
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
cd <path to eclipse directory where the excutable is found>
./eclipse -showlocation

Make eclipse_gtk2.sh executable

chmode +x eclipse_gtk2.sh

then simply run the file ./eclipse_gtk2.sh

Hope it also works for you.

Cheers

2
simUser On

update 2018/DEC/09

if you experience a background flickering in the eclipse editor on each move of the mouse pointer:

you can tell Eclipe which gtk-version to use:

#Gtk3 forced:
export SWT_GTK3=1
eclipse

#Gtk2 forced:
export SWT_GTK3=0
eclipse

for Eclipse Oxygen 3 (Version: 4.7.3, March 2018, Build id: 20180308-1800):

put

export SWT_GTK3=0

inside your ~/.profile (and restart x-server)

worked for me on Ubuntu 17.10 with Plasma and xorg and xserver-xorg-video-amdgpu: 1.4.0-1

2
Bashid On

First check the value of GTK_IM_MODULE in your environment by executing

echo $GTK_IM_MODULE

In my case the output was “xim”. But Eclipse expect it to be “ibus”. So enter the following command in a terminal session to set it to the value.

export GTK_IM_MODULE="ibus"

use below scripts for run it:

#!/bin/bash
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
export GTK_IM_MODULE="ibus"
cd [Eclipse Directory]
./eclipse -showlocation

don't forget make it run able:

chmod +x eclipse.sh