The surveillance state makes things screwy

One of my volunteer service opportunities is to record speakers at meetings and then put the recordings on a website. I use the Sony ICD-UX570 Digital Voice Recorder, which I’ve talked about before. I take the MP3 file and edit it using Audacity, trimming off everything before and after the speaker. Then I export the audio with a smaller bitrate to make a smaller file. Lastly, I rename it and upload it.

Today, a friend called me, and asked if I could burn a recording to CD. His friend, the gentleman who spoke, is almost 80 years old, and he would be best served with a physical CD – none of this Podcast Feed nonsense or USB stick which his truck may or may not be able to use. Sure, I said. This should be easy.

Okay, first I tried Fedora Workstation KDE Spin and got errors. I tried Brasero first, but it was super grumpy. Then I tried K3B which is my old favorite, and it was grumpy too.

I gave up and went to a Windows laptop. Did I want to use Microsoft Windows Media Player or Apple iTunes?

I went with iTunes because I’m not a fan of anything Microsoft.

Freaking iTunes worked, but….

What the hell is the name on this CD?

audiocd:/Philip Kerr – 01 – Game Over – Track 01.wav?device=/dev/sr0

At 80 years old, I’d be acutely aware of my mortality.

Oh! That is certainly what I want this 80-year-old man to see when he pops this gift CD into his truck CD player display:

Philip Kerr - 01 - Game Over

If I’m him, there’s no way I don’t think to myself: What the hell? And then he’d have to say some Hail Mary’s to apologize to God for the cursing.

This gentleman’s name is not Philip Kerr. I did write his name in the various properties fields in iTunes. None of those appear to have come over.

I know that the music industry wants to keep tabs on every sound file ever, so they can in theory collect royalties. But this was my recording, done live and in-person.

This is just screwy.

And apparently, this isn’t a problem on the CD, it is a problem in Fedora. I didn’t know that yet. All I got was the Orwellian vibes.


Okay, back to Fedora KDE Spin.

Ooooooooffffffff.

Thank goodness for Perplexity.AI. It turns out to only be an 8 step problem.

One: Check group memberships – must be a member of cdrom – I’m good

Two: Adjust K3B settings

K3B > Settings > Configure K3B > Programs > Permissions > Change Permissions > Apply

Three: Add a system policy

sudo vim /etc/polkit-1/rules.d/85-cdrecord.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
subject.isInGroup("cdrom")) {
return polkit.Result.YES;
}
});

Four: Restart services

sudo systemctl restart polkit

Five: Update udev rules

sudo vim /etc/udev/rules.d/99-cd-burner.rules
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", MODE="0660", GROUP="cdrom"

Six: Reload udev rules

sudo udevadm control --reload-rules

Seven: reboot the computer.

Eight: try to burn the CD with K3B.

Thank goodness it worked.

I had forgotten that CDs are as small as they are. The older gentleman actually had two recordings on file, one for 45 minutes and another for 55 minutes. That’s too much for a single audio CD. Heh.

AI is getting good

Perplexity AI is proving to be a much better search engine than Google. It is astonishing.

For several years now, Google has been shooting themselves in the foot by trying to reform society through tainting search results. Accordingly, their search results have gone to shit. There are numerous examples of A/B tests against Google search: getting uplifting / supportive results when the female gender is the search, but getting condemning / demoralizing results when the male gender is the search. Ditto A/B test searches for Democrats versus Republicans, and Hillary Clinton versus Donald Trump.

Okay, I’m done: I have replaced my search engine in all my browsers with Perplexity AI.

So while Google was going to shit, Large Language Models became capable. Jeff Bezos of Amazon spun up his own, trained it, and is now putting it out there as Perplexity AI. They have a commercial license for $20 per month, which is too rich for my blood. If they had a $5 per month plan, I’d pay for it now.

But currently, I’m freeloading. I do pay for Twitter, so I might start using Grok (Grok3 just came out) instead. I prefer to spread my activity over different services. Yet, I feel that freeloading is something I don’t like in other people; therefore, if I want to live a high integrity life, I shouldn’t be a freeloader. Anyway….

Today I get to do the minutes for a monthly meeting that I am Recording Secretary for.

On my Windows machine that plays nice with the Sony ICD-UX570 Digital Voice Recorder, I uploaded the recorded MP3 file to Nextcloud. It syncs to the server, and the file ends up in my folder where all these recorded MP3s go. That folder syncs to my main machine I’m working on now.

I had that moment of inspiration that finding these files / messing with the folders is more trouble than it should be. I’m in these folders a lot. Windows has a “Favorites” feature, surely KDE has such too?

Asking of Perplexity AI “does KDE Dolphin have a Favorites feature” instantly took me to a page which presented a ZD Net article “How to use KDE Plasma Places for a much more efficient desktop“. This is precisely what I was looking for, yet I had no idea that it was called Places.

This is great. Google search might have gotten me to this page eventually, but I doubt that I’d have gotten to it without going through many different page views (thereby increasing Google’s ad revenue).

And yes, I’ve asked Perplexity AI to generate a Perl program for reading a Nextcloud calendar, and it took no time at all to do it. Now, the program did not work….

But troubleshooting the problem with Perplexity AI was pretty easy. It suggested I try curl and that worked perfectly.

As it turns out, Nextcloud doesn’t play nice with Net::CalDAVTalk.

Whether this is a problem with Nextcloud (which doesn’t try to do anything on its own – it uses SaberDAV underneath) or this is a problem with Net::CalDAVTalk isn’t a terribly fruitful pursuit. What is almost trivial to do is to ask Perplexity AI to generate the Perl program without Net::CalDAVTalk. The whole thing can be done with HTTP::Request, LWP::UserAgent, and XML::LibXML.

It is astonishing how well this is working, and how quickly this change is taking place.

Text-to-speech notes

This is simply for my own notes, on how to do Coqui text-to-speech

Initial setup required this:

python -m venv tts_env
source tts_env/bin/activate
pip install --upgrade pip
pip install coqui-tts

Subsequent invocations needed only this:

python -m venv tts_env
source tts_env/bin/activate

tts --text "Insert text here" --model_name tts_models/en/jenny/jenny --pipe_out --out_path /home/path/to/tts_output/whatever.wav | aplay


How to make (whatever) Linux have a nice bash shell with my favorite aliases

This is a newer version of my post How to make Ubuntu have a nice bash shell like OpenSuSE which should supersede it. I keep coming back to this topic, and think that the right way to do this is:

touch ~/.bash_aliases
vim ~/.bash_aliases
alias ll='ls -la'
alias ..='cd ..'

And then alter .bashrc to include this aliases file:

vim ~/.bashrc

At the end of the file, insert this:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

Finally, reload bash with this:

source ~/.bashrc

The other change I always make is to edit /etc/inputrc and make the history search keys the PgUp key.

sudo vim /etc/inputrc

Find # "\e[5~": history-search-backward and uncomment it

New Fedora KDE Spin: re-do power saving setting

There is a bug in my AMD Ryzen 1700 which manifests on Linux during power sleep states. Now that I’m on Fedora KDE Spin, I need to implement it again. Fedora KDE Spin does startup scripts a little differently than the previous systems I’ve used before.

Previously, I’d used /etc/init.d/

Well, Fedora KDE Spin doesn’t use that; it uses Systemd and systemctl

As root:

cd /etc/systemd/system

vim set_c6_acpi_state_disabled.service

Paste in the following:

[Unit]
Description=Set C6 ACPI State Disabled
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/bazoozle/zenstates.py --c6-disable

[Install]
WantedBy=multi-user.target

Technically, I don’t need to wait until after the network is started to run the zenstates.py python script. But it isn’t obvious what would be the equivalent to @reboot in a crontab.

Then we do this:

systemctl start set_c6_acpi_state_disabled.service

systemctl enable set_c6_acpi_state_disabled.service

Migrated from Manjaro to Fedora KDE Spin on my main machine

Around six months ago, I migrated my main machine to Manjaro, as mentioned here. I liked it, and I liked it enough that I also switched to using it as my home media PC / alarm clock.

It has been great, using it as my alarm clock. I don’t think I’ve been happier with my alarm clock setup, ever. The interface of using KAlarm is super easy, and as a proper calendar ought to, it can handle “second Sunday of the month” or “on the 15th of the month” events (for example). That Manjaro hooks into the high-quality audio on the soundbar I use on my television, makes the music it plays a joy to wake up to.

Alas, on my main machine, I drive Manjaro harder, and it crashes.

Of course, I have a lot more installed on my main machine. I do more with ImageMagick, Tesseract OCR, The GIMP, Kdenlive, and Mozilla Thunderbird. Although I have webmail, my primary interface to my mail server is Thunderbird. I like Thunderbird enough that I do a monthly donation to the project to help keep it going.

Both machines have the Nextcloud client on them; that’s how I get the MP3 files to the alarm clock PC. But I tend to do more file organizing on my main machine than on the alarm clock PC.

I don’t do Discord on the alarm clock PC, and I do on my main PC.

The problem I was experiencing with Manjaro was that I’d click on something, and then Manjaro would crash to reboot.

The crash to reboot would happen maybe twice or thrice a week. This last Sunday, it did again, and that was the straw that broke the camel’s back, so-to-speak.

What to move to? Although OpenSuSE has always been super stable, I still dislike how woke they’ve gone. Also, the last time I tried to install from an ISO of theirs, there was definitely something broken in the image.

I decided to try the Fedora KDE Spin. So far, I like it. It did present a couple of problems, however.

The first was that after I rebooted, I changed /home to mount to my second hard drive and I rebooted again. I could not log in as me. I could log in as root, but attempting to log in as me failed. In the journalctl the message was that an attempt to cd to my home drive failed, due to permissions.

I was fortunate that (logged in as root) the very first search I did found a Stack Overflow article which showed that the /home ownership had the wrong owner. I wish I could find that article now, so I could link to it. Anyway, the solution was:

restorecon -Rv /home

from the command line. I was already logged in as root, so I didn’t need sudo. If I could have gotten logged in as me, I wouldn’t have needed restorecon.

The second problem was that Firefox does not come with all the codecs for playing multimedia preinstalled. Manjaro did this beautifully. OpenSuSE is like Fedora this way, but it is easier to solve on OpenSuSE.

I ended up having to do a Firefox Refresh, which is less than fun. All my Multi-Account Containers now need to be redone, and I have a lot of them.

There are only two things that I don’t like about moving to this Fedora KDE spin.

One is that I have two monitors, and every time I move the mouse between them, something in KDE Plasma wants to “stick” the mouse cursor to the boundary between the two. I have to push the mouse an extra bit, to push past the current monitor and to the next one. I haven’t taken the time to find out if there is an easy fix for this, but I suspect that there is.

The other is that in Thunderbird, apparently Tools > Message Filters are stored in the Thunderbird directory and not in my user profile. This isn’t Fedora’s fault; it is something in Thunderbird.

I did choose to install the non-Flatpak version of Thunderbird, because I don’t like Flatpak. I have no idea if me keeping everything in my /home on a separate hard drive plays nice with Flatpak. Admittedly, I have not done the research. But it seems to me that when one changes distributions with significantly different packaging (rpm versus deb versus tar) that Flatpak would be a problem. I don’t know, but I doubted that Flatpak was the universal image for all Linux’s forever. Wasn’t Snap supposed to be that? (I don’t like Snap, either).

Anyway, I had more than 30 message filters, some with 20 email addresses in them, for filtering my mail into folders. Those message filters are gone. Rats!


I am thrilled to find the Thunderbird Add-On quickFilters which is delightful.


I do like how Fedora KDE Spin puts the OK and Open buttons in the upper-right corner of dialog boxes instead of the lower right.

WordPress migration notes, part 3

Joy. Not.

I get to do a migration from my existing website to a new instance of WordPress on a new (virtual) machine.

This is the website I maintain as a volunteer service for a fellowship I am a part of. I’m the web servant, and have been since 2017. I originally inherited the static HTML website from a gentleman who wrote it in Microsoft FrontPage 98. But a few months later, a member showed me an app that helps our members find meetings. That app was written by a member, and is easiest to implement as a WordPress plugin. “I guess I’m learning WordPress now” was my 2017 motto.

Indeed, I wrote a whole new website using WordPress and incorporated the meeting finder plugin. I’ve been maintaining the website ever since. Five months ago, I migrated it from Bitnami on Amazon Lightsail, to straight Debian on Linode. For five months, it ran fine, mostly. Twice in the five months, MariaDB crashed due to an out-of-memory error.

Today, it cannot get but a few hours before MariaDB crashes due to an out-of-memory error. Something changed, but I don’t know what.

So I have created a new Debian virtual machine on Linode, and am installing WordPress on it. What follows are a few notes about the process.

I spun up a shared hosting Linode on the Nanode 1 GB plan. I should mention that this website doesn’t get but a thousand or two hits per month, and we recently had to cut our office manager’s pay 20% because inflation is hurting everyone and donations are down. More than $7 per month would be wasteful, and us not being good stewards of our member’s money.

So, Debian is installed, and I ran updates, and it is time to start configuring the new server. I’m still using only the IP address to get to the new machine, and will have to configure Let’s Encrypt / Certbot later.

First things first:

Vim was preinstalled, which was nice. That left picking my default editor:

update-alternatives --config editor

Next, I want to customize my bash shell:

vim ~/.bashrc

I commented in the aliases for ll and l and the export command for ls to use --color=auto

Then I added at the end:

alias ..='cd ..'
PS1="\[\033[0;32m\]\u\[\033[0;37m\]@\[\033[0;35m\]\h \[\033[0;34m\]\W\[\033[0;31m\]\$\[\033[0m\] "

Next, I set the host name:

hostnamectl set-hostname www.example.org

I think I rebooted, and then got back in.

apt install apache2 -y
systemctl status apache2
apt-get install php8.2 php8.2-cli php8.2-common php8.2-xml php8.2-mysqli php8.2-zip php8.2-curl libapache2-mod-php -y

This is similar to what is being described at Rose Hosting, but with a few changes.

I’m leaving out php8.2-imap, php8.2-redis, php8.2-snmp, and php8.2-mbstring. I know that I don’t have a need to do IMAP to a mailbox, because this small 1 GB1 RAM machine won’t be hosting a mail server. With “only” 1 GB of RAM, I need run as little excess code as possible. Likewise, I’m leaving out Redis because it really expects a minimum of 8 GB of RAM. I’m not planning on exposing SNMP to the outside world, so that can go. And I don’t see that I’ll ever need multibyte strings, so php8.2-mbstring is out.

Next is the database:

apt install mariadb-server -y
mysql_secure_installation
mariadb
systemctl enable mariadb

When I logged in to MariaDB, I did the Step 5. Create a WordPress database and user from the Rose Hosting page.

However, I used the same user name and password as on the old website. This is because I want to use the same wp-config.php from the old server. This has complications later.

Because of the low RAM situation and Automattic’s getting wasteful with other people’s money, instead of wget https://wordpress.org/latest.zip I brought in wordpress-6.5.5.tar.gz

Although I did this, Automattic is arrogant enough to know better than me, and upgraded me to the latest version anyway. I had to downgrade, manually. I would later have to add a plugin to prevent WordPress from upgrading itself.

WordPress was extremely grumpy and would not let me get to the administration pages to run the update permalinks action.

And at some point, WordPress got all messed up. It was a similar problem as talked about here, but it didn’t have the Bitnami components to it; only the wp-config.php. Since I brought in that file from the old server, I didn’t have to edit it, but now two records inside the database don’t match the configuration.

I was also trying to bring in the Apache configuration files from the old server. I don’t recall if I fixed Apache first, or WordPress first.

Since I had brought in the Apache configuration files from the old server, there were directives in the configuration files which needed to be met. This meant running the following, because Apache wouldn’t load without them:

a2enmod rewrite
a2enmod ssl

I did bring the configuration files in, but now Apache is grumpy about the missing SSL configuration. I needed to copy in the files from the Let’s Encrypt install.

If I recall correctly, this got Apache running, but WordPress was pretty messed up because it thought the root of the website was under /wordpress/ instead of under the base directory of /

There were two things I needed to do. One was to edit .htaccess in the WordPress directory:

RewriteBase /
RewriteRule . /index.php [L]

Both of these previously referred to /wordpress/ instead of /

The other thing I needed to do was to log in to MariaDB and run:

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://172.16.1.1/wordpress', 'http://172.16.1.1/') WHERE option_name = 'siteurl';

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://172.16.1.1/wordpress', 'http://172.16.1.1/') WHERE option_name = 'home';

Where 172.16.1.1 is a placeholder for the actual IP address of the running server.

And finally, I have a base WordPress install with the default theme, and the same admin password and path as the old server.

Now to migrate the old content over. I need to remind myself that I “get” to do this. Serenity Now! Serenity Now! Serenity Now!!!

  1. It amuses me to put the word “small” next to the phrase “1 GB RAM”. The first computer I ever programmed (in 1979) was a mini-mainframe with 4 KB of RAM. ↩︎

WordPress error – somewhat passive-aggressive, methinks

The error was:

Deletion failed: There has been a critical error on this website.Learn more about troubleshooting WordPress.

I think that would have been helpful, if there was an anchor tag in there somewhere, but there was not. Simply the command “Learn more about troubleshooting WordPress, dumbshit.”

Well, that last comma and word are what I was reading into it….

Updating WordPress Was A Mistake, Redux

This week, I have been plagued by WordPress; the website I made for my volunteer service keeps crashing because MariaDB is having out-of-memory problems. This is frustrating because it ran fine for five months. But suddenly, the site cannot go three hours before going down. Sigh.

However, I had run the site with the latest version of WordPress. From this post, I had talked about previously needing to downgrade to keep my personal website (this page you are reading) from crashing. I said it was easy, but I didn’t outline the steps.

Well, with the volunteer service website crashing constantly, I’m trying this downgrade again.

Here are the steps:

  1. Make a backup of the server.
  2. Get a copy of wordpress-6.5.5.tar.gz and copy it to the server.
  3. extract it with tar -xzf wordpress-6.5.5.tar.gz
  4. change directory into the extracted folder
  5. delete the file wp-config-sample.php
  6. copy the production wp-config.php from /var/www/html (or wherever) to the newly extracted folder1
  7. (Still within the extracted folder of the downloaded WordPress 6.5.5): delete the wp-content folder.
    • This is one of the good things about WordPress: everything that is not stored in the database is stored here. This includes the uploads folder (the media library content), the themes, the plugins. So for the source we’re going to downgrade from, we don’t need this folder.
  8. change directory to /var/www/html (or wherever)
  9. rm -r wp-includes
  10. rm -r wp-admin
    • wp-includes is where most of the WordPress code lives. But there is also WordPress code in wp-admin
    • Production is now broken
  11. cp -r /wherever_you_downloaded_and_extracted_to/wordpress/* /var/www/html/wherever/
  12. chown -R www-data:www-data /var/www/html/wherever/
  13. find /var/www/html/wherever/ -type d -exec chmod 755 {} \;
  14. find /var/www/html/wherever/ -type f -exec chmod 644 {} \;
  15. systemctl restart apache2
    • Production is back up, but there’s still another step
  16. Log in to the WordPress website as admin. It will prompt you to update the database. Yes, do that.

And my downgrade, which is an improvement over having the bloated React JSX stuff, is complete.

Well, there’s one more step: email the office manager that when she logs in to WordPress to add a post or a meeting or event or whatever, do not click this link:

That’s always nice: leaving an easy way to shoot one’s self in the foot just sitting there, begging to be clicked. Sigh.

  1. I always liked that SuSE put the web server web sites under /srv instead of /var – there’s a lot of weird stuff in /var but for a web server, having the web site under /srv/www just makes sense. And yes, if you are setting up an FTP server, all that goes under /srv/ftp. What a concept! ↩︎

What The Eff WordPress?

I use my blog as a way to store notes and links for myself, so I can come back later. This morning, very early in the morning, I needed to look something up. I have a post: https://www.gerisch.org/wordpress-copy-to-test-environment/ which has what I need.

But the link to Rose Hosting did not work.

WTF WordPress?

Here’s what it looks like inside WordPress:

You can see that the link edit has a URL that has https://www.rosehosting.com/blog/how-to-install-wordpress-on-debian-12/

But that link doesn’t work‽

Here’s what Firefox shows when I inspect the HTML for that link:

Here’s what that highlighted part (in blue, on the left) says in that screenshot: http://I am following the instructions here at Rose Hosting

WTF‽

Meanwhile, Matt Mullenweg is pissing all over the WordPress community over petty grubbing for money.

Fix your damn shit, Matt.