Share /files inside container
Working on enhancing running Daedalus in a container, here are recent posts:
- Container /files save fix — November 24, 2024
- Container session save fix — November 24, 2024
- Remove network menu entries in container — November 24, 2024
...etc.
The Daedalus container is configured to share /files/shared with the main filesystem. However, I have changed that to /files
It is a security measure to restrict sharing to /files/shared; however, security measures restrict usage. We need to find a practical compromise. I have already compromissed by sharing the clipboard. Yes, potentially a security weakness, but extremely useful to be able to share the clipboard.
The primary reason for running Daedalus in a container is to have access to the huge package repository, not for security reasons. So, we can ease up on the security.
File /mnt/wkg/containers/daedalus/configuration has the security settings. I have changed this from "files/shared" to "files":
EC_ACCESS_FOLDER_PATH='/files'
That's it, all of /files is now shared inside the Daedalus container. There are some changes needed to support this, see latest github commits:
https://github.com/bkauler/woofq/commits/1f8d9e1ca5275037488bbe0459d3d72dd469259a/
Looking good!
Tags: easy
Container /files save fix
I posted this morning about a container session save fix:
- Container session save fix — November 24, 2024
Forum member CF-DKS reported that /files folder in the daedalus container does not get saved:
https://forum.puppylinux.com/viewtopic.php?p=136335#p136335
Yes, on the main desktop, /files is a direct link to /mnt/wkg/files, so anything written to it is immediately saved. It is not "running in RAM" as are all other folders.
However, in containers, /files is just a folder and is in RAM. For anything written to it to persist, it has to be saved, to /mnt/wkg/containers/daedalus/.session/files (in the case of daedalus). Fixed, see github:
https://github.com/bkauler/woofq/commit/ab3ae3c65ea58a7891285fa14c0f57defff89372
Tags: easy
Container session save fix
Easy Containers sure is overdue for some TLC! The guys are testing Daedalus running in a container, in Scarthgap, and reporting that changes to wallpaper and icons are not remembered.
It used to work, but when I introduced "run in RAM" instead of direct save to the storage media, container saving got broken. It has been broken for years.
In the Daedalus container, the first time that it is started, scripts 'daedalus.run-once-base' and 'daedalus.run-once-top' are executed, then 'daedalus.run-once-base-flag' and 'daedalus.run-once-top-flag' get created, so at future startups of the container, those "run-once" scripts won't rerun.
When Daedalus container is running, here is content of the '.control' folder:
What has gone wrong when running in RAM, is that those "-flag" files don't get saved. So the "run-once" scripts execute at every startup, which resets desktop icons and wallpaper to the defaults.
I did a quick test, changed the wallpaper, rebooted, and the change is remembered! Github commit:
https://github.com/bkauler/woofq/commit/6ed3f023dd45b8823b166c6b35712cdff666dde1
This is very good news.
Tags: easy
Remove network menu entries in container
Alfons sent me an email about this, requesting that many of the menu entries in the "Network" category are not appropriate in a container. These ones outlined:
OK, removed. Github commit:
https://github.com/bkauler/woofq/commit/6f2ebb7705c8510f24f0e80c6d8ca799bc45595d
Tags: easy
Fix for FoxtrotGPS
Forum member LHESTIA reported a problem with FoxtrotGPS in Daedalus running in a container:
https://forum.puppylinux.com/viewtopic.php?p=136397#p136397
PKGget reported one dependency, 'libgps'; however, package 'gpsd' is also required. The latter is a daemon, /usr/bin/gpsd, and is started by "/etc/init.d/gpsd start" -- except that it failed to start as wants file /lib/init/vars.sh -- which is in the 'sysvinit-utils' package.
Daedalus has a cutdown 'sysvinit-utils', so I installed the full package, then gpsd started, and FoxtrotGPS was able to access it. There is no GPS device connected to my computer, so gpsd returns "0" coordinates. But, it looks like a goer.
A problem with the Daedalus container, when it starts, none of the daemons in /etc/init.d are started. You will have to run "/etc/init.d/gpsd start". I'm wondering if daemons installed in the container, can be started when the container starts -- will have to think about that.
Here is the FoxtrotGPS homepage:
Tags: easy
Quick flip out of container
I posted about getting started with this yesterday:
- Enhanced flip out of container — November 22, 2024
I have now implemented a button in the centre of the screen in the container. The button has a small help button alongside. Snapshot showing the button and help window:
After taking that snapshot, I lightened the background colour a bit, and added text that when flip back into the container, the clipboard is copied in.
Perhaps that button can be made more pretty; right now it can be
described as "utilitarian". Does the job, you definitely know you
are in a container. Click on it and half a second later you are
back on the main desktop.
Here are the relevant github commits:
https://github.com/bkauler/woofq/commit/d927d45ebf4d73a399907b0a670bcb135195b1fb
https://github.com/bkauler/woofq/commit/13e7179786c8824f3b6cbf65e33a19807b51af56
https://github.com/bkauler/woofq/commit/8e06e233dd1ac12bf0e9fa5eb539e824f13384fc
Note: looking around on the forum, I see that the FatDog guys
have implemented a mechanism for running FatDog in a container,
with clipboard transfer, here.
They did that back in 2021.
Tags: easy
Enhanced flip out of container
I posted recently about running Easy Daedalus in a container:
- Run Easy Daedalus in a container in Scarthgap — November 19, 2024
Alfons has tested it and reported success with apps installed in
the Daedalus container.
He has made a request, that the clipboard contents be transferred between the main desktop and the container desktop. Yes, it is doable, but first I have to setup some infrastructure.
Currently, have to hit the key combination ALT+F6 to flip out of the container. First, thing, I want to have a button on the desktop to do that, as an alternative to typing that key combination. But before thinking about the button, need to think how the switch will be accomplished...
I want to create ALT+F6 programmatically, and xdotool immediately comes to mind. There was a lot of messing around trying different things, but ended up with a very simple implementation.
Here is the modification to /usr/local/easy_containers/ec-chroot, at line 143:
https://github.com/bkauler/woofq/commit/a27ec38e7ec618fdc0ff24915a7ed811479ac994
Here is the new /usr/local/easy_containers/flip-out-of-container:
https://github.com/bkauler/woofq/commit/2d71e1b487f6c1cc8a21247b4b618431d512967c
Inside the container, just write anything to /.flip-out-flg and you immediately get flipped back onto the Scarthgap desktop.
Usage of xdotool is very simple, just this:
xdotool key Alt_L+F6
...that sends the key combination to the current window, and from the Scarthgap desktop point-of-view, that is the Xephyr window.
Getting onto midnight. Will relax for awhile and tomorrow think
about a "flip" button in the container desktop, and after that
code to copy clipboard.
Tags: easy
Motorola Moto G75 phone
Bought this today. Reason, want to make videos for YouTube, and
my current phone (until today) can do 1080p at only 23.98 fps
(frames per second) -- even though the documentation says it will
do 30 fps. 1080p is OK, but want higher frame rate.
A couple of days ago, posted about first video upload to YouTube:
- PupMTP file transfer, first video — November 17, 2024
I bought my Huawei Y9 in January 2020, so almost five years old. It is still working and the battery is still good, though it has been recharged daily for five years. Don't like to waste a good phone, but now it will be a backup. So the hunt was on for a new phone...
Want a phone that will do 1080p at 60 fps, and with image stabilization. OIS (Optical Image Stabilization) looks good. There are flagship phones that have lots of features but very expensive. But, I only want to spend just enough to get 1080p @ 60 fps and OIS; the cheapest that I could locate, that is sold locally, is the "Motorola Moto G55 5G"; however, it only has 4GB RAM.
My Huawei phone has 4GB RAM and I don't have any problem with that, but these days even fairly cheap phones have 8GB RAM. So ruled out the G55, though the AU$299 price is very attractive. Going up in price, narrowed it down to these two:
- Nothing Phone 2a 5G
- Motorola Moto G75 5G
The Nothing Phone looks good, a lot for the price; however, two things ruled it out. Price, yes, only AU$426 (128GB storage) or AU$496 (256GB). The two things that ruled it out for me:
- A couple of users reported bubbles forming on the edges of the display. Maybe this was just an early production problem.
- Dimmed screen uses PWM 2160 Hz.
Point-2 is very interesting. Many OLED and LCD screens use PWM (Pulse Width Modulation) to dim the screen. What this does is turn the pixels on and off very rapidly, such that the overall effect for your eyes is that the screen looks dimmer. What does this do to your eyes though, full brightness, then off, alternating rapidly? It leads to eye strain and headaches.
Apparently, some good quality phones use DC dimming. That is, the
DC voltage fed to the pixels is reduced, hence the screen becomes
dimmer.
The Nothing Phone 2a has an AMOLED screen. I did some online searching and found that the Nothing 2a phone uses DC dimming down to 50% brightness, and below that uses PWM at 2160Hz. See here, though, they describe above 50% as "DC-like" which I don't understand:
https://www.youtube.com/watch?v=-A5h7UynfnQ
The Motorola G75 has an IPS LCD screen, and I discovered that it uses PWM for dimming, but at a very high frequency; 40,000Hz. See here:
https://www.reddit.com/r/PWM_Sensitive/comments/1gbunmt/moto_g75_opple_results/
The high frequency is apparently easier on the eyes, though personally I remain to be convinced. Anyway, bought the G75.
Very nice phone. Flat screen (I dislike screens with curved edges), 8GB RAM, 256GB storage, 50MP main camera with OIS, records up to 4K (UHD, 2160p) at 30 fps. etc. Specs here:
https://www.gsmarena.com/motorola_moto_g75-13372.php
Motorola's webpage:
https://www.motorola.com.au/smartphones-moto-g55-5g//smartphones-moto-g75-5g/p
Here is a YouTube video:
https://www.youtube.com/watch?v=DdrnGTm7AKI
The G75 is very new, only got released in Australia this month.
Cost was AU$497, including ear-buds and a soft plastic protection
back. Some dramas transferring data from my old phone, as I don't
use online sync'ing; was able to do it via a USB
cable.
Tags: tech