• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. lkroll
L
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 2
  • Posts 12
  • Groups 0

lkroll

@lkroll

8
Reputation
4
Profile views
12
Posts
0
Followers
0
Following
Joined 29 Apr 2023, 17:27
Last Online 15 Jan 2025, 15:41

lkroll Unfollow Follow

Best posts made by lkroll

  • RE: [HowTo] Alternate way of saving battery when using 4G/LTE

    Battery drain on standby with 4G is still a problem on focal, so I updated the script and created a small systemd service to automatically run the script at startup. Maybe this will be useful for some.


    The greeter in focal is called "com.lomiri.LomiriGreeter" instead of "com.canonical.UnityGreeter". So i changed that in the script and tested that it indeed still works.

    I placed the updated script in:
    /home/phablet/.local/bin

    #!/bin/bash
    
    primary_preference="lte"
    saving_preference="gsm"
    sim_slot="/ril_0"
    
    interface=org.freedesktop.DBus.Properties
    member=PropertiesChanged
    
    dbus-monitor --session "type=signal,interface='${interface}',member='${member}'" |
    while read -r line; do
            if [[ ${line} == *"com.lomiri.LomiriGreeter"* ]]; then
                    read; read; read -r line
                    if [[ ${line} == *"IsActive"* ]]; then
                            read -r line
                            [[ ${line} == *"true"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${saving_preference}" 1>/dev/null
                            [[ ${line} == *"false"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${primary_preference}" 1>/dev/null
                    fi
            fi
    done
    

    Don't forget to make it executable:

    chmod u+x /home/phablet/.local/bin/lte-battery-saver.sh
    

    Ubuntu 20.04 uses systemd instead of upstart so I created a systemd user service in:
    /home/phablet/.config/systemd/user/lte-battery-saver.service

    [Unit]
    Description=LTE battery saver
    Requires=dbus.socket
    After=dbus.socket
    
    [Service]
    ExecStart=/home/phablet/.local/bin/lte-battery-saver.sh
    
    [Install]
    WantedBy=dbus.socket
    

    Now to enable the service:

    systemctl --user enable --now lte-battery-saver
    

    Verify that it is running and up:

    systemctl --user status lte-battery-saver
    

    It should return active and enabled:

    ● lte-battery-saver.service - LTE battery saver
         Loaded: loaded (/home/phablet/.config/systemd/user/lte-battery-saver.service; enabled; vendor preset: enabled)
         Active: active (running) since Sat 2023-04-29 18:44:27 CEST; 1h 11min ago
    

    That's it, now everytime the phone is locked the connection will drop to 2G and back to 4G/LTE once unlocked.
    I tested and verified it on my Oneplus 5T, but it should work on other devices running focal.

    posted in Support
    L
    lkroll
    29 Apr 2023, 18:02
  • RE: Package app for different architectures

    @lduboeuf That does work, thanks for the tip.

    I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

    posted in App Development
    L
    lkroll
    23 May 2023, 18:48
  • RE: How enable "tap to wake" on startup

    @AmauryDBZ I just put the command into a systemd service file under /home/phablet/.config/systemd/user/enable-doubletap.service

    [Unit]
    Description=Enable Double Tap to Wake on Unity Screen after D-Bus is ready
    Requires=dbus.socket
    After=dbus.socket
    
    [Service]
    ExecStart=dbus-send --system --print-reply --dest=com.canonical.Unity.Screen /com/canonical/Unity/Screen com.canonical.Unity.Screen.setDoubleTapToWakeEnabled boolean:true
    Type=oneshot
    RemainAfterExit=yes
    
    [Install]
    WantedBy=dbus.socket
    

    After that enable with systemctl --user enable enable-doubletap.service

    posted in Google Pixel 3a/3a XL
    L
    lkroll
    3 Jan 2024, 14:16
  • RE: Signal Axolotl status in 2023?

    As long as it is still in the works, you could use Cinny or Element to access a matrix server that uses the signal bridge. That way you even get push notifications and combine multiple messengers into one app. I set up my own matrix server to use the whatsapp bridge, but it also work with Signal. If you do not want to self host I can recommend https://tchncs.de/matrix, which has the signal bridge already set up and instructions on their site on how to use it.

    posted in Support
    L
    lkroll
    17 May 2023, 17:11
  • RE: Signal App for UT

    @TheBird Not really. There are a couple guides online about setting up the bridge if you host your own Matrix server, but if you just want to use it you can join a server that already has the bridge set up and ready to go.

    I wrote an example in this topic a while ago: https://forums.ubports.com/topic/8983/signal-axolotl-status-in-2023?_=1700762725683
    I then use Fluffychat built for Focal as my Matrix client, as it has been the most reliable for notifications.

    It is not that hard to do and a really good stop gap solution. Plus you can also bundle Whatsapp and more all in one platform.

    posted in Support
    L
    lkroll
    23 Nov 2023, 18:15

Latest posts made by lkroll

  • RE: Translation from .po file not applying

    After asking in the telegram app dev group I found out that the error was caused by not specifying the property applicationName inside of the MainView. Because of that the gettext domain was set to an empty string, which prevented the translations from getting loaded.

    posted in Translations
    L
    lkroll
    5 Jul 2024, 22:02
  • Translation from .po file not applying

    Hey fellow translators,

    for some reason I can't get any translation to work for my app: https://gitlab.com/lkroll/nostrut.

    Someone contributed a Dutch translation via a .po file but it is not applied in the app.
    I also tried adding a German translation myself and the same thing happens.

    When I try launching the app with clickable in another language it is still in English:

    clickable desktop --lang nl_NL
    

    From what I can tell the .mo files are being installed in the correct place:

    -- Installing: /home/lennart/Git/GitLab/nostrut/build/x86_64-linux-gnu/app/install/share/locale/de_DE/LC_MESSAGES/nostrut.lkroll.mo
    -- Installing: /home/lennart/Git/GitLab/nostrut/build/x86_64-linux-gnu/app/install/share/locale/nl/LC_MESSAGES/nostrut.lkroll.mo
    

    Maybe there is an error on my end and the translation works, but the weird thing is for my other app (https://gitlab.com/lkroll/lighthouse-control) I do not have this problem and my German translation works as expected.

    Can someone enlighten me here?

    posted in Translations
    L
    lkroll
    22 May 2024, 19:14
  • RE: How enable "tap to wake" on startup

    @AmauryDBZ I just put the command into a systemd service file under /home/phablet/.config/systemd/user/enable-doubletap.service

    [Unit]
    Description=Enable Double Tap to Wake on Unity Screen after D-Bus is ready
    Requires=dbus.socket
    After=dbus.socket
    
    [Service]
    ExecStart=dbus-send --system --print-reply --dest=com.canonical.Unity.Screen /com/canonical/Unity/Screen com.canonical.Unity.Screen.setDoubleTapToWakeEnabled boolean:true
    Type=oneshot
    RemainAfterExit=yes
    
    [Install]
    WantedBy=dbus.socket
    

    After that enable with systemctl --user enable enable-doubletap.service

    posted in Google Pixel 3a/3a XL
    L
    lkroll
    3 Jan 2024, 14:16
  • RE: Signal App for UT

    @TheBird Not really. There are a couple guides online about setting up the bridge if you host your own Matrix server, but if you just want to use it you can join a server that already has the bridge set up and ready to go.

    I wrote an example in this topic a while ago: https://forums.ubports.com/topic/8983/signal-axolotl-status-in-2023?_=1700762725683
    I then use Fluffychat built for Focal as my Matrix client, as it has been the most reliable for notifications.

    It is not that hard to do and a really good stop gap solution. Plus you can also bundle Whatsapp and more all in one platform.

    posted in Support
    L
    lkroll
    23 Nov 2023, 18:15
  • RE: Bluetooth on 20.04?

    I also noticed that this functionality is missing. I may try to write a small app that does this on focal as I have already experimented with bluetooth for my lighthouse control app.
    But in the end this should probably be integrated into the core system as it is a feature that you would expect any (non-Apple) Smartphone to be capable of.

    posted in Support
    L
    lkroll
    2 Oct 2023, 07:56
  • RE: Signal App for UT

    @Tobi79 You can also use Matrix with a Signal Bridge as a workaround.

    posted in Support
    L
    lkroll
    18 Sept 2023, 17:42
  • RE: OP5T failed to install UT using Ubuntu and Win10

    @armchairFF Did you upgrade to the latest Oxygen OS before installing UT? I'd also recommend using the snap version of the Installer, as I had the best of luck with that.

    posted in Oneplus 5/5T
    L
    lkroll
    19 Aug 2023, 22:35
  • RE: Get an app to manage SSH, grant permission to use `/bin/sh`

    To spawn a shell the app needs to be unconfined afaik.
    You can accept the error by adding --accept-review-errors to your clickable command and see if it works.

    Keep in mind that unconfined apps need to be reviewed before they can be submitted to the OpenStore.

    posted in App Development
    L
    lkroll
    1 Jul 2023, 22:23
  • RE: Package app for different architectures

    @lduboeuf That does work, thanks for the tip.

    I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

    posted in App Development
    L
    lkroll
    23 May 2023, 18:48
  • Package app for different architectures

    Hello,

    I created a small app with QML + python that needs a precompiled binary to function properly. Therefore I wanted to restrict the architecture to only build for armhf for example. But now when I set the architecture in the manifest clickable prints out this error:

    Clickable is building for architecture "all", but "armhf" is specified in the manifest. You can set the architecture field to @CLICK_ARCH@ to let Clickable set the architecture field automatically.
    

    If I then set 'restrict_arch: armhf' in the clickable.yaml I get the following error:

    The "pure-qml-cmake" builder needs architecture "all", but "restrict_arch" was set to "armhf"
    

    That's probably because the builder is set to pure-qml-cmake in the clickable.yaml which expects the architecture to be set to 'all'.

    But how would I build the app for one arch only then? Do I need to use the 'precompiled' builder and do something else?
    Or can I just compile the app for 'all' and upload the click package for armhf for example.
    I mean technically the app compiles and runs on all architectures, it just won't work properly because it needs the bluepy-helper binary to be compiled for the specific architecture.

    I also thought about just including the binary for every architecture and then within the app detect the correct architecture and use the right binary, but I don't think that is a good approach.

    What would be the best / recommended way to deal with that?

    The code is on my gitlab for reference: https://gitlab.com/lkroll/lighthouse-control

    posted in App Development
    L
    lkroll
    22 May 2023, 21:48