Raspberry Pi Linux Orientation Log
I have begun to use a Raspberry Pi, the famous and British (master purveyor Eben Upton hails from Wales) single-board computer, as a secondary PC for less intensive tasking, leisure and enjoyment. I have the 4 B version, and it runs by default a Linux distribution based on Debian which is called Raspberry Pi OS. Since I have been interested for a while in using Linux and/or “free” software I figure it’s worth compiling some logging and thoughts as I use the computer, to transform a simple addition to technology ecosystem into something more academic and mentally expansive. Also more mentally expensive. My brain is becoming overclocked as the (relatively) poor performance of the board provides my already hot brain with idle cycles for bio-algorithm padding and refining.
Not to get ahead of ourselves, but the reality is a lot of this is simple stuff. Last time I installed linux it was some version of Ubuntu (perhaps more than 10 years ago) and I did it via optical disk if I remember correctly and I proceeded to never use the install. Not only does the “Pi” come with everything set up nicely out of the box and with crucial USB and Display ports ready to blast signals to common peripherals on immediately friendly terms, but the aspect of using Linux really isn’t all that different from using Windows. This is especially true if you have any experience programming or scripting, and using command line and package managers. I will now begin proper.
Baptism into Linuxology
So, I already covered that this computer is using a version of Linux, and given sticking to a principle of not messing around and overanalyzing things, we will in turn stick to the OS provided with the computer. Before proceeding it’s important to make some notes of this arrangement.
Firstly the computer itself revolves around a “system on a chip” processor, the “BCM2711B0”, manufactured in partnership with Broadcom. Almost the entire proverbial brains of the computer are integrated into a single tiny slab of silicon, whereas on a traditional desktop PC certain things are distributed, notably, for example, a graphics processor. This compacted arrangement entails the processor utilizing the ARM “instruction set architecture”, specifically the 64-bit “Cortex-A72” implementation which is cored up on the die alongside GPU and more.
The ARM designed architectures, used often in smartphones, is by design a provider of great performance on simpler tasks while maintaining dramatically reduced power consumption and size. This is especially consequential in the end-user desktop case because as opposed to the “x86” architecture which m$/BillG tethered to and purveyed, therefore enshrining, ingraining and popularizing it in personal computers, it requires code to be compiled differently. Thus isn’t as ubiquitously represented and served up as an option for software binary downloads. I hope that was a good condensation of this aspect of the computer, the research-to-word ratio was obscene.
While the processor is capable of 64-bit (simply the ability to process larger pieces of data, increasing performance where applicable), for backwards compatibility’s sake and due to the deluge of work required to make all the other soft and hard parts of the system work properly as 64-bit, we are saddled with 32-bit operating system from the jump. This does not make much difference for a pleb like me. There is some interesting further reading to be had on the nature of software/architecture interface and example of Windows for ARM on Pi.
So, moving up a level, what of Debian and how Raspberry Pi OS diverges from it? Well there is less of a glaring difference than the cool branding might imply. The OS is wholly true to its Debian foundation in function, with work put into configuring for the hardware, optimization thereof and compiled/curated packages (software) for immediate optimal use of the Pi as a fairly typical personal computer. It isn’t some proprietary hellscape, and functions largely like any traditional Linux distribution would and can be replaced with other distributions ported/compiled for ARM.
Outlining GNU + Linux
So, what exactly is Linux and how does it differ from windows, in a way that a typical user might notice? First and foremost “Linux” technically refers to the “monolithic” kernel manifested by a man named Linus Torvalds that serves as the foundation of the colloquially known “Linux” operating system and its distributions. That is to say it is the part of the system that interacts directly with the hardware (“close to the metal”) and being “monolithic” means it will harbour the entire operating system in this realm, as opposed to other systems where there would be more levels of privilege and buffer between the user and the hardware.
Building out the the archetypical “Linux” OS, there is the GNU library of software, package managers and other accommodation for the user, namely an interface/desktop suite. Owing to the free and customizable nature of Linux, the collection you’re getting can vary wildly from distribution to distribution and they are often tailored at least superficially to specific purpose (Raspberry Pi OS is a ready established example). The “GNU” part of this is apparently more correctly designated the “operating system”, forming the lions share of the libraries/code that are fundamental for a user to operate the computer and when taken alongside the kernel you’re most of the way to a typical “personal computer” set-up. Debian is one of the best examples: collecting, compiling, supporting and forming out of all of these open-source projects (and more) what they call “the universal operating system”. It is just one of many such endeavours, in actuality.
The resulting OS on is organized with the “Filesystem Hierarchy Standard” where it is stored. These are directories common to Linux and other modular “UNIX-like” operating systems which harkens back to the ancestral UNIX operating system. This would be analogous to the way “Program Files” and others are common across various versions of Windows, forming their hierarchy. Of course, Windows is proprietary software and so no de facto “standard” is issued at least publicly. The most relevant folders are as follows, within the root “/”:
- boot - Files needed to boot the system.
- dev - Devices/hardware and virtual devices represented as files.
- proc - System and processes represented as files.
- bin - System wide essential program files (binaries).
- sbin - Similar to “bin” but for root/administrator.
- lib - System wide essential libraries, required by binaries.
- etc - System wide configuration files.
- tmp - Temporary files pertaining to applications.
- run - Files pertaining to the state of applications, not routinely deleted like “tmp”.
- home - Specific folders and config data for each user.
- root - A would-be “home” folder for the root user (admin), elevated out into the root directory.
- usr - Contains “bin”, “lib” and other data for non-essential applications, it’s name is not a contraction of the word “user” but it would make sense.
Not as neatly, or at least familiarly, packed like Windows. A lot of it is quite intuitive and interesting that so much is exposed and devices shown as files, where windows has all manner of hidden directories and even tucks away features like “Device Manager” in strange places. Anyway, this isn’t supposed to be a compare and contrast article.
Surfacing Into The System
First reaction after the initial update on boot is very positive. While the “Raspberry Pi” computer isn’t the most powerful, and relative to my main Windows machine this is immediately apparent, everything looks very slick and responds well if not with immediacy. Using a mouse feel strange, and it seems to provide only an acceleration level setting as opposed to a flat velocity. Other settings are quite minimal, there’s an interesting “pixel doubling” setting that scales everything to double size, and everything becomes nearest neighbour style pixelated.
Opening the CLI and having a look around, there’s the “raspi-config” which needed updating and a bunch of stuff to remove in the package manager. After updating “raspi-config” there’s a few settings worth looking into like the OpenGL/GPU related settings and more. The taskbar is at the top of the screen, which is very cool. There are many programs already installed, lots of programming related things such as Geany and even educational centric tools Mathematica/Wolfram.
The selection of default desktop wallpapers is very nice. They are apparently provided by Greg Annandale who also happens to be a software engineer for the Raspberry Pi foundation. These are great photos, and it might be time to switch up the flat black wallpaper I stick to, at least for this auxillary computer. I will now mold the pie into my image, with my itinerary of hard and soft desires.
I Have Some Headphones but I Can’t Hear
I have always had an instinctual dislike of bluetooth, that is to say I don’t really have good informed reasons or knowledge but I have enough “lived experience” with the foibles and finicking of it that I really hate and avoid it. This goes way beyond the downsides of wireless (latency, battery life etc) peripheral and such, it seems like you stand a good risk of ruining a good day by torching up to an hour trying to get it to pair and work at all. Remember when headsets, convoluted with embedded/attached microphone, had green and pink 3.5mm jacks that would just get slotted in separately and work? Now even wired headsets might try to combine these, as if it is of any benefit to anyone real. Maybe that paragraph was unnecessary and my anger should be directed at linux, whatever the case I just spent the better part of around 3 hours trying to get a wireless (bluetooth) headset to work with this thing.
After breezing through the installation of wireless keyboard (not bluetooth) which just plugged in and immediately worked, trackpad and all (this is not something I was expecting out of linux/pi), I decided to get right to installing softwares. When I did return to pair headphones to the computer they didn’t work whatsoever. After searching through articles, forum posts and documentations while cluttering the memory with config files and installing a large and diverse range of useless packages, I did eventually get it to work. This was very pleasurable to me, my ear was at once graced with the nasally voice of Linus Techtips after he had spent roughly one hour standing by in the background, devoted to keeping me posted in spite of my radio silence.
My main take-away from this debacle was that “PulseAudio” is a crock of you know what.
Amongst some vanishingly simple gathering of tools like 7zip and Qbittorrent via package manager, putting together a suite of softwares for myself lead down some rabbit holes. Quickly worth mentioning is that I was hoping for compatible versions of Kindle and Discord, but the web apps will suffice.
The browser I use is edge and the corporation who juggles my data and bookmarks (favourites) is microsoft. Ideally I would have liked to be able to install edge and have everything sync over, especially for things like general blogging. Unfortunately despite the edge browser being “chromium” based it simply isn’t available. There was actually an initial development version unveiled just over a week ago, but this features none of the end-user stuff I want, like signing into a microsoft account for syncing purposes. For now I guess I will just stick to the default install of chromium, and deal with syncing google account. I’m alright with waiting, but I wish there was some way to view my favourites in the azure amalgam separately from a browser, which doesn’t seem to be the case. Even then my passwords and other things are in the Edge aether, so it would not even help to switch to some other platform for this.
NordVPN have a package available for me to go straight for and this was very smooth to set-up, it looks like the potential version differences of ARM and x86 didn’t matter, filename indicating “all”, whether that means they’re bundled in there or something else I don’t know. After that I followed the instructions on the command line and everything through to logging in and connected was pretty easy. It seems like after downloading the file from a browser and running it (by CLI or clicking icon GUI style) it builds out a repository, which is detected when running “sudo apt-get update”, at which point you can install it proper. Unless I am comprehending this wrong it kind of reminds me of using ruby gem bundler, where you might add something to a gemfile and then run update/install and it will install dependencies you appended to your gemfile.
That’s all well and good but what about connecting automatically, which doesn’t appear to be happening with this current set-up. The solution is simply to access the settings in the cli. There’s not many of them but they are set-up undesirably initially, quickly running through them and enabling/disabling fixes this, and some quick test show the settings are applied properly. Very excellent and easy, and honestly much nicer than the Nord windows app experience. As a side note I am interested to know what exactly “NordLynx” is, on the surface it sounds good so I’m using it, but I don’t really know what differentiates it from OpenVPN, and in fact I am not that interested to know.
VS Code + git/blog
I am referring to a guide to install VS Code because I bone headedly tried to install x86 version and got worried. Anyway, this guide is basically moot, other than reminding me I need to install the ARM (32-bits) version of vs code, there’s no pro tips needed to do it. With the program installed I have turned on settings syncing on my Win10 PC. Hopefully things carry over nicely.
It is very pleasing to check out the extensions bar as it fills up with the extensions I use on Windows, everything seems to work beautifully. I suppose this is all the benefit of the app being built on web technology (Electron). With that done I want to collect a copy of my web blog repository so I can blog from this computer. Given the nature of how I update the blog, it may unfortunately not be quite as instantaneous as it sounds, as I need to be able to build and serve the site locally as well as run a python script.
Cloning the repository aside, I need to get Bundler. Trying to install the rubygem tells me I do not have write permissions for the gems folder. The tonic for this is prepending sudo (superuser) to the command. Changing directories (cd as in windows) to the cloned repo directory, the “bundle install” can now be run. This is a very long list, it’s taking longer than I would imagine, many things are being installed, many great things. Well, I can build and serve the site and it all seems to just work. I guess that’s it - very beautiful. I feel compelled to look deeper and understand why it worked, it feels awful to just rely and have faith in such things, and opportunity for any inspection or worry expenditure has been bypassed.
The only other thing to check in this realm is if the tag generator script works. I have to assume python is on this machine already, and will just work. I’ll try it by deleting all the tags and running the script, where github will probably let me know if there’s something wrong by comparing to my online repo. Well it didn’t work, and it seems like it’s because the double “glob()” with flag “recursive” I added to the script due to the subfolder nature of my setup isn’t recognized, probably due to python being at version 2.7, which the CLI says is the latest version. After doing some reading it seems like it bases this on the fact it is the latest package available from whatever aether it is polling, but you can get and build your own install all the way up to 3.9, myself needing at least the 3.5 version. So I done that, using “sudo make install” after configuring this. I don’t really know what’s going on. It worked anyway, just need to remember to use the command python3 instead of python.
Aside from this I should note there were some issues with signing into microsoft and github accounts before installing gnome-keyring and creating a keyring. I don’t know what that is but my assumption is it allows you to save sign-in information securely across local apps, like saving passwords in a browser. This does seem to be the case.
Looking for a Caesium/ImageLounge replacement for some simple, and preferably optionally batch, image editing and compressing solutions, I come across XN View. This app looks to be very useful, with some really nice batch operation possibilities and is cross platform. They have an ARM version deb package ready to go for me on the forum. Perhaps I will switch to this on windows too, and try to work it into my planned scripting of blog update to automate image compression and resize.
They have a cool css animation on their page and I love the paint splotch design of the classic app. The css animation I refer to is class “roll” on their site, you can see it in various links that inside and in line with paragraphs. I have stolen the stylesheet and will look to enjoy use of this at some point. Quick final note: it is inadvisable to collect tarballs and build and install, as this can cause issues with the neater method of managed packages.
A Better Tomorrow
This brings me to the more philosophical work in all of this. The conclusions reached, reformed thought patterns and ways of incorporating this cool little machine into building a better world. Let’s see what the high meta-throughput is powering.
Dual monitors are exceedingly commonplace and undeniably provide some productivity bonus when it comes to either referencing documents and images quickly and easily by having them pooled outside of a working area or by opening up real estate for a more expansive interface with a program especially when using it revolves around a “preview”. For example when using blender to animate a 3D scene, where you can increase the amount or detail of the timeline without shrinking the scene preview to an unrepresentative size. However, in practice, at least for me, I find that far too often the bonuses to be had become engulfed by many detriments in the form of distraction, spread-thinning and a general lack of true singularity of mindset.
Given the small power footprint and differing nature of this new alternate computer, I figure dedicating a monitor to it and thereby reducing the output of my main PC to one also will be excellent for taking a 3/4 step toward a singularity of interface and thus denoising of computer use overall. It’s also easy to still get the benefits of referencing documents, so long as they are web-based or small enough to temporarily transfer or upload to cloud storage. Unfortunately it is harder to enjoy larger preview sizes in things like Blender or AE, but it might help to deal with smaller ones and the performance boost that doing so would provide. All of this of course assumes strict enforcement of monitor dedication, if need be it would be quite easy to hook things back up.
Moving from a single desktop PC that encompasses every possible use bar maybe reading which is more enjoyable on a phone, means there’s room to delegate tasks and realms of computing to a specific computer. While I am not having too hard a time typing up this blog, it is quite surprising just how slow it is to build and test the site when adding a new post. Clearly the deciding factor in usage delegation is performance. Almost anything that requires any heft is Big-PC destined, but I guess the task of writing blog posts would be fine here on Little-PC. It is tricky though, because of the sheer amount of files and configuration resting on the Big Boy that it would be useful to have immediate and functional access to that don’t exist in cloud.
This leads me into the discovery of “virtual desktops”. This is a feature of windows that somewhat emulates the benefits of using multiple monitors to house different open programs, browser windows and folders. In using this feature you could delegate a virtual desktop to a “web logging” set-up with a browser window, VS code, folders and markdown editor, and have one dedicated to 3D work with blender open, other folders and a browser on resource websites. These are just examples, but very interesting.
Arguably the most important benefit of using an extra computer that is set-up completely differently not only in software and operating system but also hardware is expanding horizons and learning more. It probably speaks to pre-existing and enduring deficiencies of brightness that I didn’t know of “Windows Virtual Desktops” as mentioned above, but I probably would never have learned about this simple and high level feature had I not decided to set up this extra PC. That is to speak of benefits beyond and outside of “learning about and using Linux” which is the immediately inferred range of learning.
Due to how long and verbose I have ended up making this post, I have had to expunge a variety of tangents I would have liked to travel down. In hopes of exploring them in the future and turning this “learning” bent into a closing bent, I will list them now in no particular order. We have:
- ALSA, OSS, JACK and PULSEAUDIO
- How intensive a workload is feasible? (GIMP, Blender)
- Plan 9
That’s about all. Peace out.