I'm trying to make do without a start menu on my Lubuntu laptop, and have installed Gnome Do as my launcher of choice.
Everything has been working the way it should up to now, and I have to say that the launcher really does eliminate the need for a start menu.
Anyway, I recently installed Eclipse (the java ide) and I can't get it to show up in Gnome Do. Here's how I installed eclipse:
$ ...Download eclipse, obviously...
$ cd /opt
$ sudo tar xvfz ~/Downloads/eclipse-whatever.tar.gz
Then I created a launcher for use on the Lubuntu desktop:
$ lxshortcut -o ~/Desktop/eclipse
After some fiddling around I ended up with this file in my ~/Desktop folder:
eclipse.desktop:
[Desktop Entry]
Type=Application
Exec=/opt/eclipse/eclipse
GenericName=Eclipse Java IDE
Icon=/opt/eclipse/icon.xpm
Name[en_US]=Eclipse Java IDE
StartupNotify=true
Categories=Development
The icon shows up nicely on the Lubuntu desktop. I can click it, and eclipse launches as expected.
However, no matter what amount of tweaking and restarting of Gnome Do, I just can't get it to show Eclipse.
Strange thing is I have Firefox on the desktop, with pretty much the same contents in the desktop shortcut file, and this shows up just fine.
What am I doing wrong here?
I never found out why this doesn't work, but searching around on google I found that many people were using a tool called alacarte to setup new menu items. So I threw away the eclipse.desktop file I had created and used alacarte to set up the launcher, and after having done that the problem was solved. I can now search for eclipse with Gnome Do.
Related
Since the menus in eclipse (kepler) didn't show in Ubuntu 13.10 I followed the tips given in Eclipse menus don't show up after upgrading to Ubuntu 13.10.
After doing this:
Exec=env UBUNTU_MENUPROXY=0 eclipse
...The menus were working fine when I started eclipse from the applications list in ubuntu, but not from the terminal. Writing export UBUNTU_MENUPROXY=0 in the terminal before starting eclipse worked fine, but I had to do this each time I opened a new terminal window.
Then I changed my eclipse.desktop file to include this:
Exec=env UBUNTU_MENUPROXY=0 && eclipse
...And the problem was solved. So I was wondering why the first option didn't work. Or was it not supposed to work when starting from the terminal?
eclipse.desktop fix didn't work for me, then I added the following line to .profile file in my home folder and restarted my computer.
export UBUNTU_MENUPROXY=0
It worked for me...
Hope this helps.
For Scribus I have at scribus.desktop launcher:
env QT_ACCESSIBILITY=0; scribus %f
So, I think that for eclipse.desktop it should be:
env UBUNTU_MENUPROXY=0; eclipse
After upgrading to Ubuntu 13.10, when I click on any menus in Eclipse (Help, Window, Run) they don’t show up. Only menu stubs and selection are visible.
I tried installing fresh 4.3 and the same thing is happening. Is anyone else experiencing this behavior?
The same question has been answered on askubuntu:
Eclipse menus are cut off or don't show
I might have found a possible solution for your problem. I have experienced the same issue as you have described, Ubuntu 13.10 64-bit Unity, Eclipse 4.3.0, menus were not visible.
So I realise that it might be helpful if I clarify myself, the desktop shortcut file for Eclipse would contain something like this:
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
#Exec=/home/USERNAME/Dokument/eclipse/eclipse
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/Dokument/eclipse/eclipse
Icon=/home/USERNAME/Dokument/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
The row Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/Dokument/eclipse/eclipse, part referenced in the post I pointed to, is the one that makes menus visible, et voila! :)
In my case this file (eclipse.desktop) resides in /usr/share/applications/
You have to create a new file to open eclipse.
#!/bin/bash
export UBUNTU_MENUPROXY=0
path_to/eclipse/eclipse
This bug has been confirmed in Ubuntu 13.10, here is a link.
In order to overcome problem, you have to change your eclipse.desktop file in part of Exec passing env UBUNTU_MENUPROXY with eclipse path and eclipse will be runnable from launcher with functional menu bar.
Here is patern for changing eclipse.desktop file:
Exec=env UBUNTU_MENUPROXY= path/to/eclipse
You should type export UBUNTU_MENUPROXY=0 before opening eclipse, and you have to open eclipse from the terminal instead of the global menu.
I had the same disabled sub-menus problem with Eclipse Kepler 64-bit on Ubuntu 13.10. But I finally managed to get it run with the following little work around. This bug has actually been already reported in this link.
Create a eclipse.desktop file in /usr/share/applications/with the following contents.
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/eclipse/eclipse
Icon=/home/USERNAME/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
or else, you could also try with the following executable bash script file which opens Eclipse. Place the file in /bin directory or /usr/local/bin.
#!/bin/bash
export UBUNTU_MENUPROXY=0
path_to/eclipse/eclipse
1) First, close eclipse and do this:
sudo gedit /usr/share/applications/eclipse.desktop
2) at the end of this file just copy-paste this line
Exec=env UBUNTU_MENUPROXY=0 /your/path/to/eclipse/binary
Open eclipse, the eclipse's menu will start showing up.
(Works on On post Ubuntu version 12.04)
Nothing worked for me until I added the following line to the .profile file in my home folder and restarted my computer.
export UBUNTU_MENUPROXY=0
It worked for me.
For those who use the ADT (Android Developer Tools) bundle:
Create a launcher for eclipse
edit /home//.local/share/applications/adt.desktop the way described by the
accepted solution.
This will bring the menus back, however not integrated into the top bar.
Robert
As for me, I found it better to edit eclipse starter itself,
mine is /usr/bin/eclipse (root permission required).
Last line:
exec $ECLIPSE "$#"
becomes:
env UBUNTU_MENUPROXY=0 $ECLIPSE "$#"
So, now it doesn't matter how it starts - by desctop icon, terminal command or self-restart after new plugin installation.
I solved it just opening my Eclipse by terminal as SU.
sudo ./eclipse
The same question has been posted (and answered by me) on askubuntu:
Eclipse menus are cut off or don't show
Here is the complete answer.
How To solve Eclipse menu issues in Ubuntu 13.10
(Stable way, until someone fixes the bug)
This method takes for granted that you already have your eclipse.desktop file (or that you can alternatively create a new one from scratch). Otherwise, you can momentarily take a look at the "fast way" below.
Open your eclipse.desktop file:
sudo -H gedit /usr/share/applications/eclipse.desktop
(If you can't find it in this path, try in ~/.local/share/applications/eclipse.desktop. Otherwise, you could have to find yours using locate command).
Replace the Exec= line with this:
Exec=env UBUNTU_MENUPROXY= eclipse
Where "eclipse" is the path to your eclipse executable. In this case it's just "eclipse" since there's a symlink in /usr/bin folder.
NOTE: If you can't find your eclipse.desktop file, you can simply create one from scratch in the above path, and fill it with these lines:
[Desktop Entry]
Type=Application
Name=Eclipse
Icon=eclipse
Exec=env UBUNTU_MENUPROXY= eclipse
Terminal=false
Categories=Development;IDE;Java;
Save the file.
Now you can run Eclipse from its icon as usual.
(Fast but repetitive way)
If you haven't got any eclipse.desktop file and you don't want to create it at the moment, you can simply run Eclipse with this command:
UBUNTU_MENUPROXY= eclipse
where "eclipse" is the path to your eclipse executable. Note that this is just the fast way to run Eclipse once. If you don't want to remember this command and use it every time you have to run Eclipse, follow the "stable way" above.
Sources:
Keenformatics - How To show Eclipse menu in Ubuntu 13.10 Saucy Salamander (my blog)
Ubuntu documentation - EnvironmentVariables
Eclipse menus doesn't show up in Saucy
You can still access the menu using the ALT key :)
What if I do not have such a file:
/usr/share/applications/eclipse.desktop
I guess you have that file, if you install eclipse from ubuntu repository.
If you install a standalone eclipse, then that file does not matter. And there is no such file over there.
close your eclipse if you have already launched eclipse application.
type this command on terminal
$ sudo gedit /usr/share/applications/eclipse.desktop
Note : you may found eclipse.desktop file in this path..../usr/share/applications/Eclipse
Add these lines in this file.
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
#Exec=/home/USERNAME/Dokument/eclipse/eclipse
Exec=env UBUNTU_MENUPROXY=0 /home/ashish123/adt-bundle-linux-x86-20140702/eclipse/eclipse
Icon=/home/ashish123/adt-bundle-linux-x86-20140702/eclipse/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
Looks like the bug is still there, even in 14.10 with Eclipse Luna. My menus wont show. I setup eclipse using the tutorial here -
http://ubuntuhandbook.org/index.php/2014/06/install-latest-eclipse-ubuntu-14-04/
and used that tutorial plus the top answer to make the desktop like this -
[Desktop Entry]
Version=4
Name=Eclipse
Comment=Integrated Development Environment
Exec=env UBUNTU_MENUPROXY=0 /usr/share/applications/
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Development;IDE;Java
Now, my eclipse won't even run.
With the desktop icon below, at least eclipse opens up -
[Desktop Entry]
Name=Eclipse 4
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
EDIT - Menus are now visible. I dunno what happened!
I am having trouble finalising the installation of Subclipse into my Eclipse installation.
First some background: I installed Eclipse in 64-bit Ubuntu (in a VM). I tried to install Subclipse but on the final screen, the button to finish was greyed out (apparently this is a known unresolved issue). I cancelled the installation.
The problem is that when I tried to add the plug-in again, it says that it's a duplicate location (http://subclipse.tigris.org/update_1.8.x). So I tried to search for the plug-in in the installed list (help -> about eclipse platform -> installation details), but I can't find Subclipse anywhere.
I have tried uninstalling Eclipse completely. Didn't solve the problem. I'd like to not have to completely reinstall Ubuntu in this VM. Is there any way I can completely clear any and all configurations so I can start from square one?
The following solution assumes you installed with the installer (as opposed to your package manager).
There is a hidden file in your home user directory (the path is /home/user). You can use the shortcut Ctrl+H to discover it.
And then you would find a folder named .eclipse, just remove this folder, as it includes all the setting you have set before.
Alternatively, you can open a terminal, and use the following command:
rm -r ~/.eclipse
Ubuntu, and all Unix systems are similar. They are all Inheritance systems, which will keep the user's setting in home.
The 2 most popular ways of removing eclipse are to either
go into the 'software center', search for eclipse, and then
remove it, or
remove it from a terminal. For example: $sudo apt-get autoremove --purge eclipse
1 seems to be the better way, as 2 leaves pieces behind. In either case, do the following after you remove it:
$whereis eclipse
and if there are any pieces left behind, remove them.
You also should have a .eclipse directory in your home directory. Neither 1 nor 2 will wipe those out. So:
home/yours$rm -r .eclipse
OK, so now to reinstall it, you could use apt-get, or software center, or download the compressed archive file from http://www.eclipse.org/downloads/ I prefer to download the latest version. I also prefer eclipse 'classic', and then I can add the features I need to it. So after downloading:
$sudo tar xvf eclipse-SDK-4.2.1-linux-gtk-x86_64.tar.gz -C /opt
To run:
$/opt/eclipse/.eclipse
There are then a few different options for creating a shortcut.
Here's a quick run down of one that should only take a few seconds (you may not need sudo and chmod):
$sudo touch /usr/share/applications/eclipse.desktop
$sudo chmod 777 /usr/share/applications/eclipse.desktop
$vim /usr/share/applications/eclipse.desktop
and paste:
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
and then run:
$cd /usr/local/bin
$sudo ln -s /opt/eclipse/eclipse
$eclipse
Then you can just right click on the launcher icon (in Ubuntu 12.04 at least) and lock it to the launcher.
For others having this problem (as I just was):
Click "Available Software Sites" link under the "Add..." button
Highlight the listing that is causing you the problem and click "Remove"
Click "OK"
Click "Add..." again and enter the URL once again
By 'this problem' I mean receiving the "Duplicate Location" error that won't let you click "OK "when you add the URL of Subclipse into the Location field after clicking "Add...".
Start by finding any left-behind eclipse configuration:
#sudo updatedb
#locate eclipse
This may find some things left behind you were unaware of.
If Eclipse was installed using snap:snap remove eclipse
The "duplicate location" is unrelated to an actual previous install of Subclipse; it just means you tried to define the update site a second time. Having defined it once, you don't need to do it again, and you'd simply skip that step on subsequent attempts. Reinstall Eclipse, and then just don't try to redefine the repository location more than once.
And make a nice cup of tea and relax.
Try the following command as root user
sudo rm -r ~/.eclipse
In the case where you install eclipse using snap, then the command below should do it.
sudo snap remove eclipse
So I restarted my Eclipse RCP application after I upgraded my Ubuntu, and it seems that the Main menu has disappeared!
Does anyone know if this is the fault of the new Unity interface or something in SWT?
If you're having the same problem as I had, about getting the Eclipse menu in the Unity Global Menu with HUD then this is what did the trick for me (nobody seems to be able to explain why it works, but for me and others it worked perfectly). I'm using Ubuntu 12.04 and Eclipse Indigo from their website.
(Change the commands accordingly if you're not using Vim for editing.)
Edit libappmenu.so:
$ sudo vim /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
Search for 'Eclipse':
/Eclipse
Replace the 'E' with 'X':
rX
This might be optional but doing it didn't hurt for me:
$ sudo ldconfig
Now you should be good to go with Eclipse using the Unity Global Menu and The HUD working like a charm.
(Credit: elvisd blog)
As a workaround you can do
alias eclipse='UBUNTU_MENUPROXY=0;eclipse'
But this will mean that you have to launch Eclipse from a terminal. If you want to launch Eclipse from Unity Dash then you have to add
UBUNTU_MENUPROXY=0
as the first line in /usr/bin/eclipse.
This will show the file menu inside the application.
As #Geniedesalpages mentions, it's the interaction between eclipse events and the Unity menu. https://bugs.eclipse.org/bugs/show_bug.cgi?id=330563
There should be updates to unity to allow eclipse to retain its old style menu bar.
PW
Create a file a bash script in the folder of Aptana/Eclipse and run the Aptana/Eclipse by this file.
#!/bin/bash
export UBUNTU_MENUPROXY=0
./AptanaStudio3
On linux:
eclipse PathnameToWorkspace
works fine, and launches eclipse on the workspace.
I've never been able to figure out the MacOS moral equivalent, given the MacOS application tree structure.
I suspect this is not a hard problem.
./eclipse -data <workspace-path> (see also How do I run Eclipse in the Eclipse Wiki).
On my system there's a link to the eclipse binary from /Applications/eclipse/eclipse, and I find that just running that will start Eclipse with my default workspace.
You might also find the Eclipse binary in '/Applications/Eclipse.app/Contents/MacOS/eclipse'.
When I start Eclipse like this (from the command line) I find that my Mac will not always switch to the desktop where Eclipse is started, so that I will have to go hunt for the Eclipse window with Exposé/Misson Control (Ctrl-Up Arrow). – This is especially true when I'm have two monitors connected to my Mac.
Since I found typing the full path to eclipse annoying, I simply added a symlink to it from /opt/local/bin and made sure that directory is in my $PATH:
cd /opt/local/bin
sudo ln -s /Applications/eclipse/eclipse .
echo 'PATH="$PATH:/opt/local/bin' >>~/.bashrc
After that, just issuing the command eclipse (without the preceding /Applications/eclipse part) works as it should.
After doing lots of hit and try I have added following into my bash_profile and I am able to launch eclipse from terminal.
(Note: Eclipse is inside Application)
export PATH="$PATH:/Applications/Eclipse.app/Contents/MacOS"
Hope it will be helpful for beginner like me.