How to add CLion icon to desktop in Ubuntu
Asked Answered
P

5

40

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

Pinwork answered 30/5, 2016 at 10:49 Comment(0)
R
70

You can add a desktop entry to your system directly in CLion :

Main Menu > Tools > Create Desktop entry...

Royall answered 2/10, 2017 at 8:16 Comment(3)
There is nothing like this in tools section in clion 2020.2. I see only create command line launcher. When I click that it says "Launcher script creation is now managed in Toolbox App settings. See the Toolbox App announcement for more details". Can you help me out?Crab
CLion 2021.3.3 - works fine. Anyone who is interested can find it in the Tool section at the top bar.Gardiner
On Ubuntu, after you do this step, use "Show Applications", launch it, and then right-click and pick "Add to Favorites".Karlykarlyn
S
8

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.

Savor answered 30/5, 2016 at 20:42 Comment(2)
./clion.desctop: line 1: [Desktop: command not found ./clion.desctop: line 6: fg: no job control ./clion.desctop: line 7: with: command not found ./clion.desctop: line 8: IDE: command not foundPinwork
I run ./clion.desctopPinwork
P
5

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

Poikilothermic answered 23/5, 2020 at 15:33 Comment(0)
M
1

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)

Menarche answered 7/1, 2021 at 20:49 Comment(0)
O
1

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.

Onomastics answered 29/1, 2021 at 7:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.