When starting from the commandline you give the executable path explicitly: in ./project5 you have the '.' part that identifies the current directory.
A double-click launch from the Desktop behaves quite like using cron jobs: you need to use full pathnames to make it work right. This is a bit weird, actually, because window managers could just as well handle this issue for you, but they don't. A nice programming task could this be for all the open source desktops all around the world.
Last edited by Tinkster; 10-30-2010 at 04:17 PM.