16

I installed Android Development Tools (you just download it and run the executable file inside a folder). I want to pin the ADT to the launcher, but I don't know how to do that. I tried to drag the executable file, but it didn't work. I also tried to click "Lock to the launcher"(on the right click when it's running), but it also didn't work. Any ideas?

Edit1: If I create shortcut like in the article you claim answers my question. Can I install normal eclipse and set it in a way it's the same like ADT downloaded from android.com? I tried that as well, but some features are missing.

Edit2: When I try to run it, what I get is an error message saying There was an error launching the application

Edit3: This is what I typed

Desktop Entry]
Name=Eclipse
Type=Application Exec='/home/dusan/adt-bundle-linux-x86_64-20140321/eclipse/eclipse'
Terminal=false
Icon='/home/dusan/adt-bundle-linux-x86_64-20140321/eclipse/icon.xpm'
Comment=Eclipse
NoDisplay=false
Categories=Development;IDE
Name[en]=Eclipse.desktop

Edit4: Eclipse launched successfuly.

Edit5: I also tried without apostrophes, but I get the same error message as in Edit2.

Dusan Milosevic
  • 1,952
  • 6
  • 27
  • 48
  • See http://askubuntu.com/questions/13758/how-can-i-edit-create-new-launcher-items-in-unity-by-hand - you need to create a .desktop file for it. – Takkat Apr 19 '14 at 18:54
  • Takkat, please remove the duplicate tag, because this IS NOT a duplicate! – Dusan Milosevic Apr 19 '14 at 20:31
  • What's a typo?. – Dusan Milosevic Apr 19 '14 at 21:22
  • 1
    The message in your screenshot from your 2nd edit indicates an error in the .desktop file. Spot the error, remove it, and you will be able to run Eclipse from a .dektop file (which then can be dragged onto the laucher). – Takkat Apr 19 '14 at 21:39
  • I cannot find the error. I did everything as described. I showed the code of .desktop, so please take a look at it and see if you can find an error. – Dusan Milosevic Apr 19 '14 at 22:13
  • 2
    Your terminal screenshot shows at least two errors... 1. line missing [, 3. line missing new line after "Application". Double check the paths are correct. Save the .desktop file in ~/.local/share/applications and make it permission "executable". – Takkat Apr 20 '14 at 06:57

1 Answers1

37

You should create a Desktop Entry first: Go in terminal and write:

sudo nano /usr/share/applications/adt.desktop

and write inside of editor:

[Desktop Entry]
Name=ADT
Type=Application
Exec=/home/dusan/adt-bundle-linux-x86_64-20140321/eclipse/eclipse 
Terminal=false
Icon=/home/dusan/adt-bundle-linux-x86_64-20140321/eclipse/eclipse.xpm
Comment=Any comment
NoDisplay=false
Categories=Development;IDE
Name[en]=adt.desktop

Replace Icon and Exec with the path to Eclipse. Then press Ctrl+X followed by Y, then Enter.

Now you have desktop entry in Dashboard. Drag it to your launcher. May need to logout.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
kostandinangjellari
  • 1,123
  • 1
  • 10
  • 20