Reply
Thread Tools
Posts: 1,335 | Thanked: 3,931 times | Joined on Jul 2010 @ Brittany, France
#1
With the Jolla being capable of handling multitask quite nicely and Patchmanager allowing to show more than nine covers, I now have no excuse for not running many applications at a time. This is particularly true as there are no centralized area for feeds, tweets or widgets like weather yet, as there was in Harmattan. Moreover, with my launcher being totally flooded by no less than six pages of unsorted icons (I'm not brave enough to try to sort that), launching applications in advance and then using covers would be appropriate.

So I guess a script with a .desktop file to execute it would be ideal, but I'm not sure how to do that. What is the correct syntax to launch several applications at once from command line? I am no developper and I am not an experienced Linux user either, tried "&&" between app names but it did not work, the terminal being busy with the first app launched. In addition, even launching single applications from terminal seems to produce some errors or bad results in most cases, try "jolla-contacts" for instance.

The plan would be to have two or three .desktop files corresponding to different schemes, like basic stuff, heavy toolkit, home, trip, or anything.

Any help would be greatly appreciated!

Last edited by Kabouik; 2014-04-04 at 22:48.
 

The Following User Says Thank You to Kabouik For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#2
I have no idea what you are talking about
But simple shell syntax:
&& between two commands in one line will wait for first command to return with zero and then execute the second one (if returning <> 0 second command will not be executed).
Try a two/three/many lines script where each command line is termimated with a single &
This will execute each command simultaneously in an own environment; be aware there may be no 'window' output (e.g. if command was a simple shell command with no GUI).
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,335 | Thanked: 3,931 times | Joined on Jul 2010 @ Brittany, France
#3
Thanks for your reply!

This is actually something I found on Stackoverflow too, but did not get the time to try it out yet. And I admit I have absolutely no basic knowledge in how to write scripts.

Well, so I created two files: Launchapps.desktop, which I moved to /usr/share/applications/, and Launchapps.sh which I moved to /home/nemo/Downloads/.

Launchapps.desktop (the Tethering icon is just for testing purpose):
Code:
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Name=Launchapps
Icon=harbour-tethering-gui
Exec=/home/nemo/Downloads/Launchapps.sh
Launchapps.sh (just a set of apps, this is a big load of applications, I'll do some lighter sets when I get it to work ):
Code:
#!/bin/sh

echo "Launching apps..."
jolla-email &
jolla-messages &
fingerterm &
harbour-medard &
battery-monitor &
apkd-launcher /data/app/info.toyonos.hfr4droid-2.apk info.toyonos.hfr4droid/info.toyonos.hfr4droid.common.activity.SplashActivity &
harbour-fbreader &
harbour-communi &
harbour-networkmonitor &
harbour-jolla2gether &
harbour-quicklauncher &
harbour-quickddit &
harbour-tweetian &
harbour-webcat &
jolla-clock &
echo "All apps launched, hopefully."
exit 0
I have run chmod +x /home/nemo/Downloads/Launchapps.sh.

The new icon does appear in the launcher, but when I launch it, the cover will ultimately close (never get it to go fullscreen).

If I run sh /home/nemo/Downloads/Launchapps.sh from SSH, all apps do launch but like if they were launched by another user (all have default settings, messages are empty, emails asks for account registration, and so on). If I run the same command from Fingerterm in the Jolla, then all seems to work correctly, applications run just like they should. For some reason, all jolla-* apps run with cover alpha value of 1.
[Edit: OK, the empty apps symptom was due to the command line being run as root, forgot to return to nemo user prior to running it. Facepalm.]

So it seems my only issues are the Launchapps.desktop file and the alpha value of jolla-* applications' covers. Any ideas on what is wrong? I have tried many things, from Exec=sh /home/nemo/Downloads/Launchapps.sh to Exec=fingerterm "sh /home/nemo/Downloads/Launchapps.sh", with or without the quotes, but no success.

Last edited by Kabouik; 2014-04-06 at 02:52.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:44.