Auto-start for Situations app

Rating: 
4.22222
Your rating: None Average: 4.2 (27 votes)

This app for auto start Situations app (from jolla store) in background after reboot or lipstick restart.
Requires:
harbour-situations2application - should be installed.
python, dbus-python - to see notifications on the event screen.
lipstick-qt5-tools - to overwrite existing notification instead to collect them in the thread

Just activate developer mode before installation and dependencies packages should be installed automatically.

v0.1-17
- Small changes in the script.
- Compatible with v2.1.1.12.

v0.1-15
* Fix for ownership of some files. Now should work for all users. Added Tablet version.

v0.1-14
* Small changes in .spec file, changes for permission.

v0.1-13
* Small changes in .spec file

v0.1-12
* Small changes in .spec file

v0.1-11
* Added checking command if folder "user-session.target.wants" is existing. Now should work for all users.

v0.1-10
* Fixed small mistake in .spec file

v0.1-9
* App completely changed.
* Notification text changed a little bit.
* Will start service file after installation.
* Press on icon for stop/start service. If you will stop service, it will stop Situations app. Just reopen Situations app.
* Work also after reboot and lipstick restart
* Adaptation for 2.0.0.10.

v0.1-7
* Fix of notification icon. Adaptation for 1.1.9.28.

v0.1-6
* Fix of notification icon. Adaptation for 1.1.6.27.

v0.1-5
* Fix of small bug
* Added creating log file when Situation stuck over 90%, you will find it in /home/nemo/situationreboot.log.

v0.1-4
* Added auto-kill and restart of server if it stuck on over 90%, you will get notification about this. Thanks to Moth for Icons. .

v0.1-3
* Icon change to cool one, thanks to Moth.

v0.1-2
* Automatically enabled after installation.

Beware, use it on your own risk !!!

Donation are welcome :)

Screenshots: 
Application versions: 
AttachmentSizeDate
File situationreboot-0.1-15.armv7hl.rpm39.5 KB27/10/2015 - 21:40
File situationreboot-0.1-15.i486.rpm39.7 KB21/03/2016 - 05:34
File situationreboot-0.1-17.i486.rpm39.54 KB02/06/2017 - 18:38
File situationreboot-0.1-17.armv7hl.rpm40.44 KB02/06/2017 - 18:38
Changelog: 

- Small changes in the script.
- Compatible with v2.1.1.12

Comments

Schturman's picture

Please try new version and report here or on tmo...

Thanks.

Moth's picture

Situations app doesn't start on boot.

Can't switch between Active / Inactive (always Active)

How can I help? (1.1.9.28)

Schturman's picture

dev mode active ?

Moth's picture

Yes, sure. :-)

Schturman's picture

can you show me output of this command:
systemctl-user status situationreboot
and this:
pgrep -f situations2application
Because for me all working perfectly...

Moth's picture

That's the result after a manual start this morning:

[root@Jolla nemo]# systemctl-user status situationreboot
Letzte Anmeldung: Samstag, den 24. Oktober 2015, 12:51:37 CEST
situationreboot.service - Situation auto-start
Loaded: loaded (/usr/lib/systemd/user/
situationreboot.service; disabled)
Active: active (running) since Sat 201
5-10-24 07:53:43 CEST; 8h ago
Main PID: 2511 (harbour-situati)
CGroup: /user.slice/user-100000.slice/
user@100000.service/situationreboot.service
└─2511 /usr/bin/harbour-sit...

[root@Jolla nemo]# pgrep -f situations2application
2511

and after next reboot:

[root@Jolla nemo]# systemctl-user status situationreboot
Letzte Anmeldung: Samstag, den 24. Oktober 2015, 15:58:59 CEST auf pts/0
situationreboot.service - Situation auto-start
Loaded: loaded (/usr/lib/systemd/user/
situationreboot.service; disabled)
Active: inactive (dead)

[root@Jolla nemo]# pgrep -f situations2application
[root@Jolla nemo]#
Schturman's picture

I see the service dosabled, this is a reason that it not work after reboot or after lipstick restart.

Activate it manually as root:
systemctl-user enable situationreboot.service
or as User:
systemctl --user enable situationreboot.service
and try again reboot or lipstick restart, after this check the two previous commands.
Or just press on the icon, the icon used for enable/star and disable/stop this service.

Moth's picture

These commands result in:

Failed to issue method call: No such file or directory
Schturman's picture

Don't understand what the problem...
Please, try to uninstall and install again. I reuploaded package...
Install when dev mode activated.

Moth's picture

Reinstall doesn't help. If you make v1.7 accessible again, I could do a crosscheck whether the issue is version dependent (1.1.9.28 / 2.0.0.10) or not.

Schturman's picture

No version depend. Really don't understand what's happens on your device... On my device it working perfectly, tested a few times before releasing.
The old version is not so good and service file changed, also place from root to user and scripts deleted/changed too.

Moth's picture

I'll check again, when 2.0.x is official.

Thanks for your help!

Schturman's picture

I found and fixed a small mistake in the .spec file. Please, try to install a new version.

Moth's picture

No success with 1.1.9.28.

Never mind, I can wait patiently... ;-)

Schturman's picture

Rrrr... did you installed all needed packages ?

Moth's picture

They were installed automatically by the warehouse app without errors. What are the required commands to check manually?

Schturman's picture

can you show me output of this command as root:
systemctl-user status situationreboot.service
and this:
pgrep -f situations2application
And if service disabled, run this:
systemctl-user enable situationreboot.service

Moth's picture

Looks always like this right after boot. SFOS 1.1.9.28

[root@Jolla nemo]# systemctl-user status situationreboot.service
Letzte Anmeldung: Sonntag, den 25. Oktober 2015, 18:56:33 CET auf pts/0
situationreboot.service - Situation auto-start
Loaded: loaded (/usr/lib/systemd/user/situationreboot.service; disabled)
Active: inactive (dead)

[root@Jolla nemo]# pgrep -f situations2application

[root@Jolla nemo]# systemctl-user enable situationreboot.service
Letzte Anmeldung: Montag, den 26. Oktober 2015, 10:56:03 CET auf pts/0
Failed to issue method call: No such file or directory
Schturman's picture

Don't understand why it show missing file...maybe not installed correctly.
Show.me:
rpm -qa situationreboot
rpm -qa python
rpm -qa dbus-python
rpm -qa lipstick-qt5-tools
Also, do you have any profiles in Situations app?

Moth's picture

Here we go:

[nemo@Jolla ~]$ rpm -qa situationreboot
situationreboot-0.1-10.armv7hl
[nemo@Jolla ~]$ rpm -qa python
python-2.7.6-1.3.1.armv7hl
[nemo@Jolla ~]$ rpm -qa dbus-python
dbus-python-1.0.0-1.1.9.armv7hl
[nemo@Jolla ~]$ rpm -qa lipstick-qt5-tools
lipstick-qt5-tools-0.27.61.7-1.69.3.armv7hl

3 profiles, all time-triggered only.

 

Schturman's picture

Also you can try to do what @PawelSpoon did. Uninstall my app, Deactivate dev mode, after a few seconds activate it again and try to install from Openrepos app. He said it help him and all installed and work.

Schturman's picture

All looks ok here...
Ok try to remove my app as root:
pkcon remove situationreboot
and:
1. Open and close Situations app
2. Download my app to your phone.
3. Try to install manually as root:
pkcon install-local -y /home/nemo/Downloads/situationreboot-0.1-10.armv7hl.rpm
4. Show me both outputs from uninstall and install.

Moth's picture

Uninstall:

[root@Jolla nemo]# pkcon remove situationreboot
Entfernen ...
Warten in Warteschl…
Starten
Pakete werden entfe…
Abhängigkeiten wer…
Pakete werden entfe…
Entfernen ...
Warten in Warteschl…
Warten auf Legitimi…
Warten in Warteschl…
Starten
Pakete werden entfe…
[root@Jolla nemo]#

Install:

[root@Jolla Downloads]# pkcon install-local -y /home/nemo/Downloads/situationreboot-0.1-10.armv7hl.rpm
Dateien werden inst…
Warten in Warteschl…
Warten auf Legitimi…
Warten in Warteschl…
Starten
Abhängigkeiten wer…
Pakete werden insta…
Pakete werden herun…                    c
Pakete werden insta…                    o
Heruntergeladenlsituationreboot-0.1-10.armv7hl           Situation auto-start
Installiert     situationreboot-0.1-10.armv7hl           Situation auto-start

Installation ok, but still no auto-start at all...

Schturman's picture

Ohh... I'm really don't understand why it not work for you... :(

Like the last chance, try this:

Also you can try to do what @PawelSpoon did. Uninstall my app, Deactivate dev mode, after a few seconds activate it again and try to install from Openrepos app. He said it helped him and all installed and work.

Moth's picture

Nice idea but unfortunately without success...

Schturman's picture

I thinking about something and I hope it will fix your problem. Please try new version v0.1-11.
And tell me if now work for you. First check if it work or not after installation:
systemctl-user status situationreboot.service
pgrep -f situations2application
Try also after reboot or after lipstick restart.
Please install version v0.1-12

Moth's picture

Installation process not successful. It ends with 'Installation aborted by user' for V0.1-11 and V0.1-12.

Schturman's picture

Ohh.... Did you tried to remove my app first ? And install it like new one ? Also the new version available v0.1-13

Moth's picture

While single install fails with 'Installation aborted by user', it's possible to update from v0.1-10 to v0.1-13, but nevertheless the service stays disabled... :-(

Schturman's picture

I changed permission for specific folder, please try again the new version v0.1-14 and report.

Pages