Search code examples
ubuntu-12.04executionlazarus

How do I change the path of where my program is run from?


I have built a program on Ubuntu 12.04 using Lazarus.

My development code is in /home/Laz but my binary is put in /urs/local/bin

However, my program shortcut is on the Desktop.

What I need to do: When the program shortcut is clicked, it all works BUT I want the program to run from within the /usr/local/bin path and NOT from the Desktop where the shortcut is located.

How is this done?

Thanks!


Solution

  • As you've discerned, the way to redirect the path on load is:

    (cd /usr/local/bin && /usr/local/bin/MyCode)

    Once we sort out how to correct the popup prompt, I'll add that in here as well.