9

Gogland was released as preview yesterday. And I, being new to Linux have problem making a launcher for it using .desktop file.

I have never created .desktop file before, and I am running Ubuntu 14.04

So, this is what I've got right now.

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec= cd /opt/Gogland/bin && ./gogland.sh
Name=Gogland
Comment=comment here
Icon=icon /opt/Gogland/bin/gogland.png

Permission is set to executable, and it is located in: ~/.local/share/applications

The problem is that I cannot seam to find the gogland in application launcher widget after reboot. To start a program I go to bin folder and execute gogland.sh

ivan marchenko
  • 253
  • 1
  • 3
  • 6

3 Answers3

17

You can try to create a desktop file similar to the rest of Jetbrains products, something like this:

[Desktop Entry]
Version=1.0
Type=Application
Name=Gogland
Icon=/opt/Gogland/bin/gogland.png
Exec="/opt/Gogland/bin/gogland.sh" %f
Comment=The Golang IDE
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-gogland

Anyway, Jetbrains IDE's usually comes with a builtin option to create launcher shortcut from its startup/initial screen. I think it's the best and simpler solution.

Builtin create shortcut

dgonzalez
  • 6,910
  • 5
  • 19
  • 27
  • 5
    Note that if you already have a project open you have to close the project first to get back to this page. File > Close Project – Tim Abell Nov 08 '17 at 19:59
  • 1
    Since Goland 2020 (I have 2020.3.1) you odn't have that option there anymore, not sure if it's a bug. As a workaround I searched for "Desktop entry" in settings, set a temporary shortcut to it, applied, pressed the shortcut and then it worked :) – ianaz Jan 21 '21 at 08:25
  • 1
    @ianaz: While I thank you for this comment which solved my problem, after creating the Desktop Shortcut for GoLand using your method, I moved to do the same for DataGrip, and noticed a tiny "gear" button in the bottom left corner of the "Welcome" window, which has the "Create Desktop Entry" command in it, and the same is true for GoLand. I'm looking at GoLand 2022.2.4, so they might have added it later. Anyways, thanks. – Mostafa Zeinali Oct 13 '22 at 18:49
1

I don't have enough reputation to add a comment, so I'll create a new answer that is just an addition to the response from dgonzalez. With recent Jetbrains products, you can also go to the Tools menu and select 'Create Desktop Entry...' after that, you can load the product from the applications menu. You can also use the entry in that menu to pin the product to the panel.

apmac
  • 51
  • 3
0

I used this link to install the toolbar and using this I install the latest 2020.3.1 version. Please note that the IDE tar file must be downloaded and extracted to /opt folder for the installation to work. Only difference is it install with the Desktop launcher.

https://www.jetbrains.com/help/go/installation-guide.html#toolbox