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

3
  • Why not just Exec=/opt/Gogland/bin/gogland.sh?
    – muru
    Dec 24, 2016 at 9:19
  • It worked, thanks muru, but the icon is still missing. Dec 24, 2016 at 9:44
  • You have a stray icon in your icon path.
    – muru
    Dec 24, 2016 at 9:45

3 Answers 3

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

3
  • 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 8, 2017 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, 2021 at 8: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. Oct 13, 2022 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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .