Create a desktop shortcut icon for eclipse under linux

Type the command sudo gedit /usr/share/applications/eclipse.desktop and then write the following statement in it:

[Desktop Entry]
Name=Eclipse
Comment=Eclipse SDK
Encoding=UTF-8
Exec=/usr/local/eclipse/eclipse  (eclipse目录)
Icon=/usr/local/eclipse/icon.xpm  (
eclipse目录
Terminal=false
Type=Application
Categories=Application;Development;

 

 

Then save and close, then you can? NO, we also need to manually copy eclipse.desktop to the desktop and execute the following statement:

sudo cp /usr/share/applications/eclipse.desktop /home/yourname/desktop

Wait, maybe after doing this, your icon doesn't seem to be the common one, but a blank space with a lock button on it. What's the reason? Maybe you are not root and don't have access to the file. Execute another Statement:

sudo chmod 777 /home/yourname/desktop/eclipse.desktop

The icon is then available for programming.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326535453&siteId=291194637