[how-to] piggz' advanced-camera as default cam (lockscreen, HW cam button)

asked 2020-02-08 00:50:21 +0300

updated 2020-02-09 15:23:00 +0300

Hey,
I think this small hack is worth to be put in it's own topic.

It enables you to use advanced-camera directly from the lockscreen by swiping up from the bottom (must -of course- be enabled from settings/gestures).

#peterleinchen: advanced-cam as default  
devel-su  

cp /usr/bin/harbour-advanced-camera /usr/bin/harbour-advanced-camera-lockscreen  

cp -ra /usr/share/harbour-advanced-camera /usr/share/harbour-advanced-camera-lockscreen  

cp /usr/share/applications/harbour-advanced-camera.desktop /usr/share/applications/harbour-advanced-camera-lockscreen.desktop  

vi /usr/share/applications/harbour-advanced-camera-lockscreen.desktop  
#-->edit as below:  
#Exec=harbour-advanced-cam  
Exec=harbour-advanced-camera-lockscreen  
NoDisplay=true  
#<--  

vi /usr/share/applications/jolla-camera-lockscreen.desktop  
#-->edit as below:  
#Exec=invoker -s --type=silica-media,silica-qt5 /usr/bin/jolla-camera-lockscreen  
Exec=invoker -s --type=silica-media,silica-qt5 /usr/bin/harbour-advanced-camera-lockscreen  
#<--

systemctl-user restart lipstick

You will find first mentioning on TMO

Okay, here is another hack to also bind the HW cam button to advanced-camera:
(unfortunately after usage there is a delay time of ca. 120s before it works again. anyone?)

vi /usr/share/dbus-1/services/com.jolla.camera.service  
#-->edit as below  
#Exec=/usr/bin/invoker --type=silica-media,silica-qt5 --desktop-file=jolla-camera.desktop -s -n-d 5 /usr/bin/jolla-camera  
Exec=/usr/bin/invoker --type=silica-media,silica-qt5 --desktop-file=harbour-advanced-camera.desktop -s -n -d 5 /usr/bin/harbour-advanced-camera  
#<--
edit retag flag offensive close delete

Comments

Great initiative! I'm guessing that this doesn't take into account pressing the camera-button? I tend to accidentally do that a lot.

Tanghus ( 2020-02-08 02:14:26 +0300 )edit

@Tanghus
No, it did not. But as I like that idea I will add that to above post.
It works once perfectly but unfortunately for the second time only with a long delay (ca. 120s).

peterleinchen ( 2020-02-09 01:35:54 +0300 )edit

Does the binhary has to have a the '-lockscreen' suffix? And then, won't symlinks suffice?

Blizzz ( 2020-02-10 10:51:03 +0300 )edit

Yes, it has. But you may -of course- choose any other suffix to your liking ;)
Symlinks did not work, neither for the binary nor for the directory.

peterleinchen ( 2020-02-10 23:38:19 +0300 )edit
1

Works like charm, thanks for pointing me to this thread! The only issue really is the 120 delay on the button, but assuming that you don't spam the camera button and that one has still quick access through the lock screen, it's no big deal.

A quick note for more inexperienced users: This hack is by far easier to perform if you use the developer mode with Remote connection enabled and connect to your sfos phone via ssh. Then you can copy-paste the commands shown here.

wakey ( 2020-07-07 15:49:16 +0300 )edit