the itjerk

my adventures with technology

pixel 5

Santa brought me a Pixel 5 for Xmas. The old Pixel 2 was a venerable phone, but “typing” had become more than troublesome, and knowing I had just performed the last Android update, I got the bug to upgrade. Didn’t get much of a deal, $50 off an unlocked model, plus I traded in my daughter’s Pixel 3a (more on that later). I had thought about a Pixel 4a, but the cheaper glass and plastic case made me think otherwise – and no, I don’t care about a headphone jack.

To be honest, the two phones are incredibly similar. In fact, I prefer how the Pixel 2 felt in my hand – the slightly rectangular bezel made it easier to grip. Sure, the Pixel 5 has 5G, another camera, etc, but what I notice the most is that the screen bleeds to the very edge of the phone case. Whoopdedoo. It’s uncomfortable to reach my fingers down to the bottom edge. Thankfully I found out how to restore the three-button navigation at the bottom (Settings>System>Gestures), I sure was not up for “swipey-swipey-hold” all the time. Switching between phones was nearly perfect – only my VPN and SSH clients need to be setup from scratch again.

The $649 question: Was it worth it? Not really. I probably should have held off until next year to upgrade. If you really ting about it, the smartphones are a mature product. The hand is only so big, and there’s really not much to add to improve the experience. Another camera? More storage? 6G network? Better screen? These are all incremental at best. In the future let’s hope that phones are more about longevity – having the ability to keep getting software updates – rather than just replacing hardware every few years. Ho-hum.

soldering mania

When I was in the 7th grade, I spent the summer taking electronic classes at the local high school. That’s what we did in the 70s. I’ve always had a fascination with electronics, which of course fits in well with being an IT jerk. Here’s a little something I made for the holidays. You can see the video of the completed project here on Youtube.
Season’s Greetings!

my data and the cloud

Working from home gives me a lot of time in front of my computer. Being who I am – an itjerk – I’ve decided to streamline all my cloud services, and clean up my data wherever and everywhere it may be.

First, let’s talk a little about data. Data is ubiquitous. Folders, files, drives, cloud, it just piles up. Keeping it organized though is the key to keeping it safe. Specific categories of data require specific solutions. Here’s mine:

  1. Documents. These are almost exclusively on my PC’s home folder, or in Google Drive. I’ll use OneDrive to keep them backed up, until they are archived (see below).
  2. Photos. Camera photos are in Google Photos (Android Phone user) and then eventually backed up to my RAID1 and external drives, while other photos are in Pictures folders, or shared with Cloud services.
  3. Music. This resides on a RAID1 on my Linux computer, and is backed up to an external drive.
  4. Archived Data. IMPORTANT! Every year I create a folder on my Desktop for all the digital ephemera I collect. It gets backed up to my RAID1 and external drives. I also clean/clear out my home folders, or at least I endeavor to.
  5. Backups. Yep, that’s a class of data. I have a backup of my home folders on my RAID1 and external drives.
  6. The zillion other random photos and files. They are everywhere! In the cloud, in my Downloads folder, on flash drives and backup disks; this is the thing to organize and clean up!

Cloud services are great, but it’s pretty easy for things to get out of hand if you have too many. Here’s a quick overview of my Cloud Services:

Google Backup & Sync. Google let me down when they removed Google Photos from their sync services. I had my photos syncing down to a D: drive on my PC, which was easy enough to backup to external drives. Maybe too easy? No more – it’s a manual download process. Fuckers. Anyway it can do exactly what it says – backup your computer to the cloud, and the cloud down to your computer – but I’m moving on. Google knows enough about me.

Google Drive. This does have exceptional value to me, especially when I was writing my book, as a “work-in-progress” repository for documents. However, like all cloud services, it’s also a wasteland for random bits of data – photos, saved files, wip documents that never finish, transfers – all of which needs cleaning up much more so than backing up. I’ll use it for working in the cloud, but not as a repository for data.

Mega. Anyone remember Kim Dotcom? Whatever happened to him? Anyway, I use Mega to backup my book files. It’s a task-specific solution that serves my need, and is free.

OneDrive. I’m a newly converted fan. Why? Well, I use it extensively at work, but also because of my Surface Go: I used my Microsoft account (Live? 365?) to initially create my user account, and since the Go has only a 64GB hard drive, OneDrive’s is a must (but to be honest, I don’t store any data on the Go). But here’s another essential feature of OneDrive – it can automatically backup your Desktop, Documents and/or Pictures folder. The free plan comes with 5GB of storage, which is good for two of those folders, and 100GB plan only costs $2/month. It does have a Personal Vault (password protected folder), but it only holds three (3) files! LOL! Well integrated into File Explorer, and works with a Mac.

Dropbox. The original cloud, I think, it just ended up being a whole lot of meaningless files for me. I’ll keep the account but only for sharing with others.

Adobe Creative Cloud. I used CC apps for my book, but as this is provided by my work, it’s not a personal solution for me.

iCloud. I’m not an Apple user, but if I were, I would probably use this instead of OneDrive.

Box. Another service I use at work, but redundant with OneDrive.

Amazon Drive. If you have a Prime account, it offers unlimited photo storage. That’s tempting, but Amazon knows enough about me already. Plus, I want my precious digital photos in my physical possession.

So what’s the plan? Use Google Drive as a work space, and OneDrive as my primary cloud. As for the rest of my data, I’ve got a spare D: drive on my PC that I’m using as a staging point as I clean out my various folders and drives. Time I have, OCD I’m great at, so let’s execute the plan!

#vote2020

status = vote2020

I’ve been very busy with work. Who knows what kind of shit show November will be, so I’ve been working away upgrading hundreds of computers. Windows 10 feature 2004, and Catalina 10.15.5-7. I’ve also been knocking the old Windows 7s and High Sierras on the head. Remember, there’s no badge of honor in a seven to thirteen year old computer. It’s done, it had a good life. There’s more power in that new iPhone.

Anyway, I’m still here, doing well, being safe, wearing a mask and keeping the social distance as best an itjerk can. Hope you are too. Let’s fix this mess in November #Vote2020 #fu45 #CupOJoe #bidenharris

dr14.tmeter

Wow, figured out how to install this nifty python program that calculates dynamic range on flac files. Ubuntu 20.04 ships with Python3. There’s some drama between python versions 2 and 3 (e.g. latter merely a release candidate), so the best way is to first get pip and use it to install the program DR14-T.meter:

sudo apt update
sudo apt install python3-pip

Now we can use pip3 to install the dependencies, and then dr14.tmeter

sudo -H pip3 install numpy scipy
sudo -H pip3 install DR14-T.meter

Alternatively, you can use pip3 to install just for a specific user (in ~/):
pip3 install DR14-T.meter --user

Edit 04/2022:
To install on 22.04 LTS, I had to copy source code from github to local computer and install:
pip3 install -e dr14-t.meter-1.0.16

to calculate the dynamic range of an album, switch to the directory and run
dr14_tmeter ./

Scan Dir: /Music/Yes/1971_The_Yes_Album

02_Clap.flac: DR 15
01_Yours_Is_No_Disgrace.flac: DR 11
03_Starship_Trooper-_a._Life_Seeker_-_b._Disillusion_-_c._W├╝rm.flac: DR 12
04_I’ve_Seen_All_Good_People-_a._Your_Move_-_b._All_Good_People.flac: DR 10
05_A_Venture.flac: DR 11
06_Perpetual_Change.flac: DR 11
DR = 12

– The full result has been written in the files: dr14.txt
– located in the directory:
/Music/Yes/1971_The_Yes_Album

Success!
Elapsed time: 5.60 sec

On the web:
DR14_T.meter

further down the pandemic road…

I hope everyone is hanging in there, observing social distancing and wearing a mask. Life goes on for the itjerk: work, family, music, technology, cooking… Being safe and register to vote in November. #changewemust

uncomplicated firewall (ufw)

RoonUFW
I run a Roon Server or “Core” on my Ubuntu box to supply music to various endpoints on my local subnet. Because the computer also has a window to the outside world, I run a firewall, ufw. Like its namesake, it’s easy to configure, you can get the basics here. Anyway, I need to open a few ports so Roon Server can be discovered on my subnet, by creating an application profile and then adding a rule to the firewall.

First, we’ll create a file “roon” in the following location:
$ cd /etc/ufw/applications.d/
$ sudo touch roon
$ sudo nano roon

Here’s what’s in the file:
[Roon]
title=Roon Server
description=Roon Labs Core Music Server
ports=9003/udp|9100:9200/tcp

Note the context of the ports entry: The pipe separates udp from tcp, and ranges are set with a colon (and individual ports with a comma). Once you create the file, you can quickly check syntax by running ufw status, and it will let you know if you made any errors, which is handy. Once that’s created, it’s easy enough to add the rule to ufw, and check status again to see it working:

$ sudo ufw allow from 192.168.1.0/24 to any app roon
$ sudo ufw status

Status: active
To Action From
— —— —-
Roon ALLOW 192.168.1.0/24

I should note that the reason I’m doing this is because Roon doesn’t document what ports need to be open, and I’m having an issue with one piece of hardware being recognized on reboot. There’s probably another series of ports that I need to open up, so having a profile is an easy way to trouble shoot; once I make changes, I can edit the profile then update ufw with the following command:

$ sudo ufw app update Roon

Since Roon uses randomized ports, my interim fix is to allow access to the server from the endpoint in question:

$ sudo ufw allow from [endpoint ip]

Nothing scary here folks, just some computer and network basics.

wireguard vpn

On my to-do list for my newly christened Ubuntu box was to install a VPN. I had previously used OpenVPN-AS (Access Server), which is a lite version (two user) of OpenVPN that uses a web interface for most configuration. I also considered using “regular” OpenVPN but to be honest, there’s a fair amount of work in setting up keys, and I didn’t want to use scripts downloaded from github. Enter WireGuard.

Here’s the pitch. “WireGuard┬« is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec (and OpenVPN), while avoiding the massive headache. It intends to be considerably more performant than OpenVPN.” In short, it’s easy to configure, lightweight to use, and it’s already in the Ubuntu 20.04LTS repo.

To install WireGuard, we install the program, create keys, configure the virtual network device (wg0), and then configure the client (Android).

#install WireGuard
$ sudo -i
$ apt update && install wireguard

#generate server keys (these are stored in /etc/wireguard/)
$ umask 077; wg genkey | tee privatekey | wg pubkey > publickey
cat publickey

#configure the WireGuard interface wg0 (leaving peer empty for now)
$ cd /etc/wireguard
$ nano wg0.conf

[Interface]
Address = 192.168.6.1/24
SaveConfig = true
ListenPort = [port]
PrivateKey = [server privatekey]

[Peer]
PublicKey = [client publickey]
Allowed IPs = 192.168.6.2/32

#open port on firewall for WireGuard to listen
$ ufw allow [port]/udp

#enable and start Wireguard server
$ sudo systemctl enable wg-quick@wg0
$ sudo systemctl start wg-quick@wg0
$ sudo systemctl status wg-quick@wg0

#now that the service is started, let’s stop it, and configure our client.
#first we create client (keys we’re not going to save them)
$ sudo systemctl stop wg-quick@wg0
$ wg genkey | (
read privk
echo "android-private-key: $privk"
echo "android-public-key: $(echo "$privk" | wg pubkey)"
)

#edit wg0.conf and enter the publickey for your client, then restart WireGuard
$ sudo systemctl start wg-quick@wg0
$ sudo systemctl start wg-quick@wg0

#now let’s create a config_file for the client.
$ exit
$ cd ~/Desktop
$ nano config_file

[Interface]
#client
PrivateKey = [client privatekey]
Address = 192.168.6.2/24

[Peer]
#server
PublicKey = [server publickey]
AllowedIPs = 192.168.6.0/24
Endpoint = [ip or host name]:[port]
PersistentKeepalive = 15

#save the file and generate a qrcode to scan with your phone
$ qrencode -t utf8 < config_file

That’s it! I installed the WireGuard app on my Pixel phone, selected QR code for the connection and scanned the image, then the app asked me to name my new connection. All set, I connected and viola, I have my own VPN server.

Couple of notes. Pay attention to the IP addresses and masks; they must be exact. You can use whatever port you want for WireGuard to listen, and it works well with DuckDNS dynamic hostname. Multiple peers can be configured as well. The Android app could do a better job “hiding” both keys, but there you are.

On the web:
WireGuard

duplicate files

Finding duplicate files is big part of my Ubuntu data cleanup plan. Here’s some tips: Fdupes finds duplicate files via checksum; the first command will summarize what it finds in a recursive search, while the latter will delete the files (N means NO CONFIRMATION!). Warning: there’s no going back! The third command will change the date of pictures to what’s in the jpegs header, for easier sorting.

fdupes -rSm .
fdupes -rdN .
jhead -ft *