Creating desktop menu items for Intellij IDEA in Linux

已回答

Edit: Doh. I just noticed in the Welcome screen (for IDEA and PyCharm) that "Create Desktop Entry" is an option.

I recently installed the SmartGit/Hg client from Syntevo and noticed they included two scripts in the bin directory:


1. add-menuitem.sh
2. remove-menuitem.sh


which add/remove a Desktop menu item, under the Programming category.


I have adapted these two scripts to do the same for Intellij IDEA. They are attached to this post.
I have also attached a screenshot to show you the result.


Instructions:

  1. Copy the two attached scripts to the /path/to/your/intellij-idea/bin directory
  2. cd /path/to/your/intellij-idea/bin
  3. chmod +x *menuitem.sh
  4. cp idea.png jetbrains-idea.png
  5. ./idea-add-menuitem.sh



Note: the xdg* programs (in the script) require a "vendor" prefix (unless you specify "--novendor"). That's why I've added "jetbrains-" where required.


Note: tested on LinuxMint 16 Cinnamon x64



Attachment(s):
intelli-idea-menu-linux.png
idea-remove-menuitem.sh
idea-add-menuitem.sh
6

Thank you very much for providing these scripts. They're really helpfull.

Can confirm, it still works perfectly on Linux Mint 18.2 Sonya with IntelliJ Idea 2017.3.1 (Ultimate Edition)

 

 

0

Thank you, it still working perfectly. Manjaro - Gnome 17.1.1, Arch-linux with Intellij Idea 2017.3.3

0

Brilliant, thank you. Missing the menu in Arch was driving me nuts. Ran it on IntelliJ 2019.

0

worked on Linux Mint 19.1

0

Solved it by adding "/snap/bin" path to /etc/environment file without any file movings. 

0

thanks! worked for Ubuntu 18.04

0

woww you're very clever my brother.. thank you for publish this post and provided these scripts.. it's still working on debian 10 (Linux 4.19.0-13-amd64) with IntelliJ IDEA 2020.3.1 (Community Edition)..

0

What's wrong with Tools | Create Desktop Entry?

2

Serge Baranov,  good question.
I can see that this menu should be in the main menu via settings, but it is missing itself there.
Take a look:

0

How did you install IntelliJ IDEA?

0

Good morning!

✔ nb7:~> snap info intellij-idea-ultimate
name: intellij-idea-ultimate
publisher: jetbrains✓
store-url: https://snapcraft.io/intellij-idea-ultimate
snap-id: i5O0FAhwADbvDr8LYQ6jVHxPEJle7m6C
tracking: latest/stable
refresh-date: 14 days ago, at 20:22 EET
channels:
latest/stable: 2020.3.1 2020-12-29 (266) 815MB classic
....
✔ nb7:~> neofetch
....
OS: Ubuntu 20.04.1 LTS x86_64
Kernel: 5.4.0-59-generic
Shell: bash 5.0.17
DE: Xfce
WM: Xfwm4
....
0

This menu is not available when installing via snap, see https://wh0.github.io/2019/10/31/intellij-desktop.html . Only when you install from tar.gz.

snap is supposed to create it automatically. See if https://stackoverflow.com/a/48243657/104891 helps.

0

Excellent script, thank you. It  works on Ubuntu-22.04. 

An extra step was necessary. I had to log off, log on, click Activities, search for Idea and right click Add to Favourites.  

0
tested and working on Mint 20.3
0

Nice script, still working on Mint 21.1!

0

请先登录再写评论。