R1tschY/harbour-sailfishconnect

Autostart

Closed this issue · 13 comments

Is there any way to make the app start automatically?

I tried to do it myself by just having a systemd user unit launch the app on startup, and while that worked there were bugs like the app becoming invisible (you can see the glass background, but any elements like text or even the pulley menu were not visible, though you could still interact with it I think (the pulley menu did play sound effects)).

It would be great if there was a way to automatically start the app.

At the moment there is no possibility to start the app at system startup.

Can you share your systemd user startup script to reproduce your problems?

I have unfortunately deleted it since, although I later found out that my problem might occur anyways. I think the issues I faced might have been related to me restarting lipstick (that also seems to mess up alien dalvik) so it's probably not that.
I think it was just this though (mostly just copied and modified the depecher unit).

/home/nemo/.config/systemd/user/sf-connect.service

[Unit]
Description=autostart sailfish connect
Requires=lipstick.service dbus.service
After=lipstick.service dbus.service

[Service]
ExecStart=/usr/bin/harbour-sailfishconnect

[Install]
WantedBy=post-user-session.target

I am re-adding it now and seeing if it causes any issues if I don't restart lipstick

@R1tschY I have a video of the graphical glitches if that helps. Quitting and re-opening the application normally fixes this. Other applications do not have this issue (as demonstrated at the end).

mp4 in zip file

Until now I did not had time to look at it. Next week I will try to reproduce your problems. I don't have a idea what the problem is. SailfishConnect does nothing special at the QML level.

No problem, thanks for looking into it. It's not too big of a problem as a simple app restart fixes it, but I though I should mention it anyways.

I tried your way to create a file named /home/nemo/.config/systemd/user/sf-connect.service. But it does nothing when I restart the phone. Do I have to activate it in some way? systemctl start sf-connect can only called from system user which has no sf-connect.service file.

I tested a other way (see https://openrepos.net/comment/28599#comment-28599) where I can't see graphical glitches. Create a file named harbour-sailfishconnect.service in /usr/lib/systemd/user/post-user-session.target.wants/:

[Unit]
Description=SailfishConnect
Requires=lipstick.service
After=lipstick.service

[Service]
Type=dbus
ExecStart=/usr/bin/invoker --type=silica-qt5 /usr/bin/harbour-sailfishconnect
BusName=org.harbour.SailfishConnect

[Install]
WantedBy=post-user-session.target

I found it: systemctl --user enable sf-connect.service
But I can not reproduce your problems. You can maybe try to use the service file from above.

Yes, the command above is what correct (it's using --user as sailfish connect runs as nemo as opposed to root). The glitches only happen after a long time.

Does sailfish connect output anything useful or have a log file? If the graphical issues were to happen again I could try to send that. One thing I notice is that the clipboard sync stops working properly after it bugs out (I use it a lot between my laptop and phone, as well as between Sailfish OS and Alien Dalvik).

Either way, I will try the other way you described on Open Repos and report back should I find any issues :)

Okay I just tried it and for some reason that doesn't work.

Screenshot_20190508_084719

Try to restart your phone. The restart command is probably wrong.

Does the graphical glitches still exist in the recent version?

I think I had them when I was using it, but I stopped using Sailfish OS a while ago so I cannot test it anymore.

Fixed with 5ae6811