Startup applications on boot

As the subject says I’m looking for an application that allows me to auto start, launch, etc. stuff on startup.

I’ve tried to search for existing apps or patches offering this functionality, and can only find two applications in the Openrepos, none in the Jolla store or the Chum repository.
One of the applications on Openrepos won’t install because it’s it’s too old (2016, looking for a nemo account), the other refuses to launch jailed applications on boot.

I prefer to reboot as little as possible, but when I do, I find certain applications such as the clock, and several others (E-mail, Messages and MeeCast) to have become part of my daily routine: I like having them started, and their tiles even in the same order every single time. (Call me crazy :stuck_out_tongue: )

So am I missing anything obvious, like it having been integrated in the Settings for years now, or is this simply not possible with the current applications out there?

1 Like

Sounds like a task for Oneshot.

Previously I used ‘takeoff’, but I have not had any use for it since years. I see it is the app you mention which doesn’t support jailed apps.
I’d suppose it should not be difficult to fix this issue, but currently I do not have any time…

2 Likes

I made a Feature Request for this:

4 Likes

Thanks for your time on that @nephros , I’ve not had the time myself to look further into this issue/limitation or this thread, but I’m happy you’ve filed a feature request!

It seems like there doesn’t seem to be any easy way then, either, to start jailed applications?
I wouldn’t mind writing an “@reboot” kind of script and run a cron daemon or some such for it, but it seems to me like that wouldn’t even be possible? Mind you, I’m not a programmer, but I’ve got experience in running Linux servers at least :sweat_smile:

Thing is, everything started from anything not-Lipstick, i.e. Terminal, systemd, cron etc. etc. is per default/per design not considered by SailJail.

Only UI apps (having a .desktop file) launched via the Lipstick desktop are.

I’m rather fuzzy on the details here, but there are components like the (Lipstick/Jolla-Home) LauncherModel, invoker, and sailjail involved which parse the .desktop file, set up the Jail, DBus names, ask for permissions etc.

Now, you can replicate this behaviour by using the sailjail command line tool.

But as you can see calling that is a mix of giving the path to the .desktop file, launching the binary.

AFAIK there is no clear mapping of whatever Lipstick does to doing the exact same using sailjail (the command). I may be very wrong here however.
If there is, apps like Takeoff, or systemd services like described here may be modified to launch everything correctly.

Heck, if you must, maybe even systemd’s xdg-autolaunch-session might work.

Still all these seem a bit like hacks, and a proper API or even functionality like reading ~/.config/autostart by Lipstick itself would be much better IMO.

Agreed.

I’ve managed to run the Meecast app by running this:

/usr/bin/firejail --quiet --private-bin=harbour-meecast --whitelist=/usr/share/harbour-meecast --whitelist=/usr/share/applications/harbour-meecast.desktop --whitelist=${HOME}/.local/share/harbour-meecast --whitelist=${HOME}/.config/harbour-meecast --whitelist=${HOME}/.cache/harbour-meecast --profile=/etc/sailjail/permissions/Internet.permission --profile=/etc/sailjail/permissions/Location.permission --profile=/etc/sailjail/permissions/Base.permission – /usr/bin/harbour-meecast

(it was the output of ps -ef | grep meecast)

But it’s convoluted, doesn’t work for all apps, and feels like it might break on each OS or app update.
So I hope something happens with your feature request, and until then I’ll train my muscle memory to manually autostart applications :sweat_smile:

1 Like

Might be a stupid question, but isn’t Situations app something to take into consideration? Have not even looked at it for many years, so I don’t really know. It was just a thought.

2 Likes

There are no stupid questions, thanks for the suggestion!

Situations seems to have it’s own issues, the Jolla store version currently fails to install, there’s a Github version from September last year which seems to be a 64-bit RPM
Also it’s description mentions that due to Jolla’s policies it won’t restore itself after reboot.
Still might be worth checking out though, app looks good, will try soon when I get some time!

If I remember correctly, there also was an ‘Autostart for Situations’ plugin or something.

@eson Situations was a good suggestion, thanks for that!
I’ve downloaded the last stable from the Github page, and the setup already asked if I wanted to install the Autostart module; it required me to temporarily enable Untrusted Software, but nothing more than that and it does what it says on the tin!

Now I couldn’t find a trigger to start at a clean boot or a reboot, and since my Xperia 10 III sometimes requires a reboot just to get the audio to work again something time or location based won’t cut it.
However I’ve made a trigger based on “Do Not Disturb” (since this is a function I never use), so now, after a clean boot I press DND on and off again, and it starts the apps I want; just not yet in the order I want them to, but you can’t win them all :yum:

So while the feature request would still make things better; with that implemented I could start the apps in the right order and without requiring Situations, still I might find more use cases for Situations, and this is already a step in the right direction :hugs:

1 Like

Doesn’t Utilities App work to fix the audio bug? It does for me, and if not I have this command on a qCommand desktop launcher…
systemctl --user restart pulseaudio
…works every time.

Most of the time, yeah! Sometimes though, to get proper audio routing back to the 3.5mm port and such, it does really want a reboot unfortunately :zipper_mouth_face:

No worries though, I am planning on upgrading from a III to a V when SFOS becomes more capable of being a daily driver on that device (battery status and camera, in particular)!

Yes, me to waiting for the V to get complete… and of course, the C2.