How-to : Install latest Eclipse IDE version in Linux and fix interface issues

Everyone has seen that in the official Ubuntu, Debian or Mint repositories, the version of Eclipse IDE is not the latest (as the time I am writing this post, the latest stable version is Eclipse 4.3.1 Kepler). But as I already mentioned in previous posts, that should not be and is not a problem in Linux 🙂

So before we begin with the installation guide, you should have installed Java on your computer. I would recommend you to install Oracle Java 7. There is a good tutorial and as well a repository for it here. If everything is all right, when you type the following command

$ java -version

the output should look like this one(in my case the latest version of java is 1.7 update 51)

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

After we are sure that Java is installed we can continue with the Eclipse installation. First, we should go to the official website and download the version of Eclipse that we want to install. Just go on Eclipse download page and choose the version that you want to use. Choose to save the file in your home folder. After that open a terminal window and type the following commands

$ tar xvf eclipse-java-kepler-SR1-linux-gtk-x86_64.tar.gz
$ sudo mv eclipse /opt/
$ sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse

I little bit more explanations about the commands. First, we have extracted the downloaded file, then we have moved the eclipse folder to /opt directory and finally we have created a link so that your distribution can find where eclipse is placed and start it.

Now when we type eclipse in the command line Eclipse IDE starts and you are asked about your workspace folder. After everything is ok, we can see the installed application. Here comes the first problem – Eclipse doesn’t look so good when it is fresh installed, so some more tweaks are needed.


Eclipse after a fresh installation

The first thing that really irritates me and most of the users are the huge tabs. To fix the issue with their size, type the following commands.

$ cd /opt/eclipse/plugins/org.eclipse.platform_4.3.1.v20130911-1000/css
$ sudo vim e4_default_gtk.css

The name of the folder in “plugins” may be different. It depends on the version of Eclipse. I opened the file with vim, but you can do it with every text editor that you want. After the file is opened, find the following part of it :

.MPartStack {
    font-size: 11;
    swt-simple: false;
    swt-mru-visible: false;

Just comment the font-size row with two slashes and the block should look like this :

.MPartStack {
    //font-size: 11;
    swt-simple: false;
    swt-mru-visible: false;

One more thing left. After we are ready with the font size of the tabs we also should change their height. So add the following block of code at the end of the file which you opened for edit

CTabFolder {
    tab-height: 16px

All of the values that we changed can be replaced with values that answer your specific needs. Now we can save the file and restart Eclipse.


Eclipse after the tab change

So your Eclipse is almost ready. One last thing left – change the size of the huge icons in toolbar. To fix that, create a file, called .gtkrc-2.0 and paste the following text.

style "compact-toolbar"
        GtkToolbar::internal-padding = 0
        xthickness = 1
        ythickness = 1

style "compact-button"
        xthickness = 2
        ythickness = 2

class "GtkToolbar"                              style "compact-toolbar"
widget_class "**"        style "compact-button"

Save the file and again restart Eclipse. Now it should look like this


Final look of Eclipse

So this was a brief tutorial how to install and make Eclipse looks better in Linux. If you have more useful suggestions, feel free to comment 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *