You can use "tools" > "create desktop entry", in IntelliJ itself.
Intellij launcher doesn't work on unity?
-
16-01-2022 - |
Question
Under /usr/share/applications
I created:
intellij.desktop
:
#!/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
Then I drag it to the Unity launcher bar. I click it, but nothing happens. How can I make it work?
JAVA_HOME
is set correctly, other Java apps (like Eclipse) work and click idea.sh
.
My configuration:
- Ubuntu 12.10 64-bit (Desktop)
- Oracle JDK 1.7
- IntelliJ Community 12
Solution
OTHER TIPS
- Open a terminal, in /path/idea/bin folder
- Start IntelliJ with ./idea.sh
- Tools -> Generate Desktop Entry
- Close IntelliJ
- In the terminal, start nautilus as admin (gksudo nautilus)
- Go to /usr/share/applications
- Drag the new icon for IntelliJ to your launcher
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.
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.
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
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
.
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/
.
Another alternative:
cd /bin
ln -s <path to idea.sh> idea
- now it is available in the dash under "idea"- open dash, type idea and start IntelliJ
- 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