I used to have a handy shortcut to my Jetbrain IntelliJ IDE installation, but with a recent update requiring manual install rather than being able to auto update as usual I found myself having to remember how I created the shortcut.

In Gnome I can use the "Windows" key and type a letter or two of the program name to launch it. This is the behaviour I wanted for IntelliJ Idea.

I tend to install my own programs in my ~/bin directory. Sure I could install in one of the system directory hierarchies, I just prefer this approach as I can wipe my system partition (eg reinstall/upgrade) and leave my own stuff in place.

Having downloaded Idea and unzipped to ~/bin/idea-<long version number>/ I created a symlink to the installed Idea directory.
Then I should be able to use that symlink in my menu item and change that in future rather than rebuild my menu item.


cd ~/bin
cp ~/Downloads/ideaIU-2020.3.tar.gz . 
tar -xvf ideaIU-2020.3.tar.gz
ln -s ~/idea-IU-203.5981.155/ idea 

Now we are ready to create the menu item to allow me to see IntelliJ in the Gnome menus.

If I were creating a new menu item for all users I would try putting it in /usr/local/share/applications/ however as I mentioned I wanted to configure the application for just my user, so I added a 'jetbrains-idea.desktop' file in ~/.local/share/applications/

That .desktop file looks like....

[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/home/dafoot/bin/idea/bin/idea.svg
Exec="/home/dafoot/bin/idea/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea


You can see the command used to launch IntelliJ in the Exec line. Interestingly this didn't work using the tilda notation for location (~/bin/idea/bin/idea.sh). I'm not sure if this is a Gnome thing and the way it loads these files  or a simple typo thing. Either way, full path works for me so that'll do for now.

While the tilda notation didn't work I wondered if it was a case of just needing to restarting Gnome. Apparently Alt-F2 allows you to issue a Gnome command like 'restart' on X.org. However in more recent versions of Fedora (I'm on 33 at time of writing) Wayland is used instead of X.org. As such only logging out and back in would restart Gnome.

Turns out however I didn't need to at all. Once I got the paths correct in my desktop file, Gnome picked it up without restarting it.

References:
Gnome guide to desktop files
Reddit discussing restart of Gnome on Wayland