I have a program that works correctly if:

  1. I run it from the command line in its own directory.
  2. I run it from the command line from wherever, using cd /path/to/prog && ./prog.
  3. I double-click it in Caja.
  4. I right-click it in Caja, pick Make Link, and double-click the link.

It doesn't work if:

  1. I run it from the command line from a different directory with the correct relative path. (Many program-specific errors are given about how it can't find files that are in its own subdirectories.)
  2. I move the link mentioned above to the desktop, and double-click it there. (A window frame pops up and immediately disappears, without even being filled in.)
  3. I make a Launcher on the desktop and point it to the program. (Ibid.)
  4. I make a Launcher on the desktop and point it to cd /path/to/prog && ./prog. (Ibid.)

AFAICT all the non-working methods are due to the cwd being incorrect.

So, how do I simply make a working shortcut to this program on the desktop?

Or, how can I set a shortcut's cwd properly, without additional workarounds like making a one-liner bash launcher script and making a shortcut to that?

Linux Mint 18.1 MATE 64-bit.

Update: The launcher interface doesn't seem to have a Path option:

enter image description here

  • OK. btw journalctl -b only confirmed what I'd figured out (that it was in the wrong cmd) already--it was full of identical segfaults from the program in question.
    – Kev
    Commented Jan 24, 2017 at 16:39

1 Answer 1


You can create it with the launcher UI shown, and then edit the resulting ~/Desktop/*.desktop file yourself to add a Path=... line. What doesn't work is if you put Exec=prog_name rather than duplicating the whole path. So it has to look like:

  • Exec=prog_name works too as long as prog_name is in your PATH Commented Jan 24, 2017 at 16:38
  • I think if it were in my PATH then the whole program would work in the first place...anyway, duly noted.
    – Kev
    Commented Jan 24, 2017 at 16:40

You must log in to answer this question.

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