From d3bdf4c3b5f14b66a2b14b5d28a3fc1fdf1cf341 Mon Sep 17 00:00:00 2001 From: dtb Date: Wed, 31 Aug 2022 14:31:36 -0400 Subject: [PATCH] m4ify software --- homepage/Makefile | 11 +- homepage/html.m4 | 8 +- homepage/navreturn.m4 | 4 + homepage/phones/index.m4 | 16 +- homepage/software/Makefile | 2 + homepage/software/{index.html => index.m4} | 307 ++++++++++----------- 6 files changed, 173 insertions(+), 175 deletions(-) create mode 100644 homepage/navreturn.m4 create mode 100644 homepage/software/Makefile rename homepage/software/{index.html => index.m4} (56%) diff --git a/homepage/Makefile b/homepage/Makefile index 3fefed9..97cc7ca 100644 --- a/homepage/Makefile +++ b/homepage/Makefile @@ -3,7 +3,7 @@ MAKE = make RM = rm -f -generate: index.html css/index.html home/index.html phones/index.html +generate: index.html subdirs index.html: \ index.m4 \ @@ -23,16 +23,13 @@ trinitisms.m4 \ zelda.m4 m4 index.m4 >index.html -css/index.html: head.m4 css/index.m4 +subdirs: $(MAKE) -C css - -home/index.html: head.m4 home/index.m4 $(MAKE) -C home - -phones/index.html: head.m4 html.m4 phones/index.m4 $(MAKE) -C phones + $(MAKE) -C software clean: - $(RM) index.html css/index.html home/index.html phones/index.html + $(RM) index.html css/index.html home/index.html phones/index.html software/index.html .PHONY: generate clean diff --git a/homepage/html.m4 b/homepage/html.m4 index 5f150b4..4065fe3 100644 --- a/homepage/html.m4 +++ b/homepage/html.m4 @@ -1,4 +1,6 @@ -define(`td', `$1') -define(`th', `$1') -define(`tr', `$1') +define(`_code', `$1') +define(`_hyperlink', `$2') +define(`_td', `$1') +define(`_th', `$1') +define(`_tr', `$1') define(`_BAR', `
') diff --git a/homepage/navreturn.m4 b/homepage/navreturn.m4 new file mode 100644 index 0000000..0d0ac4c --- /dev/null +++ b/homepage/navreturn.m4 @@ -0,0 +1,4 @@ +

~ Return to the rest of the site

+ + + diff --git a/homepage/phones/index.m4 b/homepage/phones/index.m4 index 34d0ae7..e14bff5 100644 --- a/homepage/phones/index.m4 +++ b/homepage/phones/index.m4 @@ -19,14 +19,14 @@ include(`../html.m4')dnl

updated 2022-08-30

_BAR - - th(`Phone') th(`Battery') th(`Charging jack') th(`Codecs') th(`Firmware') th(`Headphone jack') th(`Keyboard') th(`OS') th(`SD') th(`WLAN') -td(`Samsung SCH-R390') good(`Good') bad(`Micro USB-B, no OTG') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') bad(`No') - td(`LG UN280') good(`Decent') bad(`Micro USB-B, no OTG') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') bad(`No') -td(`iPhone SE (2016)') bad(`Dismal') bad(`Proprietary') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') bad(`Software') bad(`Proprietary') bad(`None') good(`Yes') - td(`Unihertz Titan') good(`Excellent') good(`USB-C PD') good(`Configurable') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') good(`Yes') - td(`Pinephone') good(`Upgradeable') good(`USB-C PD') good(`Configurable') good(`Changeable') good(`3.5mm') good(`Software or hardware') good(`Open') good(`Micro') good(`Yes') - td(`Punkt MP-02') good(`Excellent') bad(`USB-C but no PD') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') bad(`over USB-C') good(`Hardware') bad(`Proprietary') bad(`None') good(`Yes') +
+ _th(`Phone') _th(`Battery') _th(`Charging jack') _th(`Codecs') _th(`Firmware') _th(`Headphone jack') _th(`Keyboard') _th(`OS') _th(`SD') _th(`WLAN') +_td(`Samsung SCH-R390') good(`Good') bad(`Micro USB-B, no OTG') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') bad(`No') + _td(`LG UN280') good(`Decent') bad(`Micro USB-B, no OTG') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') bad(`No') +_td(`iPhone SE (2016)') bad(`Dismal') bad(`Proprietary') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') good(`3.5mm') bad(`Software') bad(`Proprietary') bad(`None') good(`Yes') + _td(`Unihertz Titan') good(`Excellent') good(`USB-C PD') good(`Configurable') bad(`Proprietary') good(`3.5mm') good(`Hardware') bad(`Proprietary') good(`Micro') good(`Yes') + _td(`Pinephone') good(`Upgradeable') good(`USB-C PD') good(`Configurable') good(`Changeable') good(`3.5mm') good(`Software or hardware') good(`Open') good(`Micro') good(`Yes') + _td(`Punkt MP-02') good(`Excellent') bad(`USB-C but no PD') bad(`No FLAC, no Vorbis, no VP8') bad(`Proprietary') bad(`over USB-C') good(`Hardware') bad(`Proprietary') bad(`None') good(`Yes')

Samsung SCH-R390

diff --git a/homepage/software/Makefile b/homepage/software/Makefile new file mode 100644 index 0000000..103b909 --- /dev/null +++ b/homepage/software/Makefile @@ -0,0 +1,2 @@ +index.html: index.m4 ../head.m4 ../html.m4 ../navreturn.m4 + m4 index.m4 >index.html diff --git a/homepage/software/index.html b/homepage/software/index.m4 similarity index 56% rename from homepage/software/index.html rename to homepage/software/index.m4 index 1c5be85..26d9d5a 100644 --- a/homepage/software/index.html +++ b/homepage/software/index.m4 @@ -1,22 +1,15 @@ - - - - - - - - -knowledge/software - +define(`_TITLE', `guide to software')dnl +define(`_DESCRIPTION', `do not read')dnl +define(`_PAGE', `software/')dnl +define(`_STYLE', `')dnl +include(`../html.m4')dnl +include(`../head.m4')dnl -

~ Return to the rest of the site

- - - +include(`../navreturn.m4')dnl

software

-
+_BAR

Foreword

Due to the majority of designers having typical ability, use of computers may be significantly more challenging for users with disabilities, especially affecting sight and reading. @@ -40,8 +33,8 @@ Non-standard, proprietary operating systems such as Microsoft Windows or OS/2 ar

UNIX

Advanced Configuration and Power Interface

@@ -53,28 +46,28 @@ The Advanced Configuration and Power Interface, or ACPI, is the interface throug 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), +On Linux, _code(`acpi(1)') can be used to read and control ACPI events manually. +_code(`acpid(8)'), _code(`elogind(8)'), SystemD, and many desktop environments can control the ACPI automatically.

-On NetBSD, see acpi(4). +On NetBSD, see _code(`acpi(4)').

C Language

-For compilation, tcc(1), gcc(1), and clang(1) are all reasonable choices depending on your needs. +For compilation, _code(`tcc(1)'), _code(`gcc(1)'), and _code(`clang(1)') are all reasonable choices depending on your needs.

-On Alpine Linux, the standard library headers are in the musl-dev package. +On Alpine Linux, the standard library headers are in the _code(`musl-dev') package.

-In most system package managers, standard library documentation can be found in the man-pages and man-pages-posix packages. +In most system package managers, standard library documentation can be found in the _code(`man-pages') and _code(`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. +Alpine has _code(`build-base') and Debian has _code(`build-essential').

@@ -83,9 +76,9 @@ Alpine has build-base and Debian has build-essential.
  • Variations in echo implementations
  • -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): +Don't use _code(`echo(1)'), use _code(`printf(1)'). +_code(`printf(1)') simulates the _code(`printf(3)') function in the C standard I/O library which has no significant variations, whereas the functionality of _code(`echo(1)') can vary between vendors. +The following _code(`sh(1)') program provides _code(`echo(1)') through _code(`printf(1)'):

     #!/bin/sh
    @@ -100,11 +93,11 @@ printf "%s" "$*"
     

    Fonts

    fstab

    -

    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.

    +

    See _code(`fstab(5).')

    +

    postmarketOS requires that the _code(`localmount') OpenRC service be enabled for the system to read _code(`fstab(5)'). +

    Arch and Artix have fstab generators at _code(`genfstab(8)') and _code(`fstabgen(8)') respectively in their installation scripts.

    -

    Linux

    +

    Linux

    -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 ("Adding sound") says to install _code(`alsa-conf'), _code(`alsa-lib'), and _code(`alsa-utils'), +add yourself to the _code(`audio') group, and then do some more configuration that I've never needed to do: +Use _code(`alsamixer(1)') to find a working sound card (press _code(`F6') from the first screen ALSAMixer presents) +and edit _code(`/usr/share/alsa/alsa.conf') and change _code(`defaults.ctl.card') and _code(`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. +The Alpine wiki doesn't mention this but you'll need to enable the _code(`alsa') OpenRC service and either start it or reboot. +I also installed _code(`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. @@ -150,18 +143,18 @@ Deprecated, unfortunately.

  • PipeWire (FreeDesktop Wiki)
  • -Provided by the pipewire package on Alpine. +Provided by the _code(`pipewire') package on Alpine.

     RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
     

    -This means you need rtkit installed and running through your initialization system. +This means you need _code(`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. +On Alpine you'll need the _code(`pulseaudio'), _code(`pulseaudio-alsa'), and _code(`alsa-plugins-pulse') packages for PulseAudio with ALSA compatibility. +Start _code(`pulseaudio(1)') when you want audio, ideally in your _code(`.xinitrc').

    Distribution

    @@ -175,8 +168,8 @@ Linux is usually obtained as part of a software distribution put together to for
    Always install manual pages

    -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. +Alpine doesn't include man pages in program packages to save on space, instead keeping them in _code(`[package]-doc') sibling packages. +To always install doc packages with program packages, _code(`apk add docs').

    Arch

    @@ -185,18 +178,18 @@ Arch is known for using the latest versions of programs, which has given it an u

    Bootstrapping

    -Use pacstrap(8). +Use _code(`pacstrap(8)').

    -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. +At a minimum you need the _code(`base') package. +Select a kernel and install the corresponding package; _code(`linux'), _code(`linux-lts'), or another Linux configuration or fork. +The Arch wiki says you need to install _code(`linux-firmware'), this isn't strictly necessary but it is recommended. +Install _code(`base-devel') if you plan on using the AUR or if you don't know what the AUR is yet.

    It's also a good idea to install any utilities you'll need on the bootstrapped system. Text editors, network managers or utilities, and other administration tools, for example. -Manual utilities such as man-db and others would also be useful. +Manual utilities such as _code(`man-db') and others would also be useful.

    Ubiquitous packages missing

    From the anals of my notes, 2021-06-04:

    @@ -244,9 +237,9 @@ Artix refers to the series of Arch derivatives which use initialization systems
    Bootstrapping

    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. +Artix uses _code(`basestrap(8)') rather than _code(`pacstrap(8)'); +you need to select the initialization you want to use: _code(`66'), _code(`dinit'), _code(`openrc'), _code(`runit'), or _code(`s6-base'), as a package separate from _code(`base'); +and Artix's official wiki says you need to install the appropriate _code(`elogind') package (_code(`elogind-[initialization system]') e.g. _code(`elogind-66')) but like _code(`linux-firmware') though it is helpful it isn't strictly necessary.

    Debian

    @@ -273,14 +266,14 @@ postmarketOS is an Alpine-based Linux software distribution that makes configuri

    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: +In _code(`/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 a live system you can then _code(`rc-service networkmanager restart') to restart NetworkManager and have it load the new configuration.

    Ubuntu

    @@ -299,12 +292,12 @@ Ubuntu is a derivative of Debian.
  • logind (NixOS Wiki)
  • -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. +logind (_code(`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). +It can be configured in _code(`logind.conf(5)').

    -On systems without SystemD and with conflicting software, elogind(8) may be used. +On systems without SystemD and with conflicting software, _code(`elogind(8)') may be used.

    Xenia

    @@ -318,23 +311,23 @@ Xenia was an entry for the Linux logo competition which Tux eventually won.

    Make utility

    -make(1) in modern times is fragmented into the GNU version (in context, gmake) and the {Free,Open,Net}BSD version (bmake). +_code(`make(1)') in modern times is fragmented into the GNU version (in context, _code(`gmake')) and the {Free,Open,Net}BSD version (_code(`bmake')). Complex Makefiles may not be useable in both. -It's custom for Linux systems to have make(1) as GNU Make and bmake(1) as BSD Make, and BSD-based systems to have make(1) as BSD Make and gmake(1) as GNU Make. +It's custom for Linux systems to have _code(`make(1)') as GNU Make and _code(`bmake(1)') as BSD Make, and BSD-based systems to have _code(`make(1)') as BSD Make and _code(`gmake(1)') as GNU Make.

    On-line manual

    In the context of POSIX and UNIX-like systems, an "on-line" manual is a manual that is accessible via the computer system it documents. -Particularly, the man(1) utility and the manual "pages" it references. +Particularly, the _code(`man(1)') utility and the manual "pages" it references.

    -Alpine by default uses mandoc. +Alpine by default uses _code(`mandoc').

    Paging

    -less(1) is more(1); more or less. +_code(`less(1)') is _code(`more(1)'); more or less.

    Partitions and filesystems

    @@ -359,17 +352,17 @@ Your needs will vary. Check out the linked pages in the "See also" section.

    -Use mkfs(8) for creating filesystems and mount(8) for mounting partitions' filesystems. +Use _code(`mkfs(8)') for creating filesystems and _code(`mount(8)') for mounting partitions' filesystems.

    gpart

    -Available as sysutils/gpart in pkgsrc. +Available as _code(`sysutils/gpart') in pkgsrc.

    -gpart(8) is a tool that scans a file (or block device presented as a file) for drive partitions regardless of any table present on the medium. +_code(`gpart(8)') is a tool that scans a file (or block device presented as a file) for drive partitions regardless of any table present on the medium.

    LUKS

    -e2fsprogs is needed for the dm_mod kernel module used for LUKS partition decryption. +_code(`e2fsprogs') is needed for the _code(`dm_mod') kernel module used for LUKS partition decryption.

    -To format a partition to a LUKS volume, determine the physical block device location for that partition and run cryptsetup luksFormat [partition]. +To format a partition to a LUKS volume, determine the physical block device location for that partition and run _code(`cryptsetup luksFormat [partition]'). The passphrase used can be changed or removed after creation.

    -To open a LUKS volume, use cryptsetup luksOpen [partition] [name]. -This name is the name the decrypted block device location will take in /dev/mapper/. +To open a LUKS volume, use _code(`cryptsetup luksOpen [partition] [name]'). +This name is the name the decrypted block device location will take in _code(`/dev/mapper/').

    Before the decrypted block device has a filesystem it'll just be cleared space - format as normal but use the decrypted block device location.

    -To mount a partition in an opened LUKS volume, use mount(8) as normal, just with the decrypted block device location. +To mount a partition in an opened LUKS volume, use _code(`mount(8)') as normal, just with the decrypted block device location.

    -To close an open LUKS volume, umount(8) any mapped and mounted partitions from the volume and cryptsetup luksClose [name]. +To close an open LUKS volume, _code(`umount(8)') any mapped and mounted partitions from the volume and _code(`cryptsetup luksClose [name]').

    -To make the LUKS partition openable via keyfile, first make a keyfile (dd if=/dev/urandom of=/root/keyfile bs=1024 count=4 seems to work), and optionally make it readable by root only (chmod 0400 [keyfile]). -Then add the keyfile to the partition's LUKS header with cryptsetup luksAddKey [physical partition block device] [keyfile]. +To make the LUKS partition openable via keyfile, first make a keyfile (_code(`dd if=/dev/urandom of=/root/keyfile bs=1024 count=4') seems to work), and optionally make it readable by root only (_code(`chmod 0400 [keyfile]')). +Then add the keyfile to the partition's LUKS header with _code(`cryptsetup luksAddKey [physical partition block device] [keyfile]').

    dm-crypt

    -dm-crypt is a service that automatically mounts LUKS volumes at boot. +_code(`dm-crypt') is a service that automatically mounts LUKS volumes at boot.

    -On most OpenRC-initialized distributions, the cryptsetup-openrc package provides dmcrypt. +On most OpenRC-initialized distributions, the _code(`cryptsetup-openrc') package provides _code(`dmcrypt'). Make sure that service is added to runlevel boot.

    -Configuration is in /etc/conf.d/dmcrypt and further configuration should be done in fstab. -dm-crypt will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper. +Configuration is in _code(`/etc/conf.d/dmcrypt') and further configuration should be done in _code(`fstab'). +_code(`dm-crypt') will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper.

    TestDisk

    Battery

    -

    envstat(1) can show the current battery status.

    +

    _code(`envstat(1)') can show the current battery status.

    Mounting filesystems

    1. Connect the drive with the filesystem you want to access.
    2. -
    3. Use dmesg(8) to determine the location in /dev/ of the disk.
    4. -
    5. disklabel(8) the drive to determine which partition on the disk you want to access (disklabel /dev/disk)
    6. -
    7. mount(8) the filesystem.
    8. -
    9. umount(8) the filesystem when done using it.
    10. +
    11. Use _code(`dmesg(8)') to determine the location in _code(`/dev/') of the disk.
    12. +
    13. _code(`disklabel(8)') the drive to determine which partition on the disk you want to access (_code(`disklabel /dev/disk'))
    14. +
    15. _code(`mount(8)') the filesystem.
    16. +
    17. _code(`umount(8)') the filesystem when done using it.

    ext4

    -Install filesystems/fuse and filesystems/fuse-ext2. -disklabel(8) will list ext4 filesystems as of type "Linux Ext2". -Use fuse-ext2(1) to mount the filesystem. +Install _code(`filesystems/fuse') and _code(`filesystems/fuse-ext2'). +_code(`disklabel(8)') will list ext4 filesystems as of type "Linux Ext2". +Use _code(`fuse-ext2(1)') to mount the filesystem.

    -fuse-ext2(1) is spotty in places and may not work correctly. +_code(`fuse-ext2(1)') is spotty in places and may not work correctly.

    exFAT

    -Install filesystems/fuse and filesystems/fuse-exfat. -Use mount.exfat to mount the filesystem (the manual page for which is mount.exfat-fuse(8)). +Install _code(`filesystems/fuse') and _code(`filesystems/fuse-exfat'). +Use _code(`mount.exfat') to mount the filesystem (the manual page for which is _code(`mount.exfat-fuse(8)')).

    -

    Fix SSL certificate problem: unable to get local issuer certificate

    +

    Fix _code(`SSL certificate problem: unable to get local issuer certificate')

    -

    Install security/mozilla-rootcerts-openssl.

    +

    Install _code(`security/mozilla-rootcerts-openssl').

    -Do not use SSL workarounds like (in the case of git) GIT_SSL_NO_VERIFY. +Do not use SSL workarounds like (in the case of git) _code(`GIT_SSL_NO_VERIFY'). These leave your system open to man-in-the-middle attacks.

    rc.d

    @@ -470,8 +463,8 @@ These leave your system open to man-in-the-middle attacks. -

    See syslogd(8) and syslog.conf(5), which pertain to system logging.

    -

    Setting DDB_ONPANIC (see options(4) and sysctl(8)) will save a crash dump at /var/crash on kernel panic. +

    See _code(`syslogd(8)') and _code(`syslog.conf(5)'), which pertain to system logging.

    +

    Setting _code(`DDB_ONPANIC') (see _code(`options(4)') and _code(`sysctl(8)')) will save a crash dump at _code(`/var/crash') on kernel panic.

    Upgrading

    -Available as sysutils/pciutils from pkgsrc. -Supplies lspci(8), setpci(8), and update-pciids(8). +Available as _code(`sysutils/pciutils') from pkgsrc. +Supplies _code(`lspci(8)'), _code(`setpci(8)'), and _code(`update-pciids(8)').

    -update-pciids(8) is not part of the pciutils package in Alpine Linux repositories. +_code(`update-pciids(8)') is not part of the _code(`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. +NetBSD includes _code(`pcictl(8)') which offers similar functionality. +_code(`pcictl pci0 list') outputs roughly the same information as _code(`lspci(8)'), though _code(`lspci(8)') may offer slightly more detailed information.

    pkgsrc

    @@ -504,7 +497,7 @@ NetBSD includes pcictl(8) which offers similar functionality.
  • how to upgrade packages (NetBSD Developer Wiki snapshot; 2020-09-09)
  • -See pkgtools/pkg_rolling_replace. +See _code(`pkgtools/pkg_rolling_replace').

    Power settings

    @@ -518,11 +511,11 @@ Power is managed by ACPI.
  • Checking for existing SSH keys (GitHub Docs)
  • Generating a new SSH key and adding it to the ssh-agent (GitHub Docs)
  • -

    SSH keys are typically stored in $HOME/.ssh.

    -

    Typically, the public key's filename will be suffixed with .pub, while the private key will not.

    -

    You can generate an SSH key with ssh-keygen(1). Currently the preferred implementation is openssh-keygen, part of the OpenSSH suite.

    +

    SSH keys are typically stored in _code(`$HOME/.ssh').

    +

    Typically, the public key's filename will be suffixed with _code(`.pub'), while the private key will not.

    +

    You can generate an SSH key with _code(`ssh-keygen(1)'). Currently the preferred implementation is _code(`openssh-keygen'), part of the OpenSSH suite.

    -Microsoft GitHub documentation suggests a user create a key with ssh-keygen -t ed25519 -C "[e-mail address]". +Microsoft GitHub documentation suggests a user create a key with _code(`ssh-keygen -t ed25519 -C "[e-mail address]"'). This generates an Ed25519 SSH key with an e-mail address in the key comment.

    @@ -531,26 +524,26 @@ This generates an Ed25519<
  • Common pronunciations of Linux directories, commands, etc
  • Task management

    -

    top(1) comes with busybox, otherwise use htop.

    +

    _code(`top(1)') comes with busybox, otherwise use _code(`htop').

    Text editing

    -nano(1) is a text editor that's usually recommended for beginners because its controls are more intuitive. -ne(1) is like nano(1) but with different superpowers. Not yet in pkgsrc. +_code(`nano(1)') is a text editor that's usually recommended for beginners because its controls are more intuitive. +_code(`ne(1)') is like _code(`nano(1)') but with different superpowers. Not yet in pkgsrc.

    ed

    -A particularly shoddy attempt at ed(1) is provided by busybox. -A traditional ed(1) implementation is in plan9ports. -I'm pretty sure some later UNIX-based OSes doubled the ed(1) buffers, there's pretty much no downside to doing so in the modern era but it should be very easy to do yourself if it hasn't already been done (just double some of the array sizes in the beginning of ed.c). +A particularly shoddy attempt at _code(`ed(1)') is provided by _code(`busybox'). +A traditional _code(`ed(1)') implementation is in plan9ports. +I'm pretty sure some later UNIX-based OSes doubled the _code(`ed(1)') buffers, there's pretty much no downside to doing so in the modern era but it should be very easy to do yourself if it hasn't already been done (just double some of the array sizes in the beginning of _code(`ed.c')).

    vi

    -Unlike busybox's ed(1) implementation, its vi(1) is very useable. -vim(1) is a popular re-implementation of vi(1). +Unlike _code(`busybox')'s _code(`ed(1)') implementation, its _code(`vi(1)') is very useable. +_code(`vim(1)') is a popular re-implementation of _code(`vi(1)').

    emacs

    @@ -560,8 +553,8 @@ Linus Torvalds uses his own fork of uEmacs ("micro Emacs"), an Emacs without the

    cat

    -Technically cat(1) and other UNIX utilities can be used in a hacky way for text editing functions. -You'd be better off using ed(1); the UX is very similar. +Technically _code(`cat(1)') and other UNIX utilities can be used in a hacky way for text editing functions. +You'd be better off using _code(`ed(1)'); the UX is very similar.

    true(1)

    @@ -576,45 +569,45 @@ You'd be better off using ed(1); the UX is very similar.

    -true(1) is a tool that only quits silently with an exit status of 0. -Similarly, false(1) is a tool that only quits silently with an exit status of 1. -Recognizing arguments, printing to standard output, reading from standard input, or otherwise exiting with any other status of 0, is a violation of the POSIX specification for true(1). +_code(`true(1)') is a tool that only quits silently with an exit status of 0. +Similarly, _code(`false(1)') is a tool that only quits silently with an exit status of 1. +Recognizing arguments, printing to standard output, reading from standard input, or otherwise exiting with any other status of 0, is a violation of the POSIX specification for _code(`true(1)'). These utilities find use in shell scripting, which, though extremely relevant to these utilities, is beyond the scope of this article.

    -Because true(1)'s required functionality is so simple a POSIX-compliant implementation is a one-liner in most languages, so long as you're willing to make an exception in your code styling. +Because _code(`true(1)')'s required functionality is so simple a POSIX-compliant implementation is a one-liner in most languages, so long as you're willing to make an exception in your code styling. For example, in C:

    -
    
    +
     int main(void) { return 0; }
    -
    +

    -Because executing an empty shellscript file will in most shells do nothing and return an exit status of 0, technically an empty shellscript file is a POSIX-compliant true(1) implementation in 0 bytes. -This was the true(1) implementation on early versions of UNIX, including Research UNIX, System V, and Sun's Solaris, according to both Rob Pike and John Chambers. +Because executing an empty shellscript file will in most shells do nothing and return an exit status of 0, technically an empty shellscript file is a POSIX-compliant _code(`true(1)') implementation in 0 bytes. +This was the _code(`true(1)') implementation on early versions of UNIX, including Research UNIX, System V, and Sun's Solaris, according to both Rob Pike and John Chambers. A more explicit implementation also exists in POSIX shell:

    -
    
    +
     #!/bin/sh
     exit 0
    -
    +

    This happens to be nearly identical in source to the implementation used by NetBSD.

    -Python has the same 0 byte true(1) implementation feature as most shells. -Here's false(1) in Python rather than true(1) to demonstrate how exiting with an arbitrary exit status can be done: +Python has the same 0 byte _code(`true(1)') implementation feature as most shells. +Here's _code(`false(1)') in Python rather than _code(`true(1)') to demonstrate how exiting with an arbitrary exit status can be done:

    -
    
    +
     import sys
     sys.exit(1)
    -
    +

    -In some shells, true(1) is a shell built-in command, so running true will run the shell author's implementation of true(1) rather than the system implementation. +In some shells, _code(`true(1)') is a shell built-in command, so running _code(`true') will run the shell author's implementation of _code(`true(1)') rather than the system implementation.

    -GNU true(1), from the GNU coreutils, is well known for being a maximalist implementation - it's eighty lines long and directly includes four C header files. -Their true.c is 2.3 kilobytes and parses the arguments --help and --version (only if either are the first argument to the program). -The GNU coreutils implementation of true(1) is not POSIX compliant. +GNU _code(`true(1)'), from the GNU coreutils, is well known for being a maximalist implementation - it's eighty lines long and directly includes four C header files. +Their _code(`true.c') is 2.3 kilobytes and parses the arguments _code(`--help') and _code(`--version') (only if either are the first argument to the program). +The GNU coreutils implementation of _code(`true(1)') is not POSIX compliant.

    util-linux

    @@ -622,13 +615,13 @@ The GNU coreutils implementation of true(1) is not POSIX compliant.
  • util-linux - Wikipedia
  • -util-linux is distributed on all popular Linux distributions and contains utilities users may expect to be already present on their systems, like more(1) or hexdump(1). +_code(`util-linux') is distributed on all popular Linux distributions and contains utilities users may expect to be already present on their systems, like _code(`more(1)') or _code(`hexdump(1)').

    WiFi

    wpa_supplicant

    -wpa_supplicant(1) is usually good enough for establishing WiFi connections. +_code(`wpa_supplicant(1)') is usually good enough for establishing WiFi connections.

    Here's an example configuration for a simple WPA-2 PSK access point. @@ -642,7 +635,7 @@ network={ }

    -See wpa_supplicant.conf(5). +See _code(`wpa_supplicant.conf(5)').

    X

    @@ -652,38 +645,38 @@ See wpa_supplicant.conf(5).

    X is a graphical windowing system that can be used on Linux, FreeBSD, OpenBSD, NetBSD, and some proprietary operating systems as well. -X is not the only windowing system; twin(1) exists for windowed multitasking within a framebuffer and Wayland is another windowing system intended to replace X. +X is not the only windowing system; _code(`twin(1)') exists for windowed multitasking within a framebuffer and Wayland is another windowing system intended to replace X.

    -Xorg requires the user to be a member of the input and video groups (or superuser), otherwise it won't be able to access the relevent device files. -These errors look like Failed to open /dev/input/event[number] (Permission denied) when not in the input group -and Failed to open /dev/tty[number] (Permission denied) when not in the video group. +Xorg requires the user to be a member of the _code(`input') and _code(`video') groups (or superuser), otherwise it won't be able to access the relevent device files. +These errors look like _code(`Failed to open /dev/input/event[number] (Permission denied)') when not in the _code(`input') group +and _code(`Failed to open /dev/tty[number] (Permission denied)') when not in the _code(`video') group.

    Some Linux software distributions have included scripts to automatically fetch and install an X server. -Alpine has setup-xorg-base, which adds the packages xorg-server, xf86-input-libinput, eudev, and mesa, and then enables the OpenRC services for udev. +Alpine has _code(`setup-xorg-base'), which adds the packages _code(`xorg-server'), _code(`xf86-input-libinput'), _code(`eudev'), and _code(`mesa'), and then enables the OpenRC services for udev.

    -startx(1) is provided as part of xinit. +_code(`startx(1)') is provided as part of xinit.

    -Arch has the xorg and xorg-apps package groups. -Documentation can be found within xorg-docs, -drivers within the xorg-drivers package group, -the server itself as xorg-server, -the X event monitor as xorg-xev, -xinit as xorg-xinit, -xinput as xorg-xinput, -XRandR as xorg-xrandr, -the X resource database manager as xorg-xrdb, -xset as xorg-xset, -and xsetroot as xorg-xsetroot. +Arch has the _code(`xorg') and _code(`xorg-apps') package groups. +Documentation can be found within _code(`xorg-docs'), +drivers within the _code(`xorg-drivers') package group, +the server itself as _code(`xorg-server'), +the X event monitor as _code(`xorg-xev'), +xinit as _code(`xorg-xinit'), +xinput as _code(`xorg-xinput'), +XRandR as _code(`xorg-xrandr'), +the X resource database manager as _code(`xorg-xrdb'), +xset as _code(`xorg-xset'), +and xsetroot as _code(`xorg-xsetroot').

    -

    Alpine has xinput as xinput.

    +

    Alpine has xinput as _code(`xinput').

    Media

    -mpv(1) and vlc(1) are good options. +_code(`mpv(1)') and _code(`vlc(1)') are good options.

    Window Management

    @@ -699,7 +692,7 @@ Contrary to what is now popular belief, window managers are not necessary (thoug

    Web Browsing

    TOR Browser

    -TOR Browser is available through pkgsrc at security/tor-browser. +TOR Browser is available through pkgsrc at _code(`security/tor-browser').