How to give permission to execute Eclipse application?
A full step by step guide:
-
Remove your Eclipse installation
sudo rm -r /opt/eclipse sudo rm /usr/share/applications/eclipse.desktop sudo rm /usr/bin/eclipse
-
Download eclipse here, eg. Eclipse IDE for Java EE Developers 64-bit.
cd wget https://eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/R/eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz
-
Extract the archive
sudo tar xf eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz -C /opt
-
Create a desktop file
nano ~/.local/share/applications/eclipse.desktop
and add the configuration below
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=Eclipse JEE Comment=Eclipse Integrated Development Environment Icon=eclipse Exec=/opt/eclipse/eclipse StartupNotify=true StartupWMClass=Eclipse-JEE
Icon=eclipse
takes the icon from your icon theme, if there is one. If not, use an absolute icon path. Start eclipse via your launcher
Related videos on Youtube
Diego-MX
Updated on September 18, 2022Comments
-
Diego-MX over 1 year
This one has confused me for a couple of hours.
I know the commandsudo chmod +x file
to give executable permissions, and still I don't get my application to run.For context, I installed Eclipse manually and in the
/opt/
folder. I created a link to/usr/bin/
and a/usr/share/applications/eclipse.desktop
file with the data to start from the launcher.When I run
sudo eclipse
the program starts normally, but if I don't includosudo
then it gives me an error. I tried giving permissions viachmod +x
to all of the above, but I still get the error if I don't includosudo
.This may be either a permission issue or an Eclipse issue. There is an error for
Permission denied
, and also the messageThe Eclipse executable launcher was unable to locate its companion shared library.
Hope someone can point me in the right direction.
-
Admin over 8 yearsJust FYI, one should never run graphical applications such as Eclipse using
sudo
. If it needs root permissions, you should usegksudo
instead for avoiding to mess up permissions of your home directory. And you also have to know that if Eclipse runs as root, the programs you write and start with it run as root as well, which is most probably not desired and can be dangerous! Use root access as rarely as possible. -
Admin over 8 yearsGood to know. It did feel weird to have to start it like that, but then there's more issues that I wasn't aware of.
-
-
Diego-MX over 8 yearsYup, this did it. Using that installer had me go through a lot more. Thanks.
-
Byte Commander over 8 years@Diego If this answer solved your problem, don't forget to accept it.
-
Diego-MX over 8 yearsMinor details: the icon didn't work as such, it's location is
opt/eclipse/icon.xpm
, the current version is 4.5.0. -
Christine over 7 yearsThe wget didn't work for me, but I managed to download the file from the site. This oomph installer just doesn't work, although on another computer, a few weeks ago, it did.
-
XavierStuvw over 7 years@Diego I converted the xpm into a jpg and it worked for me. Try
convert icon.xpm icon.jpg