Intellij 发射器对团结不起作用?

/usr/share/applications下,我创造了:

返回文章页面

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/path/To/idea.sh"
Name[en_US]=Intellij
Name=Intellij
Icon=/path/to/intellij.png

然后我把它拖到 Unity 启动栏。我点了一下,但什么都没发生。我该怎么做?

JAVA_HOME设置正确,其他 Java 应用程序(如 Eclipse)工作并单击 idea.sh


我的配置:

  • Ubuntu 12.1064位(桌面)
  • Oracle JDK 1.7
  • IntelliJ 社区12
62370 次浏览

You can use "tools" > "create desktop entry", in IntelliJ itself.

I normally just create a runner under the normal menu (right click on start menu and choose edit) that points to something like bash -i ~/bin/idea/bin/idea.sh

I use bash -i to have it read .bashrc where I have JAVA_HOME set up correctly. That works like any other program.

bin/idea is always a link to the latest version so I never have to recreate this start menu item.

event with create desktop entry there still an error, because the launcher is not reading JDK_HOME configuration.

so after creating the desktop entry , right click on the launcher and select properties then add bash -i before double quote in command input text exp :command [ bash -i " /home/me/ides/idea/bin/idea.sh" %f ]

For starting IntelliJ IDEA from launcher
1. Create an idea.desktop file and include the following in it.

    [Desktop Entry]
Name=IntelliJ IDEA
Comment=IntelliJ IDEA IDE
Exec=/{installation directory}/idea-IC-129.713/bin/idea.sh
Icon=/{installation directory}/idea-IC-129.713/bin/idea.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Development;IDE;


2. Add permission file to be executable (right click on file in permissions tab and check the execute permission) [or sudo chmod +x idea.desktop]
3. Copy that file to /usr/share/applications (in the command line, do sudo cp idea.desktop /usr/share/applications)
4. Copy that file to ~/.local/share/applications (command line, sudo cp idea.desktop ~/.local/share/applications)

Now check in dash.

  1. Open a terminal, in /path/idea/bin folder
  2. Start IntelliJ with ./idea.sh
  3. Tools -> Generate Desktop Entry
  4. Close IntelliJ
  5. In the terminal, start nautilus as admin (gksudo nautilus)
  6. Go to /usr/share/applications
  7. Drag the new icon for IntelliJ to your launcher

Another alternative:

  1. cd /bin
  2. ln -s <path to idea.sh> idea - now it is available in the dash under "idea"
  3. open dash, type idea and start IntelliJ
  4. right click on the icon in the sidebar and add it to the starter

In order to have just one IntelliJ icon on the Launcher you need to add following line to your idea .desktop file:

StartupWMClass=jetbrains-idea

My working sample idea.desktop file looks like:

[Desktop Entry]
Type=Application
Terminal=false
Name=Idea13
Icon=/usr/local/bin/idea13/bin/idea.png
Exec=/usr/local/bin/idea13/bin/idea.sh
StartupWMClass=jetbrains-idea

create file jetbrains-datagrip.desktop

sudo gedit /usr/share/applications/jetbrains-datagrip.desktop


[Desktop Entry]
Version=1.0
Type=Application
Name=DataGrip
Icon=/home/gilcierweb/DataGrip/bin/product.png
Exec="/home/gilcierweb/DataGrip/bin/datagrip.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-datagrip

Just posting in case some other people come across this issue.

For me all I had to do right click the entry and go to properties and in the Application tab under Work path I put the full path to the bin folder.

For example /home/teodorvecerdi/Development/idea-IU-172.3317.76/bin/.

On my machine running Ubuntu 17.10 and having Intellij installed using snap i couldn't find any Create Desktop Entry option.

As it turned out, i had to copy the .desktop file from /var/lib/snapd/desktop/applications to .local/share/applications.

For new installation, create desktop entry from: Tools > Create Desktop Entry

If you are upgrading IntelliJ to a new version do the following:

ll ~/.local/share/applications | grep idea

You should see these two files

-rw------- 1 user user  315 Mar 28 17:06 jetbrains-idea-ce.desktop
-rw-rw-r-- 1 user user  311 Mar 28 17:06 jetbrains-idea.desktop

Open both files and update newly installed IntelliJ path in both of them

[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Community Edition
Icon=/home/user/Downloads/idea-IU-181.4203.550/bin/idea.png
Exec="/home/user/Downloads/idea-IU-181.4203.550/bin/idea.sh" %f
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea-ce

I just came across this and I want to add to the answer something for people who may need it.

You can use "tools" > "create desktop entry", in IntelliJ

like in this picture: enter image description here if you open intellij the first time you should create a new project to do this. it took me a while to figure that out