I had the same problem, changing my launcher to source setup.bash solved it.
Create a file called "Eclipse.desktop" and paste the below text into it, possibly replacing /opt/eclipse with wherever your Eclipse installation is located.
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/opt/eclipse/icon.xpm
Exec=bash -c "source /opt/ros/fuerte/setup.bash; /opt/eclipse/eclipse"
Name[en_US]=Eclipse
Name=Eclipse
Icon=/opt/eclipse/icon.xpm
Originally posted by dgossow with karma: 1444 on 2012-04-24
This answer was NOT ACCEPTED on the original site
Post score: 10
Original comments
Comment by ubuntuslave on 2012-04-25:
I can confirm such a configuration for launching Eclipse Indigo from an icon in Ubuntu 11.10 (Oneiric) and using ROS Fuerte gets rid of the problem.
Comment by felix k on 2012-04-25:
bash -i -c eclipse
is sufficient, it starts bash in interactive mode, which per definition sources the .bashrc, therefore being consistent with the ros distro and other configs defined there.
Comment by Mario Garzon on 2012-06-20:
i think the bash -i -c eclipse is the easiest way to solve the problem!! thanks a lot
Comment by georgebrindeiro on 2013-01-28:
awesome answer, thanks!
Comment by cf.morales46 on 2013-02-20:
Worked for me using bash -i -c eclipse on groovy. Thanks a lot!