4

Please see the edit at the bottom!

I have followed here for adding an item to the launcher. Here are the contents of my new .desktop file:

[Desktop Entry]
Version=1.0
Name=OpenRefine
Comment=2.6-rc.2
Path=/home/foo/openrefine-2.6-rc.2
Exec=/home/foo/openrefine-2.6-rc.2/refine
Terminal=true
Type=Application
Categories=Utility;Application;

(no icon supplied by the application so none included, hopefully a default one will be used). desktop-file-validate passes without errors. So does desktop-file-install. Yet the new program does not show in dash :(

I have started out saving the .desktop file to .local/share/applications, so it is also confusing whether it should remain there after the desktop-file-install or rather it should have been created in some temporary place to begin with, rather than there.

Thanks for clarifying how this should be done.

Edit:

Notably, this program, OpenRefine, when started in a terminal, does not open a UI window. It only starts a web server and launches the default browser against it.

matanox
  • 2,293
  • 1
    Your Exec= is wrong, /home must start with slash – Sergiy Kolodyazhnyy Jun 28 '16 at 05:13
  • It is correct in the real file, I just introduced that error while replacing the real local file path for pasting the question – matanox Jun 30 '16 at 18:18
  • 1
    In the real file, do you by any chance use ~? – Jacob Vlijm Jun 30 '16 at 18:42
  • Did, you try to do a reboot after you created that file? Sometimes after a reboot the icon which was missing in the dash before is then there. – Videonauth Jun 30 '16 at 18:44
  • @JacobVlijm I do deserve the question now :-) but no: the path is valid. I would like to also assume the verification command would otherwise issue an error. But double-checked the path now just to be on the safe side ― it is fine. – matanox Jun 30 '16 at 19:45
  • I've added a crucial edit and re-titled the question now. We can all remove our comments here I guess now. – matanox Jul 15 '16 at 18:44

3 Answers3

3

You can use "Main Menu" app (install with sudo apt install alacarte).
Run it from Dash or from Terminal (alacarte).
Then you can add launcher item:

  1. Choose category from list on left
  2. Click "New item" button
  3. Insert needed information into fields
  4. Click "OK" and close.

Now you should have your icon on launcher.

Ven3k
  • 71
1

Disclaimer: This is very similar @Ven3k but more complete, with a lot of screenshots. Also is very similar to this and this answers but specifically for Openrefine.


You can create a shortcut to any program and eventually add it to dock/taskbar/launchbar by:

  1. Go to Main menu program (alacarte package): From Show Applications or just hit Super (win) key.

    screenshot

  2. "New item", complete the filename, browse for the exacutable program:

    screenshot

  3. Optional: Add a cute icon: Clic on the icon and search for it. For openrefine you can download one or you will find one on myOpenRefineFolder/webapp/modules/core/images/logo-gem-126.png

    screenshot

    screenshot

    screenshot

  4. Optional Add it to dock/launchbar/taskbar:

    screenshot

    screenshot

If you clic and nothing happen try to run the same command path directly on a terminal. If another Openrefine instance (or other program) is using the same port you'll get a

Error: Something is already running on http://127.0.0.1:3333/ but doesn't seem to be OpenRefine. Maybe a proxy issue?

Find the culprit with ss -tlpn | grep 3333. If you get a PID you can then kill PID it.

Pablo Bianchi
  • 15,657
1

I use

sh -c "cd /home/foo/openrefine-2.6-rc.2 && ./refine" 

in the place of

/home/foo/openrefine-2.6-rc.2/refine

in the code above.

You can also use $HOME instead of /home/foo, where foo is your username.

Pablo Bianchi
  • 15,657
Martin Milan
  • 73
  • 2
  • 6