[SailfishDevel] Running application with customized environment using invoker
Andrey Kozhevnikov
coderusinbox at gmail.com
Wed Apr 22 11:49:57 UTC 2015
oh sorry, then you can use qputenv function in your main cpp file
22.04.2015 16:38, Dmitriy Purgin пишет:
> Hi Andrey,
>
> I was referring to launching the application with .desktop files. As
> you surely know these reside in /usr/share/applications and are used
> to display applications to user, so that the user could run the
> application by clicking on its icon in Launcher view. I'm talking
> about changing environment of app deployed at end-user device.
>
> Regards
> Dmitriy Purgin
>
> 2015-04-22 17:31 GMT+06:00 Andrey Kozhevnikov <coderusinbox at gmail.com
> <mailto:coderusinbox at gmail.com>>:
>
> In Qt Creator: Projects - Run - Run Environment
> http://i.imgur.com/FArKbn2.png
>
> 22.04.2015 13:23, Dmitriy Purgin пишет:
>> Hi all,
>>
>> I'm trying to make a .desktop file that launches an application
>> with customized LANG environment variable. I came up with the
>> following .desktop file (irrelevant entries removed):
>>
>> [Desktop Entry]
>> Type=Application
>> X-Nemo-Application-Type=no-invoker
>> Exec=app-launcher.sh
>>
>> app-launcher.sh is an executable bash script (irrelevant
>> statements removed):
>>
>> #!/bin/bash
>>
>> LOCALE=ru_RU
>> LANG=$LOCALE appbin
>>
>> This all works fine until I use the invoker. I've added invoker
>> to launcher script like this:
>>
>> #!/bin/bash
>>
>> LOCALE=ru_RU # real code has some checks to detect desired locale
>> LANG=$LOCALE invoker --type=silica-qt5 appbin
>>
>> Now the app starts with specified locale but lipstick shows two
>> windows upon tapping on app icon: the first one appears
>> immediately upon launch, it shows loading indicator for some
>> time, then disappears. The second one is the actual app launched
>> by invoker but it is always minimized.
>>
>> I guess there's no way to modify environment in .desktop file.
>>
>> I've also taken a quick look at invoker sources and it seems it
>> can't modify the environment for the application to be boosted
>> either.
>>
>> Can anyone please guide me if there is a way to do both: change
>> application environment and boost it with invoker?
>>
>> Thanks in advance!
>>
>> Cheers
>> Dmitriy Purgin
>>
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail todevel-unsubscribe at lists.sailfishos.org <mailto:devel-unsubscribe at lists.sailfishos.org>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> <mailto:devel-unsubscribe at lists.sailfishos.org>
>
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150422/5f642c6a/attachment.html>
More information about the Devel
mailing list