0

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!

itsols
  • 5,406
  • 7
  • 51
  • 95
  • Have you tried this? http://stackoverflow.com/questions/786376/how-do-i-run-a-program-with-a-different-working-directory-from-current-from-lin – brandonscript Dec 10 '13 at 17:57
  • @r3mus Thank you for your input. I got it working. However, each time I click it, it asks if I want to run or view the contents. Can't we run it without asking any question? Please post an answer so that I may select it and close the question. My own script has this: `(cd /usr/local/bin && /usr/local/bin/MyCode)` – itsols Dec 10 '13 at 18:51
  • What's the actual message dialog text you're getting? – brandonscript Dec 10 '13 at 18:57

1 Answers1

0

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.

brandonscript
  • 68,675
  • 32
  • 163
  • 220
  • To auto-run the script on clicking it, open nautilus, and under Preferences there's an item to specify executing text files. I found it from here: http://ubuntuforums.org/showthread.php?t=1934693 – itsols Dec 11 '13 at 01:55