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
  • 1,861

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
  • 17,371
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
  • 17,371