'How to add CLion icon to desktop in Ubuntu

I am using Ubuntu and CLion 2016.1.

I installed it by downloading tar.gz archive.

Now I have such CLion-2016.1/bin folder. For launching Clion I run ./clion.sh.

How can I add CLion icon to desctop?

enter image description here



Solution 1:[1]

Download the file clion.desktop, put it in ~/.local/share/applications and mark it executable. You may need to adapt the Icon and Exec path to point to CLion-2016.1/bin/clion.svg and resp. CLion-2016.1/bin/clion.sh.

This will allow the launcher etc. to find clion, you can also copy the file to ~/Desktop to have it on your desktop.

Solution 2:[2]

After you're done with the installation as described in Install-Linux-tar.txt, you can create a desktop shortcut so that you can launch CLion easily using Windows key and then typing CLion (need not be case-sensitive).

Creating Desktop Entry:

cd to your CLion installation directory; I use /usr/share/clion-2020.1.1; Then do:

$ bash bin/clion.sh

That will launch CLion window. At the bottom right of the window, there's configure, click that and then click Create Desktop Entry. That's it!

Now, you'll be able to search using the term clion after pressing Windows key.


Tested on Ubuntu 19.10 and CLion 2020

Solution 3:[3]

From CLion welcome window select:

  1. customize
  2. All settings
  3. Appearance & Behavior
  4. Menus and Toolbars
  5. Main Menu -> Tools -> Create Desktop Entry...

(if you don't have 'Create...' action available, you can add it using the button "Add Action" on the right side of the search bar)

Solution 4:[4]

Assume that there is no Tools > Create Desktop entry option in the manual, you can create your own desktop icon easily.

  1. Create a new file called "clion.desktop" in your desktop folder
  2. Type the following in it
[Desktop Entry]
Version=1.0
Type=Application
Name=CLion
Icon=path-to/clion.png
Exec=path-to/clion.sh

You can find the corresponding path by:

sudo find / -type f -name "clion.sh"
sudo find / -type f -name "clion.png"
  1. Make "clion.desktop" an executable.
chmod +x clion.desktop

Then you should be able to open clion by double-click it in your desktop.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sitic
Solution 2 Community
Solution 3 Carla Alves
Solution 4 mwck46