UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. ChromiumOS-Guy
    C
    Offline
    • Profile
    • Following 0
    • Followers 2
    • Topics 2
    • Posts 56
    • Groups 0

    ChromiumOS-Guy

    @ChromiumOS-Guy

    51
    Reputation
    17
    Profile views
    56
    Posts
    2
    Followers
    0
    Following
    Joined
    Last Online

    ChromiumOS-Guy Unfollow Follow

    Best posts made by ChromiumOS-Guy

    • uWolf (LibreWolf)

      Introduction to the uWolf thread.

      This thread is dedicated to discussing the uWolf LibreWolf wrapper, where you can ask questions, help with development, and receive updates on the project.

      Due to many bugs LANDSCAPE is officially unsupported.

      Useful Links

      • The uWolf project is hosted on GitHub and can be found here.
      • The latest stable release is available on Open Store.
        OpenStore

      Buy Me A Coffie:

      support my ongoing opensource projects, including uWolf here: https://buymeacoffee.com/chromiumos.guy
      you have my heartfelt thanks for the donations I received, It means a lot to me and I'm flattered people trust me to this degree.

      ANNOUNCEMENT:

      I am working on nixmanager plugin for lomiri system settings, after the plugin is done I will resume development I have plans for uWolf it is not dead just suspended so I can focus on bringing nix to UT, thanks for the understanding and sorry for the late update.

      Note: will still be updated once in a while to reflect current Librewolf version.

      PLANNED (will come with a massive rewrite i am planning the moment my FP5 arrives and i can develop on platform with VSCodium which will enable me to rapidly debug):

      • app confinment (@Fuseteam has an MR that needs to be upstreamed first but I will go ahead)
        there is already a branch which is compliant and contained, heavily broken though.
      • fix scaling completely with method @Fuseteam shared
        ui_density=0 equals no scaling issues (haven't tested yet so i can't say for sure).
      • rewrite mobile UI (planning on copying fennec's UI close to 1/1 as possible)
        i thought about off-loading UIX changes to an extension but unless i want to do a legacy extension an implementation will take a really long time, so userchrome it is.
      • Completely rewrite codebase for Noble/Stability (I now know what sticks so I'll write the code with that in mind)
        everything will get rewritten in chunks, i will conduct some surveys because i have some ideas that are based on some assumptions that are best confirmed before i act out on said ideas.

      Development Log (DEVLOG)

      Release: v0.11.38

      STATUS: Pending Openstore release

      • Added codec support: added libavcodec58. (only works in Noble!)

      Release: v0.11.37

      STATUS: Released on Github

      • Librewolf version update: now v143.0.3-1

      Release: v0.11.36

      STATUS: Released on Github

      • Librewolf version update: now v143.0.3-1

      Release: v0.11.35

      STATUS: Released on Github

      • Librewolf version update: now v143.0.1-1

      Release: v0.11.34

      STATUS: Released on Openstore

      • Librewolf version update: now v143.0-1
      • Icon Change: chanegd icon to the one agreed on below icon made by AdamSchrey

      Release: v0.11.32

      STATUS: Released on Openstore

      • Librewolf version update: now v142.0-1
      • Pathing fix: Pathing is now relative to the $HOME variable instead of a hardcoded username, which will prevent issues if the user's home directory is not /home/username.
      • Profile Creation Fallback: Fallback is to create a profile if none are found, negating the setup process of previous versions.

      Release: v0.10.31

      STATUS: Released on Github

      • Librewolf version update: now v141.0.2-1

      Release: v0.10.30

      STATUS: Released on Openstore

      • Generalized path to drm: generalized the path from /sys/class/drm/card0-DSI-1/modes to /sys/class/drm/*/modes as well as made sure the old virtual framebuffer system is used as fallback, which will fix the crashing problem on specific devices.

      Release: v0.10.29

      STATUS: Released on GitHub

      • Fixed is_tablet() Function: The function now utilizes the device-info shell command instead of directly reading YAML files. This enhancement improves reliability and bypasses the fact that AppArmor is blocking access to the YAML files and makes the function break.

      • Resolved Profile Change Crash: A significant issue that caused uWolf to crash when writing changes to the profile has been addressed. Although this problem was previously fixed, it required additional confirmation, which is now included in this version to eliminate confusion. The crash was traced back to unusual behavior stemming from the use of both Wayland at the start to obtain screen size with QML and qmlscene before switching to XWayland for the actual application. If this process takes too long, the system loses context and terminates the app. Consequently, if we update the Chrome in the profile, the delay can lead the system to mistakenly believe the app has halted, resulting in a crash.

      • Fallback Scaling Method: The old scaling method, which employed Qt grid units and the environment variable $GRID_UNIT_PX, is now implemented as a fallback. This adjustment aims to prevent crashes on devices that do not support the getprop handle for DPI, ensuring a smoother user experience even in scenarios where DPI scaling fails.

      Release: v0.9.27

      STATUS: Released on Openstore

      • URL Bar Fix: The URL bar now hides correctly when entering fullscreen mode.
      • Tab Bar Fix: Resolved THE issue where the tab bar was interfering with the OSK overlay, by compensating for it. (the one where the overlay overshoots)
      • Keyboard Info Gathering Refactor: The method for gathering keyboard information has been completely refactored. The previous reliance on QML has been replaced with a more efficient Python implementation, streamlining the process.
      • Scaling Adjustment: Transitioned from grid units (Qt) to DPI-based scaling, providing a consistent experience across different devices.
      • Word Ribbon Support Addition: The OSK overlay now supports the word ribbon feature, accommodating the height of the OSK keyboard with or without it.
      • OSK Overlay CSS Refactor: The CSS for the OSK overlay has undergone a complete refactoring, finally ensuring good-ish positioning.
      • Usage Mode Fix: Corrected the is_usage_mode_staged() function, which previously defaulted to Staged mode incorrectly.

      Release: v0.7.23

      STATUS: Released on Openstore

      • Librewolf version update: now v141.0-1

      Release: v0.7.21

      STATUS: Released on Openstore

      • Fixed FP4 Scaling Issues: The scaling issue was resolved by capping the maximum scaling at 2.4 and the minimum at 0.7.
      • Fixed Tab Bar Issues in Landscape Mode: The tab bar was rewritten to dynamically adjust margins based on screen percentage instead of using fixed values.

      Release: v0.7.18

      STATUS: Released on GitHub

      • Librewolf version update: now v140.0.2-1,
        note: updating to this version seems to fix addon button killing OSK.

      Release: v0.7.17

      STATUS: Released on Openstore

      • OSK Overlay Improvement: Enhanced OSK overlay height calculations to reduce overshoot, resulting in a more accurate and user-friendly experience.

      Release: v0.7.16

      STATUS: Released on GitHub

      • XUI Improvement: Simplified UI changes have been implemented, significantly enhancing the overall XUI experience. Although settings cannot be accessed while in landscape mode, this change mitigates previous issues. Additionally, addon management is now available, and the bookmark button (star) has been reinstated.
      • Location Feature: A location policy has been added, providing uWolf with access to location services.

      Release: v0.7.15

      STATUS: Released on Openstore

      • Search Engine Fix: actual solution implemented as suggested by MrOtherGuy here for the Issue here, no more database Injection.
      • Librewolf version update: now v139.0.4-1

      due to little change in overall architecture no flowchart is provided, for up to date flowcharts visit the github repository.

      Release: v0.7.14

      STATUS: Released on GitHub

      • Simplified OSK Hide Mechanism: This release patches osk_config_trigger.uc.js to improve the responsiveness of hiding the OSK overlay while browsing, making it feel less bloated. The change came from shifting focus to the end-user experience and identifying what triggers the OSK to hide.

      Release: v0.7.13

      STATUS: Released on GitHub

      • Search Engine Fix: Alternative Solution: Although the underlying issue persists, I've implemented a workaround by injecting a pre-populated database containing search engine data. This approach circumvents the need for manual configuration, effectively masking the problem. It's essential to note that this is not a bug on my end, but rather a compatibility issue between LibreWolf and fx-autoconfig. I've opened an issue here for those interested in resolving the root cause.
      • Enhanced OSK Hide Mechanism: The On-Screen Keyboard (OSK) hide mechanism has been refined to dynamically respond to URL changes. For instance, when searching on a search engine, the OSK overlay will now automatically hide, eliminating the previous awkward behavior that required manual intervention.

      For those interested in the technical details of the database injection and to address the security concerns raised by @domubpkm, I've included a flowchart that illustrates the management of the LibreWolf profile. This should provide a clear understanding of the process and help alleviate any concerns.

      profile_init_architecture.png

      Release: v0.7.11

      STATUS: Released on github
      Significant updates have been made in the release:

      • OSK Dynamic Reactions: The browser detection mechanisms have been replaced with a more robust approach, utilizing a Dbus monitor to listen for OSK focus events. However, this new method has a limitation: the Dbus monitor can only detect when the OSK gains focus, but not when it loses focus. This introduced a challenge in detecting unfocus events, which has been temporarily addressed by implementing a crude solution involving a tinted overlay over the screen. This overlay is active when the OSK overlay is shown, allowing the system to detect when to unfocus.
      • Bug Fix: The is_tablet function, which resulted in many crashes in the v0.6.10, has been fixed.

      For those interested in a more detailed understanding of the new OSK dynamic reactions architecture, a flow chart is provided.

      osk_architecture.png


      If you have any questions or would like to discuss the development of uWolf, please don't hesitate to ask in this thread. Your input and feedback are valuable to the project. Feel free to share your thoughts, suggestions, or concerns, and I'll do my best to address them.

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: snap pop crackle! ....and nix!? The future of crackle

      @Fuseteam first let me say this is awesome, second if you want help I want to contribute to this.
      I used nixos for while before switching to FreeBSD is has been a joy, so I say this with confidence this is finally the point where we can actually use UT as a full on linux distribution, the influx of packages here will be amazing.

      if you don't mind aside from reading up on the code, I will make a UI QML app so end users can just pick and install/uninstall primitive but any UI is better then terminal when walking.

      looking forward to seeing a repo on gitlab.

      posted in General
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @domubpkm the next step is to wait for Noble, i have somethings i can fix right now
      bit i rather just do one big bug sweep session when switching to wayland.

      as soon as the transition to noble happens i can automatically make the phone install the subsurface patch (until it goes to upstream) and then i can run wayland which means a host of bugs will be gone but i already know some stuff breaks (and my workarounds for the xwayland bugs) so i will probably need to do a refactor of the entire app so i might as well do everything in one big concentrated push.

      edit:
      other then that?, really only cleaning up the UI mostly.
      i can't really do anything else, though i am toying with the idea of making another startup script to mimic webapp-container so webapps can use this (they'll need to be unconfined)
      also finding a way to make uWolf the default browser, after the switch to wayland it should be a lot more usable so it stands to reason people will want to be able to make it open links.

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      Hi someone by the name of AdamSchrey (on Github) created a bunch of nice Icons for uWolf and I would like to hold a vote on which one to choose from the icons he created the icons can be found here

      EDIT: this will be the new logo, hope everyone is happy with the decision 🙂
      raster.png

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @domubpkm There is a security issue, but it's relatively minor and manageable. The problem lies in JavaScript files with privileged execution that can access browser internals and read files on the host. However, the risk is mitigated by the fact that:

      • Librewolf stores sessions in cache, so malicious code would only execute in the next session (after restart)
      • The sensitive files are re-read and replaced every time a session is launched, making it difficult for changes to persist
      • The time window for tampering with the files is small (between verification of the Chrome folder and Librewolf launch)

      To further reduce the risk, encryption and obfuscation of the sensitive files could be implemented, but this would make it harder for me (the developer) to test and debug code. The issue will be addressed once the more significant problems are resolved.

      It's worth noting that Librewolf is considered a secure browser, and the privileged code execution is heavily sandboxed, preventing access to web content among other things. While this issue could potentially be exploited to steal data, the overall security of the browser is still robust, and any other security problems would likely originate from the Librewolf/Firefox source code itself.

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @Simmonz this is the fix @TotalSonic is referring to (kind of) https://gitlab.com/ubports/development/core/qtmir/-/merge_requests/92
      once this is upstreamed firefox and by extension LibreWolf will be able to use wayland directly.

      once its upstreamed I'm also planning on releasing my freetube port.

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @haagch i'm going on vacation today so development is going to be slower then usual combine that with the NixManager plugin for Noble which im also working on, and the fact i just moved all my devices to Noble in preparation for moving uWolf to Noble proper and i can't really do much about it.

      but uWolf is janky like that because of Xwayland if the OSK gives you problems enter the wayland windows (the one with the icon and loading gif) it will redirect you back to the browser but in most cases will also unstick the OSK and make it work again, because somehow Xwayland "unselects" the window that is the browser.

      posted in App Development
      C
      ChromiumOS-Guy
    • Guide to charge limiting your Fairphone 5

      I AM NOT RESPONSIBLE FOR ANY DAMAGE WHATSOEVER TO THE EXTENT LAW PERMITS.

      EDIT: there is a edge case that lets the battery continue charging it seems easy to fix so I'll do so tomorrow, for now just use slow chargers. (or make sure to unplug/replug the phone after it stops charging from there it will work fine)

      I'll start by saying I have no idea if this works for Focal but I haven't tried so it may work.
      also this is a proof of concept you may want to refine this by using a udev rule or whatever else this is just how I got it working the first time so its a known good.

      essentially there is something called user_fcc my take is that the fcc part is "full charge capacity" you can essentially tell the device that it actually has a smaller/bigger battery with this, I did tests on this however and either its using different units then charge_full (which is how you get the battery capacity) or its something else entirely, the point is that if set to 0 battery stops charging if set to big number like 10^6 battery charges again.

      so... heres my setup I did for the proof of concept.

      first start by running:

      sudo mount -o remount,rw /
      

      this is to remount read-only root as read/write.

      make a file and name it charge-control.sh and put it in the /usr/bin directory ( /usr/bin/charge-control.sh)
      change THRESHOLD to whatever percent you want to stop charging at, I put it on 80%

      #!/usr/bin/env bash
      
      # Path to capacity file (adjust if needed)
      CAP_FILE="/sys/class/power_supply/battery/capacity"
      UFCC_FILE="/sys/class/power_supply/battery/user_fcc"
      FULL_CAP_FILE="/sys/class/power_supply/battery/charge_full"
      
      # Threshold to compare against (integer 0-100)
      THRESHOLD=80
      
      # Commands to run
      ON_GE="echo 0 > ${UFCC_FILE}" #echo Battery >= threshold: do X here
      ON_LT="echo `cat ${FULL_CAP_FILE}` > ${UFCC_FILE}" #echo Battery < threshold: do Y here
      
      # Trim whitespace and ensure integer
      capacity=$(tr -d ' \t\n\r' < "$CAP_FILE")
      if ! [[ $capacity =~ ^[0-9]+$ ]]; then
        echo "Error: capacity value is not an integer: '$capacity'" >&2
        exit 3
      fi
      
      # Compare as integers
      if (( capacity >= THRESHOLD )); then
        eval "$ON_GE" && sleep 10 && "$ON_GE"
      else
        eval "$ON_LT"
      fi
      
      exit 0
      

      make sure you set executable permissions sudo chmod +x /usr/bin/charge-control.sh

      now we make a system service to start this script, make a file called charge-control.service at /etc/systemd/system (/etc/systemd/system/charge-control.service)
      and put this into it

      [Unit]
      Description=Battery charge control script
      
      [Service]
      Type=oneshot
      ExecStart=/usr/bin/charge_control.sh
      User=root
      

      now we create a timer to run this every minute because we want it to enable/disable battery charging without us running the service manually.
      so create a file named charge-control.timer in the same directory (/etc/systemd/system/charge-control.timer)
      and put this into it

      [Unit]
      Description=Run charge_control every 1 minute
      
      [Timer]
      OnBootSec=1min
      OnUnitActiveSec=1min
      Persistent=false
      
      [Install]
      WantedBy=timers.target
      

      then enable the timer by running these commands:

      sudo systemctl daemon-reload
      sudo systemctl enable --now charge_control.timer
      

      you may also check that it is working with these commands if you want

      sudo systemctl status charge_control.timer
      sudo systemctl list-timers --all | grep charge_control
      sudo journalctl -u charge_control.service
      

      hope this helps y'all manage you're battery health better.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: Spotify in uWolf

      @AmauryDBZ Hi, developer of uWolf here, on a side note the UI is not modified (in the screenshot) for mobile so this has to be either v0.2.3 which doesn't make any sense or its not loading.
      if you could provide me the startup log of the app I would be grateful.

      for the spotify problem, disable the extensions first uBlock-Origin and Decentraleyes( which is a tracker blocker).
      not to mention LibreWolf by default stops cookies which breaks some sites so you can try to change the security settings and add spotify to the exception rules.

      posted in General
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @domubpkm try to reinstall v0.10.30 i patched it it should work now.

      posted in App Development
      C
      ChromiumOS-Guy

    Latest posts made by ChromiumOS-Guy

    • RE: Guide to charge limiting your Fairphone 5

      @gpatel-fr yeah, I have things to do but in the weekend I'll refine this more the only reason I'm not taking this down is because I'm doing it on mt FP5 and it has not exploded yet... so I may be good until the weekend.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: Guide to charge limiting your Fairphone 5

      @TheTrench said in Guide to charge limiting your Fairphone 5:

      ld work (at least extremely similar if not exactly the same) on most devices, as this is very close to how I manage charge level on Arch on my thinkpad laptop. The exact sysfs path is different, (it's got BAT0 in the

      i'd need to do some testing yes, but this could be implemented as a sort of universal way to charge limit UT devices, if its that wide-spread I might just add this feature in lomiri system settings under battery because this has actually come up during a devsync.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: Guide to charge limiting your Fairphone 5

      @gpatel-fr thanks a lot! after classes I'll make it safe by reading the maximum first from wherever thats stored.

      EDIT: at least on FP5 it seems to draw the same amount if I set it to a large value then if I restart (resets it) so FP5 should be safe currently, again will make it safe though I do not like to trust developers edge case fallbacks to not blow up my phone.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: Guide to charge limiting your Fairphone 5

      @gpatel-fr don't want the bash script in the user directory.
      this is because I mess with the user directory a lot, I didn't change it for the guide because this is a proof of concept and if I have a known good I will use it.

      I opened an Issue on this for indicator-upower fork, paulcarroty (the developer) is aware.
      and I am mostly counting on him to make this into something useful because he already has an app for it.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: Dual external monitor

      @MrClayPole no Lomiri does not like more then one monitor.
      didn't stop me from trying, it made for a cursed mirror setup where on screen is having a stroke and the other was perfectly fine.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @mikirc it works in Noble, just the overlay for the OSK is broken.

      I am doing work on NixManager and cannot two time it with uWolf right now but I will get to it after I finish with that.

      posted in App Development
      C
      ChromiumOS-Guy
    • Guide to charge limiting your Fairphone 5

      I AM NOT RESPONSIBLE FOR ANY DAMAGE WHATSOEVER TO THE EXTENT LAW PERMITS.

      EDIT: there is a edge case that lets the battery continue charging it seems easy to fix so I'll do so tomorrow, for now just use slow chargers. (or make sure to unplug/replug the phone after it stops charging from there it will work fine)

      I'll start by saying I have no idea if this works for Focal but I haven't tried so it may work.
      also this is a proof of concept you may want to refine this by using a udev rule or whatever else this is just how I got it working the first time so its a known good.

      essentially there is something called user_fcc my take is that the fcc part is "full charge capacity" you can essentially tell the device that it actually has a smaller/bigger battery with this, I did tests on this however and either its using different units then charge_full (which is how you get the battery capacity) or its something else entirely, the point is that if set to 0 battery stops charging if set to big number like 10^6 battery charges again.

      so... heres my setup I did for the proof of concept.

      first start by running:

      sudo mount -o remount,rw /
      

      this is to remount read-only root as read/write.

      make a file and name it charge-control.sh and put it in the /usr/bin directory ( /usr/bin/charge-control.sh)
      change THRESHOLD to whatever percent you want to stop charging at, I put it on 80%

      #!/usr/bin/env bash
      
      # Path to capacity file (adjust if needed)
      CAP_FILE="/sys/class/power_supply/battery/capacity"
      UFCC_FILE="/sys/class/power_supply/battery/user_fcc"
      FULL_CAP_FILE="/sys/class/power_supply/battery/charge_full"
      
      # Threshold to compare against (integer 0-100)
      THRESHOLD=80
      
      # Commands to run
      ON_GE="echo 0 > ${UFCC_FILE}" #echo Battery >= threshold: do X here
      ON_LT="echo `cat ${FULL_CAP_FILE}` > ${UFCC_FILE}" #echo Battery < threshold: do Y here
      
      # Trim whitespace and ensure integer
      capacity=$(tr -d ' \t\n\r' < "$CAP_FILE")
      if ! [[ $capacity =~ ^[0-9]+$ ]]; then
        echo "Error: capacity value is not an integer: '$capacity'" >&2
        exit 3
      fi
      
      # Compare as integers
      if (( capacity >= THRESHOLD )); then
        eval "$ON_GE" && sleep 10 && "$ON_GE"
      else
        eval "$ON_LT"
      fi
      
      exit 0
      

      make sure you set executable permissions sudo chmod +x /usr/bin/charge-control.sh

      now we make a system service to start this script, make a file called charge-control.service at /etc/systemd/system (/etc/systemd/system/charge-control.service)
      and put this into it

      [Unit]
      Description=Battery charge control script
      
      [Service]
      Type=oneshot
      ExecStart=/usr/bin/charge_control.sh
      User=root
      

      now we create a timer to run this every minute because we want it to enable/disable battery charging without us running the service manually.
      so create a file named charge-control.timer in the same directory (/etc/systemd/system/charge-control.timer)
      and put this into it

      [Unit]
      Description=Run charge_control every 1 minute
      
      [Timer]
      OnBootSec=1min
      OnUnitActiveSec=1min
      Persistent=false
      
      [Install]
      WantedBy=timers.target
      

      then enable the timer by running these commands:

      sudo systemctl daemon-reload
      sudo systemctl enable --now charge_control.timer
      

      you may also check that it is working with these commands if you want

      sudo systemctl status charge_control.timer
      sudo systemctl list-timers --all | grep charge_control
      sudo journalctl -u charge_control.service
      

      hope this helps y'all manage you're battery health better.

      posted in Fairphone 5
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @haagch on morph it worked for a while on focal, but they seemed to make an update that just breaks it rn.

      on uWolf its a question of how to get location working.

      posted in App Development
      C
      ChromiumOS-Guy
    • RE: change dns servers on noble

      @domubpkm ofc the setting is there you can either enter you're own use the local network dns or choose from the presets provided by Librewolf.

      posted in Support
      C
      ChromiumOS-Guy
    • RE: uWolf (LibreWolf)

      @haagch i'm going on vacation today so development is going to be slower then usual combine that with the NixManager plugin for Noble which im also working on, and the fact i just moved all my devices to Noble in preparation for moving uWolf to Noble proper and i can't really do much about it.

      but uWolf is janky like that because of Xwayland if the OSK gives you problems enter the wayland windows (the one with the icon and loading gif) it will redirect you back to the browser but in most cases will also unstick the OSK and make it work again, because somehow Xwayland "unselects" the window that is the browser.

      posted in App Development
      C
      ChromiumOS-Guy