[SailfishDevel] Wrong symbolic link

Ove Kåven ovek at arcticnet.no
Fri Mar 14 19:18:32 UTC 2014


Den 14. mars 2014 19:37, skrev Iosif Hamlatzis:
>      ssize_t  chars  =  readlink("/proc/self/exe",full_path,PATH_MAX);

The usual (portable) way to find the executable name is to use argv[0], 
not to read /proc/self/exe. (If it's a relative path, then you may need 
to search for it in the PATH or something.)

If you're using Qt, then you can use something like 
QApplication::applicationFilePath() to get this information.

> when tapping the game's icon to start it the code above returns as a value:
>
> */usr/libexec/mapplauncherd/booster-silica-qt5*
>
>
> which is wrong.

Not really. It's because your program is started by the silica-qt5 
booster, not directly by the OS, which makes loading Silica/QML 
applications faster and use less memory, because the same in-RAM copy of 
Silica is used by all running apps.

I think that if you had used argv[0], you wouldn't have had a problem.

If you're not using QML, update or remove the X-Nemo-Application-Type 
field in your .desktop file to use a different booster, or to not use a 
booster at all.



More information about the Devel mailing list