Here are some pictures from a night time bike cycling round-trip through the streets of Copenhagen. The pictures are taken with a handheld digital camera. The pictures are straight-out-of-camera (SOOC). No filters. No editing. No AI.













Here are some pictures from a night time bike cycling round-trip through the streets of Copenhagen. The pictures are taken with a handheld digital camera. The pictures are straight-out-of-camera (SOOC). No filters. No editing. No AI.
Here in Denmark, to my knowledge, there is no active FreeBSD user groups. We have had BSD and UNIX user groups in the past, but for reasons, unknown to me, they have become inactive or dissolved, despite that their inactive websites and public listings still exist. Examples of these are BSD-DK and DKUUG. DKUUG was probably the most influensive and active over the years and, to my knowledge, arranged meetings, workshops and conferences, such as Open Source Days.
While not being a user group, we also had a yearly 7 day camp type conference The Camp, which existed until recently.
We do have other user groups, that is more or lesss related to FreeBSD user groups.
Linux comes to mind as one of the first related systems, but for reasons, unknown to me, many, if not almost all, of our Linux user groups (LUGs) have also become inactive or dissolved. I have only head of Linux Roskilde, which should have regular meetings at the local university. Wikipedia has a list of some of the memorable LUGs. I remember the large SSLUG and the yearly Linuxforum conference from the good old days.
If I look at non-operating system related user groups, there is the more recently popular topic of technology, hacking and security. When I mention hacking, I mean it in its positive sense, where users invent, improve and change systems and technology. We have a very active user group Cryptohagen in Copenhagen which has been meeting monthly and discussing privacy related topics for 10 years.
If I look at more camp like conferences, we have a yearly 7 day camp type conference Bornhack, which, to my knowledge, attract hackers (in a positive sense), who like to build things and share diversity in a wide range of technical topics. We also have SommerHack, which I believe, is very similar. We have Labitat in Copenhagen, a very technical hacking or construction user group. It has been around for a long time, seems very active, and seems to be a very friendly user group.
If I look over to more web related user groups, WordPress Copenhagen comes to mind. This is a somewhat active user group, who announces their meetings on MeetUp.
I can see, how the need for physical FreeBSD user groups has become less important in modern post-covid times, because users can seek and find practical advice on Internet platforms, such as FreeBSD Forums and the FreeBSD server on Discord. While these platforms are brilliant at solving technical issues, they are not so brilliant, when it comes to real life applications of solutions, career opportunities and social networking.
I have been thinking about creating a FreeBSD user group for some time. The purpose would be to acknowledge the value of sharing a common interest or enthusiasm and meeting in real life in an informal and friendly environment to discuss FreeBSD, BSD and UNIX related subjects and projects over a nice cup of coffee with or without a computer at hand.
The name for such a FreeBSD user group should probably be descriptive and follow the naming tradition for user groups, that can also be seen on FreeBSD User Groups. This has lead me to the name Copenhagen FreeBSD User Group with the shorter abbreviation CFUG.
I would love to hear your thoughts about a creating a FreeBSD user group for users and enthusiasts in Copenhagen. You might even be interested in joining such a group or contributing with speaks on different topics.
Some text files has line breaks, that might look good on fixed width screens, but can not be used as paragraph in other editing software. The is cause by line breaks.
$ cat input.txt
The computer was a powerful WOPR machine for game simulation.
You can play a nice game of chess or an exciting war game.
This one-liner will replace line breaks with space and then remove any double spaces. It will also make sure, that the file ends with a new line, so it meets the POSIX standard definition of a text file.
$ (tr '\n' ' ' < input.txt | sed 's/ */ /g'; echo) > output.txt
The result is one clean paragraph, that will scale to any screen width or be used in other editing software.
$ cat output.txt
The computer was a powerful WOPR machine for game simulation. You can play a nice game of chess or an exciting war game.
My requirements for a compact camera for fun and creative point-and-shoot photography in 2025. Updated 2025-08-08.
These requirements are really not that much to ask for, when thinking of the amount of optical and computing technology, that have been put into modern cameras. However, despite of this, the engineers of many cameras, even very expensive ones, still fail to meet basic requirements.
I have found the following candidates for a compact camera, that meet the requirements to an acceptable degree.
I have found some candidates for a compact camera, that unfortunately not quite meet the requirements, such as lack of built-in flash and poor low light performance.
There are smaller and light-weight compact DSLR cameras, that could be an alternative to a compact camera. Benefits of these are more control of exposure, lens options, flash options and wider applications. The camera might be performing better in more different situations, but can be more expensive, less convenient and more intrusive.
There is no doubt, that mobile phones has taken the market for compact cameras of the 00’s. Unfortunately, the many years of development since 2010, the mobile phone cameras still performs worse, when it comes to portraits of adult people. This is caused by the tiny lens and small amount of light, that reach the sensor. This lack of light makes the resulting portrait rely heavily on digital optimization and post processing, which still comes no where near a real camera. The mobile phone pictures also suffer from distortion, face and skin modifications, that result in fake portraits and pictures.
Is it possible to reduce or disable swap memory on FreeBSD? In this example, 32 GB swap is enabled by using 16 GB on each of 2 SSDs. I would prefer this to be closer to 8 GB by using 4 GB on each of 2 SSDs.
Get information about currently active swap devices and sizes.
# swapinfo -h
Device Size Used Avail Capacity
/dev/nda0p3 16G 0B 16G 0%
/dev/nda1p3 16G 0B 16G 0%
Total 32G 0B 32G 0%
Get information about partitions on disks and GEOM providers. Each device and partition has a unique identifier, that can be used to make changes.
# gpart show
=> 40 4000797280 nda0 GPT (1.9T)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 33554432 3 freebsd-swap (16G)
34088960 3966707712 4 freebsd-zfs (1.8T)
4000796672 648 - free - (324K)
=> 40 3907029088 nda1 GPT (1.8T)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 33554432 3 freebsd-swap (16G)
34088960 3872940032 4 freebsd-zfs (1.8T)
3907028992 136 - free - (68K)
The devices can be listed. This also shows the naming convention for the partitions.
# gpart status
nda0p1 OK nda0
nda0p2 OK nda0
nda0p3 OK nda0
nda0p4 OK nda0
nda1p1 OK nda1
nda1p2 OK nda1
nda1p3 OK nda1
nda1p4 OK nda1
Move swapped pages out from swap devices and disable them.
# swapoff -a
swapoff: removing /dev/nda0p3 as swap device
swapoff: removing /dev/nda1p3 as swap device
If you want to re-enable swap, it is as easy as reverting that.
# swapon -a
swapon: adding /dev/nda0p3 as swap device
swapon: adding /dev/nda1p3 as swap device
Is it possible to reduce the swap partition on each SSD and then have ZFS use the free space? Is it possible to split the partitions?
Delete or comment out the swap partitions from the static information about file systems. This ensures, that they do not get re-mounted during boot.
# nano /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
#/dev/nda0p3 none swap sw 0 0
#/dev/nda1p3 none swap sw 0 0
proc /proc procfs rw 0 0
Is it possible to delete the swap partition on each SSD and then have ZFS use the free space? The handbook does mention growing partitions, but it is not clear, if ZFS can in fact grow directly or it will be necessary to re-create partitions, format, import and encrypt.
The Bourne shell, also often referred to as /bin/sh or just sh, has been a default shell for users on FreeBSD for many major versions, while C shell was the default shell for root. From FreeBSD 14, the default shell for root is the Bourne shell.
The shell for a user in FreeBSD can be changed with the chsh utility.
The Bourne shell in FreeBSD is configured by editing the global configuration file /etc/profile and/or the local user configuration file .shrc. These files contains commands, that will be executed, when the shell is started, such as when the user logs into the system.
In this example, the global configuration sets the blocksize for default file operations, ccache settings, the default editor, he default pager and a prompt. The prompt will include user, host and superuser status.
# nano /etc/profile
BLOCKSIZE=K
CCACHE=1
CCACHE_DIR=/var/cache/ccache
EDITOR=/usr/local/bin/nano
PAGER=less
VISUAL=$EDITOR
PS1='\u@\h\$ '
export BLOCKSIZE CCACHE CCACHE_DIR EDITOR PAGER PS1 VISUAL
If the user would like to add or change custom settings, then this can be set in the local user configuration file. If this is not relavant, the file should be deleted, because it does contain settings, that could interfere with the global settings.
$ rm .shrc
# rm .shrc
The Bourne shell can now be tested. In this example, a user log in and switch to root.
$ whoami
jennifer
$ su -
Password: Pencil
# whoami
root
# echo $EDITOR
/usr/local/bin/nano
There are different kinds of shells, such as login shells and sub-shells. The sub-shells are also known as non-login shells. The difference is, that a login shell reads global configuration files, while sub-shells just inherits the settings from the original shell. In this example, the first shell will be a login-shell, while the second will be a sub-shell.
FreeBSD/amd64 (wopr) (ttyv0)
Login: stephen
Password: Pencil
__ __________ ____________________
/ \ / \_____ \\______ \______ \
\ \/\/ // | \| ___/| _/
\ // | \ | | | \
\__/\ / \_______ /____| |____|_ /
\/ \/ \/
Greetings, professor Falken. How about a nice game of chess?
$ sh
$ su stephen
$ logout
$ logout
doas is a utility, that can permit users to execute commands as root or as another user. Groups as well as users can be permitted to do.
# pkg install doas
The manual for doas is nice and simple.
# man doas.conf
In this example, I will configure doas to permit members of the wheel group to use the FreeBSD service command script, that can start and stop services, such as an nginx web server, without a password. This is a safe and trivial command to disable password requirement for.
# nano /usr/local/etc/doas.conf
permit nopass :wheel as root cmd service
If I wanted to limit, which arguments, that can be passed to the command, I could specifiy this with the args feature.
# nano /usr/local/etc/doas.conf
permit nopass :wheel as root cmd service args nginx onestart
$ doas service nginx onestart
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx
Be aware, that doas requires, that the command is matched exactly. The following definition will not work.
# nano /usr/local/etc/doas.conf
permit nopass :wheel as root cmd /usr/sbin/service args nginx onestart
$ doas service nginx onestart
doas: Operation not permitted
Do not use sudo for FreeBSD. I tested sudo for FreeBSD and despite, that it is widely used in online procedures and documentation, I had to conclude, that it is somewhat poorly documented and simply does not work properly for FreeBSD.
# visudo
david ALL=(ALL) NOPASSWD: /usr/sbin/service nginx onestart
One thing, in particular, that did not work, was the ability for a member of the wheel group to execute a trivial safe command as root without the requirement for a password. sudo kept asking for password.
$ id
$ sudo service nginx onestart
Password:
sudo: a password is required
I recommend deinstalling sudo and instead using security/doas. This is also recommended on the FreeBSD Forums.
# rm /usr/local/etc/sudo.conf
# rm /usr/local/etc/sudoers
# pkg remove sudo
The raw screenshot images from an Android phone usually come in with a filename in the following naming format, is fairly compressed and contain metadata about the phone itself.
$ du -sh -- *
309K Screenshot_20250108_144158_Thunderbird.jpg
373K Screenshot_20250108_144212_Thunderbird.jpg
185K Screenshot_20250108_144506_Thunderbird.jpg
I prefer to rename them, so they begin with ISO date and time and use system friendly characters.
$ for file in Screenshot_*; do mv "$file" "$(echo "$file" | sed -E 's/Screenshot_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]{2})([0-9]{2})([0-9]{2}).*/\1-\2-\3-\4-\5-\6-screenshot.jpg/')"; done
$ du -sh -- *
309K 2025-01-08-14-41-58-screenshot.jpg
373K 2025-01-08-14-42-12-screenshot.jpg
185K 2025-01-08-14-45-06-screenshot.jpg
The default size is the size of the display, which is usually fine, but they can be optionally resized with ImageMagick to save space. The change in size and quality has no significant impact on the screenshot image quality, while the reduction in file size is huge as it schrinks to about 15% of the original size.
$ magick mogrify -resize 900x900 -quality 75 *-screenshot.jpg
$ du -sh -- *
33K 2025-01-08-14-41-58-screenshot.jpg
45K 2025-01-08-14-42-12-screenshot.jpg
25K 2025-01-08-14-45-06-screenshot.jpg
The filesize can be lossless optimized even further, and metadata removed for added privacy, with JPEGOPTIM.
$ jpegoptim --strip-all --all-progressive *-screenshot.jpg
$ du -sh -- *
33K 2025-01-08-14-41-58-screenshot.jpg
41K 2025-01-08-14-42-12-screenshot.jpg
25K 2025-01-08-14-45-06-screenshot.jpg
The original screenshots have now been renamed, resized and reduced, so they use a minimum of storage space and no longer contains metadata for added privacy. The proces has overwritten the original ones, so the storage space has been freed. The screenshots are ready for archiving and publishing on Internet.
I wanted to test a privacy aware IMAP mail client for Android and a bit of research lead to Thunderbird for Android.
An IMAP mail client for Android and mobile phone users must be simple to configure and use.
The download was only 7 MB. The intro stated, that I could import settings from the desktop computer client, but the instructions was incorrect. There are no export to mobile feature nor any QR code. I configured an account manually.
Reading email was as simple as opening Thunderbird for Android and tapping the email from the inbox folder. The content was quickly displayed in a simple and readable format.
Sending email worked in first attempt. The sender name, email address and content format was perfect.
Thunderbird for Android proved to be far beyond my expectations. It fully meet my requirements.