26

I currently have IntelliJ IDEA 15.01 on my system. I recently downloaded Intellij IDEA 15.04. After running the idea.sh script to open it, I went to the tools menu, and created the desktop launcher. After closing IDEA, I tried to open it with the launcher, which instead opened IDEA 15.01. After that, I tried opening IDEA using the launcher in /usr/share/applications (which is working correctly) and then pinning the corresponding launcher to the desktop. The launcher works correctly until I restart my computer. After I restart, the launcher reverts to opening IDEA 15.01.

How do I fix this?

IDEA install directory: /home/thenumberone/idea-IC-143.2287.1/

Contents of /usr/share/applications/jetbrains-idea-ce.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Community Edition
Icon=/home/thenumberone/idea-IC-143.2287.1/bin/idea.png
Exec="/home/thenumberone/idea-IC-143.2287.1/bin/idea.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea-ce
  • Does the s/w automatically install the update or do I have to follow the normal installation and remove the old version later? – SY_13 Jul 21 '16 at 15:03
26

The cause

I am 100% sure you still have a local idea 15.01 launcher in ~/.local/share/applications/jetbrains-idea-ce.desktop.

If you drag the global one (/usr/share/applications/jetbrains-idea-ce.desktop) on to the launcher, you temporarily "force" the Unity Launcher to work with the global one, but the local one overrules the global one on restart (log in).

What to do?

Simply remove the local .desktop file in ~/.local/share/applications, log out and back in.

  • Awesome - I was fighting with this on every IntelliJ update. Thanks ! – Mat Dec 13 '17 at 8:54
34

To update the launcher when you upgrade IntelliJ:

  1. Close all OLD Intellij instances
  2. Remove OLD Intellij shortcut from launcher (right click -> Unlock from launcher)
  3. Run

    rm ~/.local/share/applications/jetbrains-idea.desktop
    rm ~/.gnome/apps/jetbrains-idea.desktop
    sudo rm /usr/local/bin/idea
    sudo rm /usr/share/applications/jetbrains-idea.desktop
    
  4. Open NEW Intellij by going to NEWIntellij home dir and running bin/idea.sh

  5. Tools -> Create desktop entry
  6. Lock new icon to launcher (right click -> lock to launcher)

If the launcher icon won't remain after closing Intellij

  1. rm ~/.local/share/applications/jetbrains-idea.desktop
  2. Open Intellij -> Tools -> Create desktop entry
  3. Right click on Intellij launcher icon -> lock to launcher
  • 1
    Great, this works! This should be the accepted answer! – kravemir Jul 29 '17 at 7:33
  • This is for WebStorm users on Ubuntu 18.04. When I tried this the second step #2 "Open WebStorm -> Tools -> Create desktop entry", it did not work. I did not see an icon appear on the desktop or Favorites bar. What did work was clicking on the "Command" button to bring up the app manager, entered "webstorm" into the Search bar, and clicked on the WebStorm icon that appeared in the search results. Once WebStorm appeared, I could then right-click the WebStorm icon on the launcher bar and add it to Favorites. – Robert Oschler Nov 29 '18 at 8:05
  • With latest version of ubuntu, the last point "3." is "Add to Favorite" – Julien BRENELIERE Jan 7 at 9:25
8

A simpler manner is:

  1. Remove all old IntelliJ shortcuts.
  2. Go the new version of your IntelliJ at INTELLIJ_DIRECTORY/bin via command line, and execute ./idea.sh
  3. In the IDE, to go Tools -> Create Desktop Entry...
  4. Confirm the creation if asked
  5. Log off and login
  6. In the Unity menu look for IntelliJ, launch it and, on the left side panel where you see your IntelliJ icon, click "Lock to Launcher".

That's it.

1

So I run into this issue recently and I found another alternative which was much simpler.

  1. First, create a symbolic link to your new IntelliJ IDE in the Applications directory or the folder you normally keep your IDE applications. Example ln -s idea-IC-[version.number.here] IntelliJ
  2. Open the local desktop launcher file(~/.local/share/applications/jetbrains-idea-ce.desktop) with your favorite editor eg nano, vi, gedit, etc.
  3. Modify the Icon field (approx line 5) and the Exec field (approx line 6) to point to the appropriate files under the bin in path where you created the symbolic link above. Your file should now look like this:

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=IntelliJ IDEA Community Edition
    Icon=/home/rhycce/Applications/IntelliJ/bin/idea.png
    Exec="/home/rhycce/Applications/IntelliJ/bin/idea.sh" %f
    Comment=The Drive to Develop
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-idea-ce
    
  4. Save and Done!

From now on, after downloading any IDE update, all you have to do is update the symbolic link to point to the new update folder and you are good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.