<div dir="ltr"><div><div><div>Hi Andrey,<br><br></div>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.<br><br></div>Regards<br></div>Dmitriy Purgin<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-22 17:31 GMT+06:00 Andrey Kozhevnikov <span dir="ltr"><<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
In Qt Creator: Projects - Run - Run Environment
<a href="http://i.imgur.com/FArKbn2.png" target="_blank">http://i.imgur.com/FArKbn2.png</a><br>
<br>
<div>22.04.2015 13:23, Dmitriy Purgin пишет:<br>
</div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>
<div>Hi all,<br>
<br>
</div>
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):<br>
<span style="font-family:monospace,monospace"><br>
</span></div>
<div><span style="font-family:monospace,monospace">[Desktop
Entry]<br>
</span></div>
<div><span style="font-family:monospace,monospace">Type=Application<br>
</span></div>
<div><span style="font-family:monospace,monospace">X-Nemo-Application-Type=no-invoker<br>
</span></div>
<div><span style="font-family:monospace,monospace">Exec=app-launcher.sh</span><br>
<br>
</div>
<div>app-launcher.sh is an executable bash script (irrelevant
statements removed):<br>
<br>
</div>
<div><span style="font-family:monospace,monospace">#!/bin/bash<br>
<br>
</span></div>
<div><span style="font-family:monospace,monospace">LOCALE=ru_RU<br>
</span></div>
<div><span style="font-family:monospace,monospace">LANG=$LOCALE
appbin<br>
</span></div>
<div><br>
</div>
<div>This all works fine until I use the invoker. I've added
invoker to launcher script like this:<br>
<br>
</div>
<div><span style="font-family:monospace,monospace">#!/bin/bash<br>
<br>
</span></div>
<div><span style="font-family:monospace,monospace">LOCALE=ru_RU
# real code has some checks to detect desired locale<br>
</span></div>
<div><span style="font-family:monospace,monospace">LANG=$LOCALE
invoker --type=silica-qt5 appbin</span><br>
</div>
<div><br>
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.<br>
<br>
</div>
<div>I guess there's no way to modify environment in .desktop
file. <br>
</div>
<div><br>
</div>
<div>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.<br>
<br>
</div>
<div>Can anyone please guide me if there is a way to do both:
change application environment and boost it with invoker?<br>
<br>
</div>
<div>Thanks in advance!<br>
<br>
</div>
<div>Cheers<br>
</div>
<div>Dmitriy Purgin<br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>