Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
Exec=/home/rob/.intellij-13/bin/idea.sh
Name=IntelliJ
Icon=/home/rob/.intellij-13/bin/idea.png
// mod permissions
sudo chmod 644 /usr/share/applications/intellij.desktop
sudo chown root:root /usr/share/applications/intellij.desktop
@SpekkoRice

This comment has been minimized.

Copy link

@SpekkoRice SpekkoRice commented Jun 23, 2014

Thank you :)

@JulienPerrin

This comment has been minimized.

Copy link

@JulienPerrin JulienPerrin commented Jun 23, 2014

Thank you. That was useful. :D

@parmeshwor11

This comment has been minimized.

Copy link

@parmeshwor11 parmeshwor11 commented Jul 3, 2014

Gives this error:
No JDK found. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

@sariantaj

This comment has been minimized.

Copy link

@sariantaj sariantaj commented Jul 17, 2014

if you're using desktop icon, you will need to pass that in the file as enviroment var. e.g.
Exec=env JDK_HOME=/usr/local/java /home/steve/idea-IU-135.909/bin/idea.sh

or if you're calling idea.sh directly, you need to make sure your env vars are correctly set.
e.g. export JDK_HOME=[path] or set it in your .bash_profile

@ultrakain

This comment has been minimized.

Copy link

@ultrakain ultrakain commented Aug 25, 2014

Thank you. That was useful. :+1 :D

@lranasingha

This comment has been minimized.

Copy link

@lranasingha lranasingha commented Nov 10, 2014

Thanks, It worked straight away.

@eneepo

This comment has been minimized.

Copy link

@eneepo eneepo commented Nov 19, 2014

You can simply go to Tools>Create Desktop Entry... to create a luncher as simple as that!

@miteshsc

This comment has been minimized.

Copy link

@miteshsc miteshsc commented Jan 7, 2015

Thank you verymuch!!!

@rohithj

This comment has been minimized.

Copy link

@rohithj rohithj commented Feb 6, 2015

Thank you. This was very useful :-)

@sfriesel

This comment has been minimized.

Copy link

@sfriesel sfriesel commented May 22, 2015

You can also place the file in ~/.local/share/applications

@rohitvvv

This comment has been minimized.

Copy link

@rohitvvv rohitvvv commented Dec 12, 2015

This worked for me.
Exec=env JAVA_HOME=[jdk home path] "/path/to/idea-IC-143.1184.17/bin/idea.sh" %f

@JasonLaw1994

This comment has been minimized.

Copy link

@JasonLaw1994 JasonLaw1994 commented Dec 29, 2015

thanks a lot.

@chalkos

This comment has been minimized.

Copy link

@chalkos chalkos commented Feb 16, 2016

Thanks 👍

@bradzhao

This comment has been minimized.

Copy link

@bradzhao bradzhao commented Mar 1, 2016

Thanks a lot.

@ogdabou

This comment has been minimized.

Copy link

@ogdabou ogdabou commented Jun 8, 2016

thank you :).

@dorienh

This comment has been minimized.

Copy link

@dorienh dorienh commented Jun 20, 2016

Awesome. Thanks.

@lgreenlee

This comment has been minimized.

Copy link

@lgreenlee lgreenlee commented Jun 27, 2016

Thank you!

@zbjdonald

This comment has been minimized.

Copy link

@zbjdonald zbjdonald commented Aug 16, 2016

Thank you!

@zhanghedr

This comment has been minimized.

Copy link

@zhanghedr zhanghedr commented Sep 9, 2016

Thanks!

@MatthewGitter

This comment has been minimized.

Copy link

@MatthewGitter MatthewGitter commented Sep 17, 2016

You can also use Intellij IDEA itself to create the Ubuntu launcher icon, as answered elsewhere:

  1. Launch from commandline. If launching for the first time, setup will ask about creating a desktop launcher icon; say yes. Or else after launching (ie. from the commandline) any time, use the IDEA menu Configure > Create Desktop Entry . That should create /usr/share/applications/intellij-idea-community.desktop
  2. Trigger the Ubuntu desktop search (ie. Windows key), find the Intellij IDEA you used to create the desktop entry.
  3. Drag the icon it's showing into the Ubuntu Launcher.
@seshumadhav

This comment has been minimized.

Copy link

@seshumadhav seshumadhav commented Oct 4, 2016

This was useful. Thanks for taking time to write the tip!

@younisshah

This comment has been minimized.

Copy link

@younisshah younisshah commented Nov 1, 2016

Awesome! Thanks very kindly!

@psycho22

This comment has been minimized.

Copy link

@psycho22 psycho22 commented Nov 21, 2016

where should i copy this in terminal or what?

@BernhardSchlegel

This comment has been minimized.

Copy link

@BernhardSchlegel BernhardSchlegel commented Nov 25, 2016

I think it's easier to

  1. open Intelli J
  2. Click on "Tools"
  3. Click on "Create Desktop Entry..."

... and be done.

@sarwar187

This comment has been minimized.

Copy link

@sarwar187 sarwar187 commented Dec 6, 2016

very useful.. thanks a lot

@bytedaring

This comment has been minimized.

Copy link

@bytedaring bytedaring commented Mar 29, 2017

Thank you 👍

@chudilka1

This comment has been minimized.

Copy link

@chudilka1 chudilka1 commented Mar 29, 2017

Nice, thanks. I even did not have 'Create Desktop Entry' displayed in 'Tools'

@louistang5

This comment has been minimized.

Copy link

@louistang5 louistang5 commented Jun 27, 2017

Thank you. You made my life easier!

My IDEA desktop entry keeps disappearing every time I close the application.
I cannot believe the issue has been around for three years!

@manuellarrota

This comment has been minimized.

Copy link

@manuellarrota manuellarrota commented Aug 15, 2017

Thanks!!! :D

@realslow

This comment has been minimized.

Copy link

@realslow realslow commented Sep 4, 2017

Thank you!!!

@kksven

This comment has been minimized.

Copy link

@kksven kksven commented Sep 6, 2017

@mukeshdutt

This comment has been minimized.

Copy link

@mukeshdutt mukeshdutt commented Oct 20, 2017

Thanks a lot....

@petrindade

This comment has been minimized.

Copy link

@petrindade petrindade commented Oct 30, 2017

Thank you!

@hibikutek

This comment has been minimized.

Copy link

@hibikutek hibikutek commented Nov 16, 2017

To expand on @MatthewGitter 's comment, You can set up the desktop icon/Applications menu item through the launcher's Configure option. If you have an open project, to get to the launcher you have to go to File -> Close Project first, then Configure -> Create Desktop Entry

@OverFlowHSRW

This comment has been minimized.

Copy link

@OverFlowHSRW OverFlowHSRW commented Nov 21, 2017

Thank You! It Works

@zanpen2000

This comment has been minimized.

Copy link

@zanpen2000 zanpen2000 commented Dec 9, 2017

@BernhardSchlegel
Thanks! It Works.

@kerner1000

This comment has been minimized.

Copy link

@kerner1000 kerner1000 commented Dec 30, 2017

I would recommend to use ~/.local/share/applications/ instead, since you probably download Intellij to your user space.

@feekosta

This comment has been minimized.

Copy link

@feekosta feekosta commented Jan 19, 2018

Thanks! It Works.

@ivanglushnev

This comment has been minimized.

Copy link

@ivanglushnev ivanglushnev commented Jan 25, 2018

thank u very much!!!

@Piashsarker

This comment has been minimized.

Copy link

@Piashsarker Piashsarker commented Feb 15, 2018

Thanks for great solution .

@DenizBabat

This comment has been minimized.

Copy link

@DenizBabat DenizBabat commented Feb 23, 2018

Icon was created but it did not work.

@DenizBabat

This comment has been minimized.

Copy link

@DenizBabat DenizBabat commented Feb 23, 2018

firstly, "Tools" > "Create desktop entry / launcher" in the intellij idea program
Then Search your computer and you drag idea icon to launcher. It will work.

@ghfa

This comment has been minimized.

Copy link

@ghfa ghfa commented Mar 1, 2018

Thanks!

@jpcmf

This comment has been minimized.

Copy link

@jpcmf jpcmf commented Apr 3, 2018

Thanks 👍

@claudineilins

This comment has been minimized.

Copy link

@claudineilins claudineilins commented Apr 3, 2018

Show!!!

@christianwoehrle

This comment has been minimized.

Copy link

@christianwoehrle christianwoehrle commented Apr 9, 2018

This still works for ubuntu16.4. Thanks.

@abuabdul

This comment has been minimized.

Copy link

@abuabdul abuabdul commented Apr 26, 2018

Awesome. great

@sudipbhandari126

This comment has been minimized.

Copy link

@sudipbhandari126 sudipbhandari126 commented May 21, 2018

Tools->Add command line launcher
Tools->Add Desktop entry

:)

@dmvs000

This comment has been minimized.

Copy link

@dmvs000 dmvs000 commented May 24, 2018

Thank You !

@nikolovin

This comment has been minimized.

Copy link

@nikolovin nikolovin commented Jun 23, 2018

Thanks!

@krishnajinka

This comment has been minimized.

Copy link

@krishnajinka krishnajinka commented Jul 28, 2018

Thank you !

@alexferreiradev

This comment has been minimized.

Copy link

@alexferreiradev alexferreiradev commented Sep 21, 2018

thanks 👏👏👏 😍

@rluisb

This comment has been minimized.

Copy link

@rluisb rluisb commented Jan 28, 2019

Thanks Rob, this is very useful! Congrats.

@gautam-patadiya

This comment has been minimized.

Copy link

@gautam-patadiya gautam-patadiya commented May 1, 2019

thanks

@Ttituskayz16

This comment has been minimized.

Copy link

@Ttituskayz16 Ttituskayz16 commented Aug 1, 2019

Thank you.

@kopax

This comment has been minimized.

Copy link

@kopax kopax commented Nov 15, 2019

I am on Debian Buster and cinnamon and tools > add desktop entry doesn't add anything. But this worked

@sujanlimbu

This comment has been minimized.

Copy link

@sujanlimbu sujanlimbu commented Feb 10, 2020

Sir thanks a lot

@pkulak

This comment has been minimized.

Copy link

@pkulak pkulak commented Mar 5, 2020

Probably better to install Idea in /opt instead of your home directory if you going to refer to it from a global desktop file. But, regardless, thanks for the info!

@yuri1969

This comment has been minimized.

Copy link

@yuri1969 yuri1969 commented May 13, 2020

FYI the Version entry key stands for version of the Desktop Entry Specification. So its value 13.0 is likely not correct since the current Specification version is 1.5.

@Yossarian0916

This comment has been minimized.

Copy link

@Yossarian0916 Yossarian0916 commented Aug 29, 2020

thanks

@Aoi-hosizora

This comment has been minimized.

Copy link

@Aoi-hosizora Aoi-hosizora commented Oct 14, 2020

Hey! You can use this script that is generated by goland in ubuntu. Although the result is almost same with this gist.

vim ~/.local/share/applications/jetbrains-datagrip.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=DataGrip
Icon=/home/xxx/software/DataGrip-2020.2.3/bin/datagrip.svg
Exec="/home/xxx/software/DataGrip-2020.2.3/bin/datagrip.sh" %f
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-datagrip
@asstronut

This comment has been minimized.

Copy link

@asstronut asstronut commented Dec 20, 2020

thanks!

@razorcell

This comment has been minimized.

Copy link

@razorcell razorcell commented Jan 1, 2021

Thanks !

@kaansan

This comment has been minimized.

Copy link

@kaansan kaansan commented Jan 22, 2021

Thanks a lot !

@mezaisrael

This comment has been minimized.

Copy link

@mezaisrael mezaisrael commented Jan 30, 2021

Thanks!

@8fn

This comment has been minimized.

Copy link

@8fn 8fn commented Jan 31, 2021

Just go to the tools and click in the check box at add desktop entry.

@jyotiranjan97

This comment has been minimized.

Copy link

@jyotiranjan97 jyotiranjan97 commented Jan 31, 2021

I'm not getting any Create Desktop Entry option in my Intellij. My OS is POP 20.04 LTS and I installed from a standalone tar file.
image

@alimagd

This comment has been minimized.

Copy link

@alimagd alimagd commented Feb 2, 2021

You can also use Intellij IDEA itself to create the Ubuntu launcher icon, as answered elsewhere:

  1. Launch from commandline. If launching for the first time, setup will ask about creating a desktop launcher icon; say yes. Or else after launching (ie. from the commandline) any time, use the IDEA menu Configure > Create Desktop Entry . That should create /usr/share/applications/intellij-idea-community.desktop
  2. Trigger the Ubuntu desktop search (ie. Windows key), find the Intellij IDEA you used to create the desktop entry.
  3. Drag the icon it's showing into the Ubuntu Launcher.

great...tnx alot

@8fn

This comment has been minimized.

Copy link

@8fn 8fn commented Feb 3, 2021

I'm not getting any Create Desktop Entry option in my Intellij. My OS is POP 20.04 LTS and I installed from a standalone tar file.
image

Screenshot from 2021-02-03 13-16-03
You need to go in Tools as here at the top of the intellij IDEA. And you will get an option Create Desktop Entry

@jyotiranjan97

This comment has been minimized.

Copy link

@jyotiranjan97 jyotiranjan97 commented Feb 3, 2021

thanks a lot, I solved... :)

@nwaokoron

This comment has been minimized.

Copy link

@nwaokoron nwaokoron commented Feb 6, 2021

changing .svg to .png in ~/.local/share/applications/jetbeans-idea-ce.desktop did the trick

@riteshjaiswal-tomtom

This comment has been minimized.

Copy link

@riteshjaiswal-tomtom riteshjaiswal-tomtom commented Apr 14, 2021

Thank you

@omkz

This comment has been minimized.

Copy link

@omkz omkz commented May 11, 2021

Screenshot from 2021-05-11 21-59-00

@galek

This comment has been minimized.

Copy link

@galek galek commented May 21, 2021

Thanks a lot!

@harshit149

This comment has been minimized.

Copy link

@harshit149 harshit149 commented Jul 25, 2021

Thanks very much!

@Lucas24D

This comment has been minimized.

Copy link

@Lucas24D Lucas24D commented Aug 16, 2021

Thanks a lot.

@vitormateusalmeida

This comment has been minimized.

Copy link

@vitormateusalmeida vitormateusalmeida commented Sep 10, 2021

I think it's easier to

  1. open Intelli J
  2. Click on "Tools"
  3. Click on "Create Desktop Entry..."

... and be done.

Noice

@sahanruwanthasilva

This comment has been minimized.

Copy link

@sahanruwanthasilva sahanruwanthasilva commented Oct 6, 2021

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment