Creating Desktop Shortcuts for Scala IDE on Linux

· Read in about 1 min · (123 words) ·

Download the Scala IDE from here, unzip it at ~/software/scala-eclipse, such that the contents look as follows:

$ pwd
/home/saleem/software/scala-eclipse
$ ls
artifacts.xml  configuration  eclipse  eclipse.ini  epl-v10.html  features  icon.xpm  META-INF  notice.html  p2  plugins  readme

Create a launcher script for Scala IDE /bin/scala-ide, and make it executable:

$ cat /bin/scala-ide
#!/bin/bash
/home/saleem/software/scala-eclipse/eclipse
$ chmod +x /bin/scala-ide

Configure launcher icon ~/.local/share/applications/scala-ide.desktop. You can copy a config file from /usr/share/applications/ directory and make changes as follows:

$ cat ~/.local/share/applications/scala-ide.desktop
[Desktop Entry]
Version=1.0
Name=Scala IDE
GenericName=Scala IDE
Comment=View and edit files
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/bin/scala-ide %F
TryExec=scala-ide
Icon=/home/saleem/software/scala-eclipse/icon.xpm
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
# StartupWMClass=

Now you can invoke scala-ide from shell ( command line ) or via desktop search (Alt+F2).

References: