Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using IntelliJ IDEA, which is a Java application. When it runs (invoked through Dash) it shows a launcher icon with no name. I've tried several times to right-click and select "keep in launcher", but no success - each time I close it the launcher icon disappears. I tried to use MyUnity to fix this, but it also fails. I don't mind hacking this manually, but I don't know where the launcher configs are stored or what to do.

The relevant desktop file is shown below, and it works with the dash perfectly.

[Desktop Entry]
Type=Application
Name=IntelliJ IDEA
Comment=IntelliJ Integrated Development Environment
Icon=/opt/IntelliJ-IDEA-11/bin/idea48.png
Exec=/opt/IntelliJ-IDEA-11/bin/idea.sh
Terminal=false
StartupWMClass=Intellij_IDEA
Categories=Development;IDE;Java;
share|improve this question

6 Answers 6

up vote 19 down vote accepted

This is a problem in all JetBrain IDEs. In PyCharm (the one that I use) it's solved in the 2.0 version. It's likely solved in the corresponding IntelliJ version (likely 11, but I'm not sure).

You will need to go into the Tools Menu and select Create Desktop Entry. It will create a correct Desktop file in the correct place, so it will be added to your DE menu (including Unity Dash). Afterward you can initiate it from the menu and pin the icon or drag and drop it to the bar.

Note that the menu names are those in PyCharm as I don't use IntelliJ, but they are likely the same.

share|improve this answer
    
Thanks a lot! It worked like a charm. I wonder what's the difference between this desktop file and the one I hacked. Also, why this is hidden in some menu, and not part of the first launch? –  Little Bobby Tables Dec 21 '11 at 10:06
    
I can't check it, but probably the difference is the StartupWMClass value. You can check it yourself, the .desktop should be in ~/.local/share/applications or /usr/share/applications (the first option if you choose to create it for one user, the other if you created it system-wide) –  Javier Rivera Dec 21 '11 at 10:15
    
I believe it's the .desktop file location which matters... –  Alin Andrei Dec 21 '11 at 11:25
1  
Create Desktop Entry was added to Intellij IDEA with git.jetbrains.org/?p=idea/community.git;a=commit;h=011db682 , fixing youtrack.jetbrains.com/issue/IDEA-70806 . It works like a charm on Ubuntu 12.04 LTS (Precise Pangolin). –  Roberto Tyley Apr 29 '12 at 10:00
  1. Open the software by ./idea.sh from bin folder
  2. In the IntelliJ IDEA click on Tools > Create desktop entry...
  3. Right click on IntelliJ icon on launcher and stick it there by locking it.
share|improve this answer

To make Intellij IDEA 12.1 work with Ubuntu 12.04+:

1> Create a file named: ~/.local/share/applications/jetbrains-idea.desktop

2> Add this content to the file:

[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA
Icon=<YOUR-IDEA-FOLDER>/bin/idea.png
Exec="<YOUR-IDEA-FOLDER>/bin/idea.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-idea

3> Reboot the system

Now you will have the best IDE fully working on your Ubuntu.

share|improve this answer

This web describes the universal steps which could be used customizing window matching...works perfectly for other desktops as well:

http://wiki.go-docky.com/index.php?title=How_to_Customize_Window_Matching

Simplified:

  • Start your (Java) application
  • Execute: xprop | grep WM_CLASS | awk '{print $4}'
  • Add this line to applications's myapp.desktop file StartupWMClass=output_from_step_2__without_quotes

Example: StartupWMClass=net-sourceforge-squirrel_sql-client-Main

share|improve this answer

I didn't see the menu entry in IDEA 10.5 for creating the desktop file, but you can easily create one by hand.

Here is my .desktop file (for IDEA 10.5 ultimate edition) :

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/usr/local/share/devtools/idea-IU-107.105/bin/idea128.png
Exec=/bin/sh /usr/local/share/devtools/idea-IU-107.105/bin/idea.sh
Name=IntelliJ
StartupNotify=true
StartupWMClass=com.intellij.idea.Main

In case you're new to unity, you can just drag that .desktop file to the launcher.

share|improve this answer

This .desktop file worked for me, using IntelliJ 11:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/home/mizu/Programs/IntelliJ/bin/idea_CE128.png
Exec=/bin/sh /home/mizu/Programs/IntelliJ/bin/idea.sh
Name=IntelliJ
StartupNotify=true
StartupWMClass=jetbrains-idea-ce
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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