diff --git a/homepage/knowledge/software.html b/homepage/knowledge/software.html index 996cb16..1c5be85 100644 --- a/homepage/knowledge/software.html +++ b/homepage/knowledge/software.html @@ -33,58 +33,164 @@ Caution can accompany admiration. Ultimately, the humans were the ones that produced the computers, and computers amplify human flaws as well as human feats. Try to be kind to everyone but don't take anything too seriously.
++This guide encompasses usage of IBM-compatible, amd64 processor architecture computers, particularly with POSIX and other UNIX-like operating systems like Linux and DragonflyBSD. +Non-standard, proprietary operating systems such as Microsoft Windows or OS/2 are out of scope. +
-An ACPI client is a program that displays computer ACPI information, typically power and thermal statuses.
-The usual text program used is acpi(1)
.
+The Advanced Configuration and Power Interface, or ACPI, is the interface through which the operating system and client programs can control features in your computer's firmware.
+Usually this is used with an ACPI client or opaquely controlled by the operating environment.
+
+On Linux, acpi(1)
can be used to read and control ACPI events manually.
+acpid(8)
, elogind(8)
,
+SystemD, and many desktop environments can control the ACPI automatically.
+
+On NetBSD, see acpi(4)
.
+For compilation, tcc(1)
, gcc(1)
, and clang(1)
are all reasonable choices depending on your needs.
+
+On Alpine Linux, the standard library headers are in the musl-dev
package.
+
+In most system package managers, standard library documentation can be found in the man-pages
and man-pages-posix
packages.
+
+Many Linux software distributions' system package managers have meta-packages that pull all necessities for C development as dependencies.
+Alpine has build-base
and Debian has build-essential
.
+
+Don't use echo(1)
, use printf(1)
.
+printf(1)
simulates the printf(3)
function in the C standard I/O library which has no significant variations, whereas the functionality of echo(1)
can vary between vendors.
+The following sh(1)
program provides echo(1)
through printf(1)
:
+
+#!/bin/sh +printf "%s" "$*" ++ +
See fstab(5).
postmarketOS requires that the localmount
OpenRC service be enabled for the system to read fstab(5)
.
+
Arch and Artix have fstab generators at genfstab(8)
and fstabgen(8)
respectively in their installation scripts.
+Most audio servers recommend that they be run in userspace with user privileges, with PulseAudio going so far as to exiting when run as root without additional configuration.
+The Alpine wiki currently recommends pipewire(1)
, with postmarketOS, which is based on Alpine, coming pre-configured with PipeWire.
+PipeWire is relatively new and the typical audio server used is PulseAudio; Debian and many popular Debian-based distributions come pre-configured with PulseAudio.
+
+The Alpine wiki ("Adding sound") says to install alsa-conf
, alsa-lib
, and alsa-utils
,
+add yourself to the audio
group, and then do some more configuration that I've never needed to do:
+Use alsamixer(1)
to find a working sound card (press F6
from the first screen ALSAMixer presents)
+and edit /usr/share/alsa/alsa.conf
and change defaults.ctl.card
and defaults.pcm.card
to the sound card that works.
+
+The Alpine wiki doesn't mention this but you'll need to enable the alsa
OpenRC service and either start it or reboot.
+I also installed gstreamer
but I don't know why.
+
+ALSA is clunky, many people prefer to use a frontend such as Pipewire or PulseAudio that exposes its own interface while remaining compatible with ALSA. +
++Deprecated, unfortunately. +
+
+Provided by the pipewire
package on Alpine.
+
+RTKit error: org.freedesktop.DBus.Error.ServiceUnknown ++
+This means you need rtkit
installed and running through your initialization system.
+
+On Alpine you'll need the pulseaudio
, pulseaudio-alsa
, and alsa-plugins-pulse
packages for PulseAudio with ALSA compatibility.
+Start pulseaudio(1)
when you want audio, ideally in your .xinitrc
.
+
+Linux is usually obtained as part of a software distribution put together to form a useable operating system. +
+ +
Alpine doesn't include man pages in program packages to save on space, instead keeping them in [package]-doc
sibling packages.
To always install doc packages with program packages, apk add docs
.
-postmarketOS is an Alpine-based Linux software distribution that makes configuring and using Linux easy on mobile devices. -
-
-By default, postmarketOS will generate a random software MAC address when connecting to a new WLAN network.
-You can disable this by adding a NetworkManager rule.
-In /etc/NetworkManager/conf.d/
you can make a file with any name that has the following:
-
-[device]
-wifi.scan-rand-mac-address=no
-
-
-On a live system you can then rc-service networkmanager restart
to restart NetworkManager and have it load the new configuration.
-
-On Artix, use basestrap(8)
.
-On Arch, use pacstrap(8)
.
+Arch is known for using the latest versions of programs, which has given it an undeserved reputation of instability.
+
+Use pacstrap(8)
.
-At a minimum you need base
on both Arch and Artix.
-On Artix, you need to select the initialization you want to use: 66
, dinit
, openrc
, runit
, or s6-base
.
-On both Arch and Artix, select a kernel; linux
, linux-lts
, or another Linux configuration or fork.
-Arch says you need to install linux-firmware
, technically you don't need to do so but you should.
-Artix says you need to install the appropriate elogind package (elogind-$(INIT_SYSTEM)
; e.g. elogind-66
).
-This isn't necessary if you aren't using elogind, but you most likely want elogind.
+At a minimum you need the base
package.
+Select a kernel and install the corresponding package; linux
, linux-lts
, or another Linux configuration or fork.
+The Arch wiki says you need to install linux-firmware
, this isn't strictly necessary but it is recommended.
Install base-devel
if you plan on using the AUR or if you don't know what the AUR is yet.
@@ -92,7 +198,7 @@ It's also a good idea to install any utilities you'll need on the bootstrapped s
Text editors, network managers or utilities, and other administration tools, for example.
Manual utilities such as man-db
and others would also be useful.
From the anals of my notes, 2021-06-04:
Had an issue with pacman missing some ubiquitous packages (esr's `ascii`, xorg-xev, etc). @@ -127,72 +233,81 @@ Include = /etc/pacman.d/mirrorlist-arch #Include = /etc/pacman.d/mirrorlist-arch ```- -
-For compilation, tcc(1)
, gcc(1)
, and clang(1)
are all reasonable choices depending on your needs.
+Artix refers to the series of Arch derivatives which use initialization systems other than SystemD's.
-On Alpine Linux, the standard library headers are in the musl-dev
package.
-
-In most system package managers, standard library documentation can be found in the man-pages
and man-pages-posix
packages.
-
-Many Linux software distributions' system package managers have meta-packages that pull all necessities for C development as dependencies.
-Alpine has build-base
and Debian has build-essential
.
+This process differs from Arch's bootstrapping process.
+Artix uses basestrap(8)
rather than pacstrap(8)
;
+you need to select the initialization you want to use: 66
, dinit
, openrc
, runit
, or s6-base
, as a package separate from base
;
+and Artix's official wiki says you need to install the appropriate elogind
package (elogind-[initialization system]
e.g. elogind-66
) but like linux-firmware
though it is helpful it isn't strictly necessary.
-Debian is a Linux software distribution known for its stability and longevity. +Debian is known for its stability and longevity. Debian uses SystemD as its initialization system, the GNU core utilities, and dpkg and apt for package management.
-+While it's possible to use non-Linux kernels within Debian, it's uncommon and the only non-Linux option currently maintained is the GNU HURD microkernel. +
++pkgsrc can be used on Debian. +
+ ++postmarketOS is an Alpine-based Linux software distribution that makes configuring and using Linux easy on mobile devices. +
+
+By default, postmarketOS will generate a random software MAC address when connecting to a new WLAN network.
+You can disable this by adding a NetworkManager rule.
+In /etc/NetworkManager/conf.d/
you can make a file with any name that has the following:
+
+[device]
+wifi.scan-rand-mac-address=no
+
+
+On a live system you can then rc-service networkmanager restart
to restart NetworkManager and have it load the new configuration.
+
+Ubuntu is a derivative of Debian. +
-
-Don't use echo(1)
, use printf(1)
.
-printf(1)
simulates the printf(3)
function in the C standard I/O library which has no significant variations, whereas the functionality of echo(1)
can vary between vendors.
-The following sh(1)
program provides echo(1)
through printf(1)
:
+logind (systemd-logind.service(8)
) is a component of SystemD that exposes information about active users on the system via the org.freedesktop.login1 D-Bus interface which is used by the popular desktop environments GNOME and KDE.
+It also handles ACPI events.
+It can be configured in logind.conf(5)
.
+
+On systems without SystemD and with conflicting software, elogind(8)
may be used.
-#!/bin/sh -printf "%s" "$*" --
See fstab(5).
postmarketOS requires that the localmount
OpenRC service be enabled for the system to read fstab(5)
.
-
Arch and Artix have fstab generators at genfstab(8)
and fstabgen(8)
respectively in their installation scripts.
Use elogind
.
@@ -308,18 +421,6 @@ Configuration is in /etc/conf.d/dmcrypt
and further configuration s
-Available as sysutils/pciutils
from pkgsrc.
-Supplies lspci(8)
, setpci(8)
, and update-pciids(8)
.
-
-update-pciids(8)
is not part of the pciutils
package in Alpine Linux repositories.
-
+Available as sysutils/pciutils
from pkgsrc.
+Supplies lspci(8)
, setpci(8)
, and update-pciids(8)
.
+
+update-pciids(8)
is not part of the pciutils
package in Alpine Linux repositories.
+
+NetBSD includes pcictl(8)
which offers similar functionality.
+pcictl pci0 list
outputs roughly the same information as lspci(8)
, though lspci(8)
may offer slightly more detailed information.
+
pkgtools/pkg_rolling_replace
.
-Much of this can be configured in the ACPI settings in your login manager, provided you have one running that can do this.
-Check out tlp
for Thinkpads and some other Lenovo devices.
+Power is managed by ACPI. +
ssh-keyge
This generates an Ed25519 SSH key with an e-mail address in the key comment.
+Pronunciation
+
Task management
top(1)
comes with busybox, otherwise use htop
.
@@ -559,55 +681,6 @@ and xsetroot as xorg-xsetroot
.
Alpine has xinput as xinput
.
-Audio
-
-Most audio servers recommend that they be run in userspace with user privileges, with PulseAudio going so far as to exiting when run as root without additional configuration.
-The Alpine wiki currently recommends pipewire(1)
, with postmarketOS, which is based on Alpine, coming pre-configured with PipeWire.
-PipeWire is relatively new and the typical audio server used is PulseAudio; Debian and many popular Debian-based distributions come pre-configured with PulseAudio.
-
-ALSA
-
-- Adding sound (Alpine Linux Wiki)
-- ALSA lib conf Evaluate error
-- ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
-
-
-The Alpine wiki ("Adding sound") says to install alsa-conf
, alsa-lib
, and alsa-utils
,
-add yourself to the audio
group, and then do some more configuration that I've never needed to do:
-Use alsamixer(1)
to find a working sound card (press F6
from the first screen ALSAMixer presents)
-and edit /usr/share/alsa/alsa.conf
and change defaults.ctl.card
and defaults.pcm.card
to the sound card that works.
-
-
-The Alpine wiki doesn't mention this but you'll need to enable the alsa
OpenRC service and either start it or reboot.
-I also installed gstreamer
but I don't know why.
-
-
-ALSA is clunky, many people prefer to use a frontend such as Pipewire or PulseAudio that exposes its own interface while remaining compatible with ALSA.
-
-OSS
-
-Deprecated, unfortunately.
-
-PipeWire
-
-
-Provided by the pipewire
package on Alpine.
-
-
-RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
-
-
-This means you need rtkit
installed and running through your initialization system.
-
-PulseAudio
-
-On Alpine you'll need the pulseaudio
, pulseaudio-alsa
, and alsa-plugins-pulse
packages for PulseAudio with ALSA compatibility.
-Start pulseaudio(1)
when you want audio, ideally in your .xinitrc
.
-
-
Media
mpv(1)
and vlc(1)
are good options.