diff --git a/.gitignore b/.gitignore index d34a477f57..15e0ac7666 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ pkgsrc/ # (see src/BASE, xsrc/BASE). pkgsrc/ is its own repository. They are not # ignored here on purpose: a patch we own has to be visible in `git status`. __pycache__/ + +# docs/guide/out is generated by docs/guide/build.sh; the installed copies in +# src/ are the tracked ones. +docs/guide/out/ diff --git a/docs/AGENTS.md b/docs/AGENTS.md index 8242ff871a..7e9e484e29 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -23,6 +23,9 @@ here: they go stale within a day and mislead. What is durable goes into the confirmed by Konrad -- `tasksd t0062`). - `reference/` -- saved upstream documentation (`reference/AGENTS.md`). - `logo/` -- the logo (`logo/AGENTS.md`). +- `guide/` -- The Makronix Guide: one DocBook source, four installed forms + (manual pages, PDF, HTML, MCDE information library). Its `AGENTS.md` + describes the build and the generated files. ## What may be changed diff --git a/docs/guide/AGENTS.md b/docs/guide/AGENTS.md new file mode 100644 index 0000000000..d695286524 --- /dev/null +++ b/docs/guide/AGENTS.md @@ -0,0 +1,64 @@ +# docs/guide -- The Makronix Guide + +## What it is for + +The source of the Makronix Guide and the four forms it is installed in: +manual pages, PDF, one HTML file and an MCDE information library. The text +follows the structure of The NetBSD Guide and describes Makronix 0.99.10 +(Camouflage). + +## What is in it + +- `book.xml` -- the book, with one XInclude per chapter. +- `chapters.list` -- the manifest: id, title, man-page suffix and source file. + The build reads it; keep it in step with `book.xml` and the chapter files. +- `chapters/*.xml` -- the text, one chapter per file, DocBook XML 4.5. +- `template.html5` and `style.css` -- the HTML and print form. The colours + are the Camouflage palette (the same as `www/style.css`), and the logo is + `docs/logo/makronix.png`. +- `tools/docbook-to-cde.lua` -- the writer that turns the DocBook XML into + the older DocBook SGML that MCDE's `dtdocbook2infolib` reads. +- `build.sh` -- the build: `all`, `html`, `pdf`, `man`, `infolib`, `check` + and `install`. +- `out/` -- the generated forms (not tracked). + +## How to build + +``` +sh docs/guide/build.sh all # all four forms in out/ +sh docs/guide/build.sh check # every form exists, PDF has pages, man renders +sh docs/guide/build.sh install # copy into src/ for the release +``` + +It needs `pandoc`, `xmllint`, `mandoc`, `base64` and Google Chrome (for the +PDF). The information library needs a host build of MCDE +(`make mcde-host`), which provides `build/mcde-root/dt/bin/dtdocbook2infolib`. + +`build.sh install` writes the forms into the tree: + +- `src/share/doc/makronix/makronix-guide.html`, `.pdf` and + `infolib/makronix.dti/` (base set, `base-sys-share`); +- `src/share/man/man7/makronix-guide*.7` (base set, `man-reference-man`); +- `src/etc/makronix-xsession` (installed as + `/etc/dt/config/Xsession.d/0000makronix`), and the symlinks under + `/etc/dt/infolib` that `src/etc/Makefile` makes. + +The copy of the guide in `out/` and the copy in `src/` must be the same; the +build's `install` verb is the only way the second one changes. + +## What may be changed + +The text, the chapter manifest, the template, the stylesheet and the build. +A new chapter needs a line in `chapters.list`, a file in `chapters/`, an +XInclude in `book.xml`, a `MAN+=` line in `src/share/man/man7/Makefile` and +its entries in the set lists. Rebuild and install; do not edit the generated +formats by hand. + +## What must not be touched + +- The generated files in `src/`: they are output, not source. +- The logo (`docs/logo/`); the guide only embeds it. +- The NetBSD Guide attribution in Appendix C; the general NetBSD + procedures come from it. + + diff --git a/docs/guide/book.xml b/docs/guide/book.xml new file mode 100644 index 0000000000..40a4424100 --- /dev/null +++ b/docs/guide/book.xml @@ -0,0 +1,53 @@ + + + + + + The Makronix Guide + A guide to the Makronix operating system and the MCDE desktop + + Makronix + + November 2026 + For Makronix 0.99.10 (Camouflage), based on NetBSD + + This guide is part of Makronix. The Makronix text is under the + CNCL 1.0; the parts derived from The NetBSD Guide keep the NetBSD + copyright. Appendix C has the details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/guide/build.sh b/docs/guide/build.sh new file mode 100755 index 0000000000..6bf2380fac --- /dev/null +++ b/docs/guide/build.sh @@ -0,0 +1,317 @@ +#!/bin/sh +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# +# build.sh -- build The Makronix Guide. +# +# The guide has one source, docs/guide/book.xml with one file per chapter in +# docs/guide/chapters. This script derives the four forms from it: +# +# out/makronix-guide.html one self-contained HTML file (CSS and logo in it) +# out/makronix-guide.pdf the same page printed by Chrome +# out/man/*.7 one manual page per chapter and the index +# out/infolib/makronix.dti the MCDE Information Manager bookcase +# +# Usage: docs/guide/build.sh [all|html|pdf|man|infolib|check|install] +# +# The MCDE infolib step needs a host build of MCDE (make mcde-host); it uses +# build/mcde-root/dt/bin/dtdocbook2infolib. + +set -eu + +TOP=$(cd "$(dirname "$0")/../.." && pwd) +GUIDE=$TOP/docs/guide +OUT=$GUIDE/out +MCDE=$TOP/ext/src/mcde +ARCH=${ARCH:-amd64} +DESTDIR=${DESTDIR:-$TOP/build/obj/destdir.$ARCH} +DOCDIR=$TOP/src/share/doc/makronix +MANDIR=$TOP/src/share/man/man7 +ETCDIR=$TOP/src/etc + +TMP= +cleanup() +{ + [ -n "$TMP" ] && rm -rf "$TMP" +} +trap cleanup EXIT INT TERM + +die() +{ + echo "guide: $*" >&2 + exit 1 +} + +find_tool() +{ + for t in "$@"; do + if command -v "$t" >/dev/null 2>&1; then + command -v "$t" + return 0 + fi + done + return 1 +} + +PANDOC=$(find_tool pandoc) || die "pandoc is not installed" +XMLLINT=$(find_tool xmllint) || die "xmllint is not installed" +MANDOC=$(find_tool mandoc) || die "mandoc is not installed" +PDFINFO=$(find_tool pdfinfo) || true +BASE64=$(find_tool base64) || die "base64 is not installed" +if [ -z "${CHROME:-}" ]; then + CHROME=$(find_tool google-chrome google-chrome-stable) || CHROME= +fi + +find_mcde_bin() +{ + for d in "$TOP/build/mcde-root/dt/bin" \ + "$TOP/build/mcde-host-stage/usr/mdt/bin"; do + if [ -x "$d/dtdocbook2infolib" ] && [ -x "$d/dtsrcreate" ]; then + echo "$d" + return 0 + fi + done + return 1 +} + +resolve_xml() +{ + $XMLLINT --xinclude --noout "$GUIDE/book.xml" || + die "book.xml does not resolve (XInclude or XML error)" + $XMLLINT --xinclude "$GUIDE/book.xml" > "$TMP/guide.xml" +} + +write_template() +{ + # The CSS is a plain file, not a pandoc variable: a stylesheet inside a + # template variable would be escaped. The logo goes in as a data URI so + # that the installed HTML is one file. + awk -v css="$GUIDE/style.css" ' + /^@CSS@$/ { + while ((getline line < css) > 0) print line + close(css) + next + } + { print } + ' "$GUIDE/template.html5" > "$TMP/template.html5" + logo=$($BASE64 < "$TOP/docs/logo/makronix.png" | tr -d '\n') + awk -v logo="data:image/png;base64,$logo" ' + { gsub(/@LOGO@/, logo); print } + ' "$TMP/template.html5" > "$TMP/template-html5" +} + +build_html() +{ + write_template + $PANDOC -f docbook -t html5 --standalone \ + --toc --toc-depth=2 --syntax-highlighting=none \ + --template="$TMP/template-html5" \ + --metadata title="The Makronix Guide" \ + --metadata subtitle="A guide to the Makronix operating system and the MCDE desktop" \ + --metadata edition="Makronix 0.99.10 (Camouflage) -- November 2026" \ + "$TMP/guide.xml" -o "$OUT/makronix-guide.html" || + die "pandoc could not write the HTML" + [ -s "$OUT/makronix-guide.html" ] || die "empty HTML" +} + +build_pdf() +{ + [ -n "$CHROME" ] || die "Chrome (google-chrome or chromium) is required for the PDF" + [ -s "$OUT/makronix-guide.html" ] || build_html + rm -f "$OUT/makronix-guide.pdf" + "$CHROME" --headless=new --no-sandbox --disable-gpu \ + --disable-dev-shm-usage --user-data-dir="$TMP/chrome" \ + --no-pdf-header-footer \ + --print-to-pdf="$OUT/makronix-guide.pdf" \ + "file://$OUT/makronix-guide.html" >"$TMP/chrome.log" 2>&1 || + { cat "$TMP/chrome.log" >&2; die "Chrome could not print the PDF"; } + [ -s "$OUT/makronix-guide.pdf" ] || die "empty PDF" +} + +upper() +{ + printf '%s' "$1" | tr '[:lower:]' '[:upper:]' +} + +build_man() +{ + mkdir -p "$OUT/man" + : > "$TMP/man.index" + while IFS='|' read -r id title suffix file; do + case "$id" in ''|\#*) continue ;; esac + $XMLLINT --xinclude --xpath "//*[@id='$id']" "$TMP/guide.xml" \ + > "$TMP/chapter.xml" || + die "chapter $id not found in book.xml" + $PANDOC -f docbook -t man "$TMP/chapter.xml" > "$TMP/chapter.man" || + die "pandoc could not write the man page for $id" + { + printf '.TH "%s" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide"\n' \ + "MAKRONIX-GUIDE-$(upper "$suffix")" + cat "$TMP/chapter.man" + } > "$OUT/man/makronix-guide-$suffix.7" + printf '%s|%s\n' "$suffix" "$title" >> "$TMP/man.index" + done < "$GUIDE/chapters.list" + { + printf '.TH "MAKRONIX-GUIDE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide"\n' + printf '.SH NAME\n' + printf 'makronix-guide \\- the Makronix Guide\n' + printf '.SH DESCRIPTION\n' + printf 'This is the guide to Makronix, a desktop operating system built on\n' + printf 'NetBSD, and to MCDE, its desktop. The guide has one chapter per\n' + printf 'manual page, and the same text is installed as a PDF and as an HTML\n' + printf 'file in\n' + printf '.Pa /usr/share/doc/makronix/ .\n' + printf '.PP\n' + printf 'The MCDE Information Manager\n' + printf '.Xr dtinfo 1\n' + printf 'opens the same text from its information library.\n' + printf '.SH CHAPTERS\n' + while IFS='|' read -r suffix title; do + printf '.TP\n' + printf '.B makronix-guide-%s(7)\n' "$suffix" + printf '%s\n' "$title" + done < "$TMP/man.index" + printf '.SH FILES\n' + printf '.TP\n' + printf '.I /usr/share/doc/makronix/makronix-guide.pdf\n' + printf 'The guide as a PDF.\n' + printf '.TP\n' + printf '.I /usr/share/doc/makronix/makronix-guide.html\n' + printf 'The guide as one HTML file.\n' + printf '.TP\n' + printf '.I /etc/dt/infolib/en_US.UTF-8/makronix.dti\n' + printf 'The guide as an MCDE information library.\n' + printf '.SH SEE ALSO\n' + printf '.BR dtinfo (1),\n' + printf '.BR man (1),\n' + printf '.BR afterboot (8)\n' + } > "$OUT/man/makronix-guide.7" +} + +build_infolib() +{ + MCDE_BIN=$(find_mcde_bin) || + die "no host MCDE build (build/mcde-root/dt/bin); run make mcde-host first" + mkdir -p "$TMP/cde" + $PANDOC -f docbook -t "$GUIDE/tools/docbook-to-cde.lua" "$TMP/guide.xml" \ + > "$TMP/cde/book.sgm" || + die "the DocBook to CDE SGML writer failed" + grep -q '' "$TMP/cde/book.sgm" || + die "the CDE writer produced no Book" + # A nested is invalid in the CDE DTD; catch it here, not in dtinfo. + if grep -q '[^<]*' "$TMP/cde/book.sgm"; then + die "the CDE writer produced a nested para" + fi + cat > "$TMP/cde/bookcase.bc" < + + +]> + +MAKRONIX +The Makronix Guide +&docsty; + +The Makronix Guide</> +<SHORTTITLE>Makronix Guide</> +<TOCFILE>&guideTOC;</> +<FILE>&guide;</> +</BOOK> +</BOOKCASE> +EOF + COMMON=$MCDE/doc/en_US.UTF-8/guides/common + PATH=$MCDE_BIN:$PATH + SGML_SEARCH_PATH=$TMP/cde:$MCDE/doc/en_US.UTF-8/guides:$MCDE/programs/dtdocbook/sgml + export PATH SGML_SEARCH_PATH + $MCDE_BIN/dtdocbook2infolib tocgen -L en_US.UTF-8 -T "$TMP/cde/toc" \ + -m "$COMMON/catalog" -f "$TMP/cde/TOC.sgm" \ + -id makronix.guide.toc -title "The Makronix Guide" \ + "$TMP/cde/book.sgm" > "$TMP/cde/toc.log" 2>&1 || + { cat "$TMP/cde/toc.log" >&2; die "tocgen failed"; } + $MCDE_BIN/dtdocbook2infolib build -v -L en_US.UTF-8 \ + -T "$TMP/cde/infolib-build" -m "$COMMON/catalog" \ + -l "$TMP/cde/infolib" -n makronix -d "The Makronix Guide" \ + "$TMP/cde/bookcase.bc" > "$TMP/cde/build.log" 2>&1 || + { cat "$TMP/cde/build.log" >&2; die "dtdocbook2infolib failed"; } + rm -rf "$OUT/infolib" + mkdir -p "$OUT/infolib" + cp -R "$TMP/cde/infolib" "$OUT/infolib/makronix.dti" + [ -f "$OUT/infolib/makronix.dti/bookcase.map" ] || + die "the information library has no bookcase.map" +} + +check_all() +{ + [ -s "$OUT/makronix-guide.html" ] || die "missing HTML" + [ -s "$OUT/makronix-guide.pdf" ] || die "missing PDF" + grep -q 'class="cover"' "$OUT/makronix-guide.html" || + die "the HTML has no cover" + grep -q 'The Makronix Guide' "$OUT/makronix-guide.html" || + die "the HTML does not name the guide" + [ -f "$OUT/man/makronix-guide.7" ] || die "missing man index" + n=0 + for f in "$OUT"/man/*.7; do + [ -f "$f" ] || continue + head -1 "$f" | grep -q '^\.TH ' || die "$f has no .TH line" + $MANDOC -Tutf8 "$f" >/dev/null 2>"$TMP/mandoc.err" || + { cat "$TMP/mandoc.err" >&2; die "$f does not render"; } + n=$((n + 1)) + done + [ "$n" -ge 2 ] || die "no man pages were generated" + [ -f "$OUT/infolib/makronix.dti/bookcase.map" ] || + die "missing information library" + [ -f "$OUT/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd" ] || + die "the information library has no book database" + if [ -n "$PDFINFO" ]; then + pages=$($PDFINFO "$OUT/makronix-guide.pdf" 2>/dev/null | + awk '/^Pages:/ { print $2 }') + [ -n "$pages" ] && [ "$pages" -gt 1 ] || + die "the PDF has no pages" + echo "guide: $n manual pages, $pages PDF pages" + else + echo "guide: $n manual pages (pdfinfo not installed)" + fi +} + +install_all() +{ + [ -s "$OUT/makronix-guide.html" ] || die "build the guide first" + [ -s "$OUT/makronix-guide.pdf" ] || die "build the guide first" + mkdir -p "$DOCDIR" "$MANDIR" "$ETCDIR" + cp "$OUT/makronix-guide.html" "$OUT/makronix-guide.pdf" "$DOCDIR/" + cp "$OUT"/man/*.7 "$MANDIR/" + # The Information Manager uses the default library name; the session + # script makes the Makronix Guide the default. The library data is + # installed under /usr/share/doc/makronix/infolib; src/etc/Makefile + # makes the symlink under /etc/dt/infolib. + cat > "$ETCDIR/makronix-xsession" <<'EOF' +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# The Makronix Guide is the default library of the Information Manager. +# See docs/guide and makronix-guide(7). +DTINFOLIBDEFAULT=makronix +export DTINFOLIBDEFAULT +EOF + chmod 755 "$ETCDIR/makronix-xsession" + echo "guide: installed into src/share/doc/makronix, src/share/man/man7 and src/etc" +} + +mkdir -p "$OUT" +TMP=$(mktemp -d "${TMPDIR:-/tmp}/makronix-guide.XXXXXX") || + die "cannot create a temporary directory" +case ${1:-all} in +all) + resolve_xml + build_html + build_pdf + build_man + build_infolib + check_all + ;; +html) resolve_xml; build_html ;; +pdf) resolve_xml; build_html; build_pdf ;; +man) resolve_xml; build_man ;; +infolib) resolve_xml; build_infolib ;; +check) check_all ;; +install) install_all ;; +*) echo "usage: $0 [all|html|pdf|man|infolib|check|install]" >&2; exit 1 ;; +esac diff --git a/docs/guide/chapters.list b/docs/guide/chapters.list new file mode 100644 index 0000000000..e440599c7f --- /dev/null +++ b/docs/guide/chapters.list @@ -0,0 +1,30 @@ +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# The Makronix Guide -- chapter manifest. +# id|title|man-page suffix|source file +# The man page is makronix-guide-<suffix>(7); the index is makronix-guide(7). +preface|Preface|preface|preface.xml +what|What Makronix Is|what|what.xml +tour|A Tour of the System|tour|tour.xml +before-install|Before You Install|before-install|before-install.xml +install|Installing Makronix|install|install.xml +upgrade|Upgrading Makronix|upgrade|upgrade.xml +mcde|MCDE: The Desktop|mcde|mcde.xml +x11|The Display and X11|x11|x11.xml +dtinfo|The Information Manager|dtinfo|dtinfo.xml +shell|The Command Line|shell|shell.xml +rc|Services and rc.d|rc|rc.xml +users|Users and Accounts|users|users.xml +disks|Disks and Filesystems|disks|disks.xml +pkgsrc|Packages and pkgsrc|pkgsrc|pkgsrc.xml +printing|Printing, Sound and Power|printing|printing.xml +network|Networking|network|network.xml +services|DNS, DHCP and NTP|services|services.xml +sharing|Remote Access and File Sharing|sharing|sharing.xml +firewall|The Firewall|firewall|firewall.xml +mailweb|Mail and the Web|mailweb|mailweb.xml +building|Building Makronix|building|building.xml +cross|Cross-Building and the Source Tree|cross|cross.xml +updating|Updating the Desktop|updating|updating.xml +help|Appendix A: Getting Help|help|help.xml +glossary|Appendix B: Glossary|glossary|glossary.xml +license|Appendix C: Licence and Sources|license|license.xml diff --git a/docs/guide/chapters/before-install.xml b/docs/guide/chapters/before-install.xml new file mode 100644 index 0000000000..3bad67b3ac --- /dev/null +++ b/docs/guide/chapters/before-install.xml @@ -0,0 +1,130 @@ +<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. --> +<chapter id="before-install"> + <title>Before You Install + + An installation replaces what is on the disk you choose. Read this + chapter with the machine in front of you, and do not start until the data + you need is somewhere else. + + + The machine + + amd64 is the platform this release is tested on. The USB image is + 10 GiB; give the system at least 12 GiB, and considerably more if you + want the source set on the same disk. A machine with 2 GiB of memory + runs the installer and the desktop; 4 GiB or more make the desktop + comfortable. + + The USB image starts on UEFI machines and, through the protective + MBR, on BIOS-only machines. A Mac needs its firmware boot menu: hold + Option while the machine starts and choose the stick. + The DVD and the CDs start through the normal firmware boot order. + + + + The media + + A Makronix release is more than one image: + + + the USB image or the + DVD, which carry the system and the + makronix set; + CD 1, which carries the system + and starts the installer; + CD 2, which carries the + makronix set (the desktop and its programs); + CD 3, which carries the binary + packages (Firefox, Thunderbird, QEMU, the games). + + + The installer asks for the next CD when it needs one. A DVD or a + USB stick carries everything and asks for nothing. The source set is on + the DVD and on the USB image when it was built with + make sourcesets; the installed system can also fetch + it later. + + + + Writing a USB stick + + Write the image to the whole device, not to a partition. On + NetBSD, find the device with dmesg8 + after inserting the stick; it is usually + /dev/rsd0d. + + # dd if=Makronix-0.99.10-amd64-install.img of=/dev/rsd0d bs=1m conv=sync + + On Linux the same operation is: + + # dd if=Makronix-0.99.10-amd64-install.img of=/dev/sdX bs=4M conv=fsync status=progress + + Replace /dev/sdX with the stick, and check + the device name twice: dd does not ask. Afterwards, + compare the checksum of the image with the one published next to it. + A stick that reads back differently at every attempt is defective; the + installer will fail in ways that look like software bugs. + + + + The answers the installer needs + + The simple installation asks for the following. Write them down + before you start; the installer does not go back once it has begun. + + + + The disk + The whole disk that will hold Makronix. Every + partition on it is destroyed. + + + Encryption + Whether the disk is encrypted with + cgd4, + and the passphrase. The passphrase is asked for at every boot and + cannot be recovered. A long sentence you can type is better than a + short password. + + + The computer's name + A short host name, without spaces or dots. The + local network name becomes + name.local. + + + The network + Ethernet with DHCP, or a Wi-Fi network and its + passphrase. The installer configures the interface and enables + dhcpcd8. + + + The time zone + The zone of the place the machine is in, for + example Europe/Berlin. + + + The administrator's password + The password of root. It is + used with su. + + + Your account + A user name, a full name and a password. The + account is put in the groups that a desktop user needs: wheel (for + su), operator, staff, users, dialer (serial + ports), games and wsrc (the source tree). + + + + + + Back up, then begin + + Copy the files you need to another machine or an external disk. + An installation does not offer to preserve a partition that it is about + to overwrite. If the machine has another operating system, decide + before the installation whether it is to survive; the full installation + way can keep it, the simple way uses the whole disk. + + diff --git a/docs/guide/chapters/building.xml b/docs/guide/chapters/building.xml new file mode 100644 index 0000000000..dd1f8982e5 --- /dev/null +++ b/docs/guide/chapters/building.xml @@ -0,0 +1,143 @@ + + + Building Makronix + + Makronix builds itself from its own sources. The installation + medium can carry those sources, so a machine can be rebuilt without a + network; a development machine does the same with more room and more + patience. This chapter is the map: the source layout, the one entry point, + and what each target produces. + + + The source tree + + + + src/ + Makronix's NetBSD tree: the kernel, the userland, the + build system and the installer. It is edited directly; there is no + patch layer between it and the system. Upstream NetBSD is in + refs/netbsd/src, for reading. + + + xsrc/ + The X tree, imported the same way. X is part of the + base system: the server, the drivers, the fonts and the clients are + built into the X sets. + + + pkgsrc/ + The pkgsrc checkout, pinned. It is not edited; a + change is a moved pin or a package in ext/ or + the local wip. + + + ext/ + The third-party trees Makronix ships and changes: + MCDE, its Motif build, afpfs-ng and glibc. Each has its own recipe + and its own IMPORT note. + + + tools/ + Makronix's own POSIX shell tools: the build stamp, + the package list reader, the set generator, the test harnesses and + the MCDE helpers. + + + docs/ and www/ + The contracts and the guide, and the web site. The + guide's source is docs/guide/book.xml. + + + + + + One entry point + + Everything is built from the top-level Makefile. + The interface is deliberately small: + + $ make # the distribution (no medium) +$ make release ARCH=amd64 # through to a finished release +$ make iso # the installation CD/DVD image +$ make usb # the bootable USB image +$ make userland # the pkgsrc packages and the makronix set +$ make sourcesets # the source sets for the medium +$ make test # the tool tests, then the installation tests +$ make install # install over a running Makronix + + make release builds the sets and the kernels; + make iso packages what the release built; it refuses + to run if a source changed since, because the medium would not match its + sets. make usb needs the source sets under + source/sets; make sourcesets + writes them. + + ARCH is the name a person types: amd64, i386, + macppc, evbarm. On a NetBSD host without ARCH, the + host decides; on a cross host it is amd64 unless named. JOBS + sets the parallelism. + + + + Cross and native are one build + + The build detects whether the host is NetBSD or not. A NetBSD + host builds natively with its own toolchain; a Linux or another host + cross-builds the same tree with the toolchain that + build.sh builds first. A package that builds only on + one of the two is a defect in the recipe, not a reason to use a virtual + machine. + + The pkgsrc packages are built for the target with the same + toolchain; tools/pkgsrc-cross.mk.conf is the whole + configuration, and pkgsrc/ itself is not patched. + The workarounds in that file are measured; + explains them and when they can go. + + + + Where the results land + + The build writes to build/obj: the object + tree, destdir.arch and + the release directory releasedir. The logs are in + build/logs. A medium is in + releasedir/images; the sets are in + releasedir/arch/binary/sets. + + The gate is checkflist, run the way NetBSD runs + it: the set lists and what the build actually installed must agree. + Extra or missing files fail the build. A build is done when + checkflist reports neither. + + + + Building on the installed system + + The source set installs to /usr/src, + /usr/xsrc and /usr/msrc. + Build from /usr/msrc as a user in the wsrc group: + + $ cd /usr/msrc +$ export MAKRONIX_TOP=/usr/msrc +$ make release ARCH=amd64 + + A full self-build needs room for the object tree and the + distfiles and takes hours on a laptop; the first build is the slow one. + The source set is not the development history: it carries the files a + rebuild needs, and PINS names the revisions they + came from. + + + + Tests + + make test runs the tests of the tools first, + then the installation tests: a machine is installed from the medium in + QEMU and must reach a login prompt and shut down cleanly. The MCDE + tests run before the release tests, from a native build of the host. + A test that has never failed has not been tested; the harnesses are in + tools/ and each can be run alone. + + diff --git a/docs/guide/chapters/cross.xml b/docs/guide/chapters/cross.xml new file mode 100644 index 0000000000..775a9a5905 --- /dev/null +++ b/docs/guide/chapters/cross.xml @@ -0,0 +1,117 @@ + + + Cross-Building and the Source Tree + + Makronix is built on NetBSD and on other systems. The same tree, + the same packages and the same release come out; the difference is the + toolchain that build.sh builds first. This chapter is + for the person who works on that build, not for the person who installs + the result. + + + What the build detects + + tools/userland.sh looks at + uname -s. On NetBSD it builds natively with the + host's pkgsrc and installs into the host's /usr/pkg; + on anything else it cross-builds with the toolchain and the sysroot in + build/obj. The packages are the same either way; + tools/pkgsrc-cross.mk.conf is the only + configuration that is specific to the cross case, and + pkgsrc/ is not patched. + + The build's paths come from MAKRONIX_TOP. + On a development machine that is the repository root; on an installed + system with the source set it is /usr/msrc. + + + + The cross workarounds, and why they exist + + Four settings in tools/pkgsrc-cross.mk.conf + were each added after a measured failure. They are documented in + docs/CROSS.md in the source set; in short: + + + fonts/Xft2 runs a C++ + probe it does not declare. The cross configuration adds + USE_LANGUAGES+= c c++, which gives it a real + compiler instead of pkgsrc's fail wrapper. + fonts/Xft2 calls + FT_GlyphSlot_Embolden without the header that + declares it after FreeType moved it. The build adds + -include freetype/ftsynth.h. This is a GCC-14 + strictness issue, not a cross issue; the native build may need it + too. + pkgtools/x11-links probes + /usr for X headers. In a cross build that is the + host's X, not the target's; the configuration points it at + ${CROSS_DESTDIR}/usr/X11R7. + X's configure passes absolute + /usr/X11R7/include and + /usr/X11R7/lib, which do not resolve inside the + sysroot. The build adds the sysroot-relative GCC form + -I=/usr/X11R7/include and + -L=/usr/X11R7/lib. + + + Each setting has a removal criterion in + docs/CROSS.md: when the package builds without it + in both modes, it goes. A workaround that outlives its cause is a bug + with a comment. + + + + Forks and imported trees + + What Makronix changes is a fork in ext/; what + it does not change is imported and left alone. The NetBSD tree is + src/ with its base commit in + src/BASE; the X tree is xsrc/ + with xsrc/BASE; upstream for reading is + refs/netbsd and refs/linux. + The import of a fork is one commit of the upstream archive, and every + change after it is a visible diff. + + MCDE is the largest fork. Its build for the host is + make mcde-host; its Linux build is + make mcde-linux. The host build is what produces + dtdocbook2infolib and dtinfo for + the documentation and for testing without a target machine; the cross + build for the release is part of make userland. + + + + The rules that keep it buildable + + + A package that builds only on one host is broken. Fix + the recipe, the configuration in tools/, or the + source in ext/; do not build it in a virtual + machine. + pkgsrc/ and refs/ + are not edited. A change is a moved pin, recorded in + PINS, or a package of our own. + tools/ is POSIX shell: no bash, + no Python, no transient units. A tool that only runs on the author's + machine is not a tool. + The set list is generated, not written: + tools/makronix-set.sh reads the installed tree + back and writes src/distrib/sets/lists/makronix/mi. + A file that is installed but not in the list fails + checkflist. + + + + + Other platforms + + make release ARCH=macppc and the other + architectures use the same tree with a different target. A platform is + supported when its installation has been run to a login prompt; the + measured state is in docs/PLATFORMS.md. Cross + building makes the compiler for that platform; it does not test the + firmware, the drivers or the desktop on it. That is what the hardware + is for. + + diff --git a/docs/guide/chapters/disks.xml b/docs/guide/chapters/disks.xml new file mode 100644 index 0000000000..a8c3ac6d90 --- /dev/null +++ b/docs/guide/chapters/disks.xml @@ -0,0 +1,157 @@ + + + Disks and Filesystems + + NetBSD names disks by driver and number: sd0 + is the first SCSI or SATA disk, wd0 the first IDE + disk, ld0 a logical disk, cd0 a + CD or DVD drive. A partition is a letter after the disk: + sd0a is the first partition of the first disk. The + raw device has an r in front + (rsd0a); the block device is the one you mount. + + + Seeing what is there + + $ dmesg | grep -E 'sd|wd|cd' +$ disklabel sd0 +$ df -h +$ du -sh /home/* + + disklabel8 + prints the partition table of a disk; + df1 + shows what is mounted and how full it is. A machine installed with the + simple way has a GPT label and a root partition that uses the whole + disk; the full way can have an MBR label and a NetBSD disklabel inside + it, as NetBSD documents. + + + + Adding a disk + + A new disk has no label until one is written. The interactive + editor is the safe way to look first: + + # disklabel -i sd1 +disklabel> p +disklabel> a +partition> a +offset> [Enter] +size> [Enter] +fstype> 4.2BSD +disklabel> w +disklabel> q + + The partition table is written by w; nothing + happens before it. A GPT disk can be edited with + gpt8 + instead. After the label, make a file system and mount it: + + # newfs /dev/rsd1e +# mkdir -p /data +# mount /dev/sd1e /data + + The raw device is the one for newfs. A file + system that should come back after a reboot belongs in + /etc/fstab: + + /dev/sd1e /data ffs rw 1 2 + + newfs8 + destroys what was on the partition. Check the device name with + disklabel before you type it. + + + + Backing up a file system + + dump8 + and restore8 + are the NetBSD pair for a whole file system. They preserve owners, + modes and hard links, which cp does not: + + # dump -0 -f /backup/root.dump / +# restore -i -f /backup/root.dump + + For a directory, tar1 + is enough, and a compressed archive is easier to keep: + + $ tar -czf /backup/home.tar.gz /home +$ tar -xzf /backup/home.tar.gz -C / + + A backup that has never been restored is a hope. Restore one file + from the archive before you trust it. + + + + Encrypted disks + + An installation with encryption uses + cgd4. + The key is derived from a passphrase and stored in + /etc/cgd/disk. The + installer writes it; the boot loader asks for the passphrase before the + root file system is mounted. The unencrypted partition that the loader + reads is /cgdboot. + + To encrypt another disk by hand, create the configuration, then + the cgd device, then a file system on it: + + # cgdconfig -g -k argon2id -o /etc/cgd/sd1e adiantum 256 +# cgdconfig cgd0 /dev/sd1e +/dev/sd1e's passphrase: +# newfs /dev/rcgd0a +# mount /dev/cgd0a /mnt + + The exact partition letters and the choice of algorithm are the + administrator's; cgdconfig8 + documents the parameters and the verification methods. A lost + passphrase cannot be recovered; keep a copy of the configuration in a + safe place, not the passphrase. + + + + RAID, LVM and concatenation + + NetBSD has three ways to combine disks. Each has its own manual + page and its own recovery rules, and each is a decision to make before + the data is on it: + + + raidctl8 + — RAIDframe, hardware-independent RAID levels 0, 1, 5 and more. + The configuration is a file; the set must be assembled before the root + file system is mounted if it holds the root. + lvm8 + — logical volumes: physical volumes, a volume group, logical + volumes that can grow. It is the flexible choice for a data + disk. + ccdconfig8 + — concatenation and striping without RAIDframe. Simple, and + with no redundancy. + + + Whichever you choose, the rule is the same: write the + configuration down, test that it comes back after a reboot, and only + then put the data on it. A RAID set that has never been assembled from + a cold boot is not yet a backup. + + + + Checking a file system + + fsck8 + runs at boot on an unclean file system. A file system that needs it by + hand must be unmounted first: + + # umount /data +# fsck -f /dev/rsd1e +# mount /data + + fsck -n only reports; it changes nothing. The + output names every repaired inode, and a file that was open during a + crash can end up in lost+found at the top of the + file system. + + diff --git a/docs/guide/chapters/dtinfo.xml b/docs/guide/chapters/dtinfo.xml new file mode 100644 index 0000000000..066f0f4d02 --- /dev/null +++ b/docs/guide/chapters/dtinfo.xml @@ -0,0 +1,116 @@ + + + The Information Manager + + dtinfo1 + is MCDE's Information Manager. It reads information + libraries: directories of books, each with a table of contents + and a full-text index. The help pages of the MCDE programs are books in + it, and so is this guide. + + + Opening the guide + + The Makronix Guide is the default library of the Information + Manager, so dtinfo opens it directly. It is also in + the Help menu of the MCDE programs and in the + Makronix menu. From a terminal, the same: + + $ dtinfo +$ dtinfo -l makronix + + The first command opens the default library; the second names the + library explicitly. The library is installed as + /etc/dt/infolib/en_US.UTF-8/makronix.dti. The + session script + /etc/dt/config/Xsession.d/0000makronix sets + DTINFOLIBDEFAULT to makronix, which is + why the plain command works. + + + + Reading and searching + + The window has a list of the books in the library and the table of + contents of the selected book. A click on a chapter opens it; the + navigation buttons go back and forward in the history, and the table of + contents stays available while you read. The search field searches the + whole library, not only the open chapter; the results are shown with the + book and section they come from, and a click opens the result in + place. + + The guide is one book with a chapter for every part of the system. + The chapters are the same text as the manual pages and the PDF; the + Information Manager adds the search and the links between them. + + + + What an information library is + + An information library is a directory whose name ends in + .dti. It contains a + bookcase.map that names the library and its + bookcases, one directory per bookcase with the compiled books, and a + dtsearch directory with the full-text index. The + books are written in DocBook, the SGML dialect that CDE's documentation + uses, and compiled with dtdocbook2infolib. + + The Makronix Guide is built from + docs/guide/book.xml in the source tree. The same + source produces the manual pages, the PDF, the HTML file and this + library; explains the build. If you change + the guide, rebuild it with: + + $ cd /usr/msrc +$ sh docs/guide/build.sh all +$ sh docs/guide/build.sh install + + The first command builds all four forms in + docs/guide/out; the second copies them to the + places the system reads: /usr/share/doc/makronix, + /usr/share/man/man7 and + /etc/dt/infolib. + + + + Adding another library + + A library that someone gives you is a directory ending in + .dti. Put it under the locale directory of the + system library and name it on the command line: + + # cp -R example.dti /etc/dt/infolib/en_US.UTF-8/ +$ dtinfo -l example + + The library's own bookcase.map names its + bookcases; dtinfo reads that file, so the directory + name and the short name in the map are what matter. A library for one + user can live in ~/.dt/infolib; the search path + finds it there as well. + + + + When the Information Manager is empty + + If dtinfo starts but shows no books, the + library was not found. Check the three things it depends on: + + + /etc/dt/infolib/en_US.UTF-8/makronix.dti/bookcase.map + exists and is readable. + DTINFOLIBDEFAULT is + makronix in the session + (echo $DTINFOLIBDEFAULT). + DTINFOLIBSEARCHPATH contains + /etc/dt/infolib/%L/%I.dti. The command + dtsearchpath prints the assembled path; run it in + the session that has the problem. + + + A library that was copied from another machine can have a stale + search index. Rebuilding it with dtdocbook2infolib + is described in the DocBook chapter of the CDE documentation; for the + Makronix Guide, docs/guide/build.sh infolib does + it. + + diff --git a/docs/guide/chapters/firewall.xml b/docs/guide/chapters/firewall.xml new file mode 100644 index 0000000000..40b2e88042 --- /dev/null +++ b/docs/guide/chapters/firewall.xml @@ -0,0 +1,106 @@ + + + The Firewall + + Makronix turns on NetBSD's packet filter, + npf7, + and installs a rule set that lets nothing in that the machine did not ask + for. Outgoing connections work, their replies come back, DHCP and IPv6 + set-up work, ping works, SSH works and the local network names work. + Everything else is blocked. + + + The default rule set + + /etc/npf.conf on a freshly installed machine + is the following. It is the rule set that the installer writes and that + /usr/src/docs/reference/npf-default.conf records + for validation: + + alg "icmp" + +group default { + pass final on lo0 all + + # out: everything, with the replies + pass stateful out final all + + # DHCP replies (a broadcast, so no state) and IPv6 set-up + pass in final proto udp from any port 67 to any port 68 + pass final family inet6 proto ipv6-icmp all + + # ping + pass stateful in final family inet4 proto icmp all + + # remote login + pass stateful in final proto tcp to any port ssh + + # mDNS and DNS-SD (mdnsd): the multicast announcements, port 5353 + pass in final proto udp to any port 5353 + + block in final all +} + + Read it from the bottom up: everything that arrives is blocked + unless an earlier rule lets it in. The rules above it are the + exceptions. stateful means that the reply to a + connection the machine started is allowed without a rule of its + own. + + + + Opening one port + + A service that should be reachable from the network needs a rule + above the final block. For a web server on port 80, add this line + before block in final all: + + pass stateful in final proto tcp to any port 80 + + Then check the file and reload the running rule set. A rule set + with a syntax error must not be loaded; npfctl validate + reads the file without touching the running one: + + # npfctl validate /etc/npf.conf +# /etc/rc.d/npf reload +# npfctl show +# npfctl stats + + npfctl show prints the rules that are active, + after the variables and groups have been expanded. If the line you + added is not there, the reload did not happen; the console and + /var/log/messages say why. + + + + The firewall at boot + + The service is enabled in /etc/rc.conf: + + npf=YES + + At boot, npf loads /etc/npf.conf + before the network is up. A machine that boots without a rule set is a + machine that is open for the time it takes to notice. After a change, + reload rather than restart; the existing connections survive a + reload. + + + + NAT and a router + + A machine that routes between two networks needs NAT and forwarding. + The rules are in npf.conf5; + the shape is a map line for the outgoing interface + and pass rules for the two directions. Forwarding + itself is a sysctl8 + setting: + + # sysctl -w net.inet.ip.forwarding=1 +# echo 'net.inet.ip.forwarding=1' >> /etc/sysctl.conf + + A router is a machine with two interfaces and a rule set that + describes both directions. Do not enable forwarding on a desktop that + has one interface; it has nothing to forward between. + + diff --git a/docs/guide/chapters/glossary.xml b/docs/guide/chapters/glossary.xml new file mode 100644 index 0000000000..7380452de2 --- /dev/null +++ b/docs/guide/chapters/glossary.xml @@ -0,0 +1,110 @@ + + + Appendix B: Glossary + + The words this guide uses in a particular sense. + + + + base system + What NetBSD's build produces and Makronix ships in the + NetBSD sets: the kernel, the C library, the userland, the X server and + the manual pages. It is not in the package database. + + + CDE + The Common Desktop Environment, the Motif desktop + that Sun, HP, IBM, DEC and others shipped. MCDE is its + fork. + + + cgd + NetBSD's cryptographic disk driver. An encrypted + installation is a cgd over the root file system. + + + cross build + Building for one machine on another. Makronix's build + cross-builds when the host is not NetBSD and builds natively when it + is. + + + disklabel + The partition table NetBSD keeps on a disk. A GPT + label is the modern form; an MBR label with a NetBSD disklabel inside + it is the older one. + + + dtinfo + The MCDE Information Manager: the program that reads + information libraries and displays their books. + + + dtlogin + The MCDE login screen. It starts the X server and the + session. + + + information library + A directory ending in .dti that + holds a bookcase, its books and the full-text index. The Makronix + Guide is one. + + + makronix set + The packages that Makronix ships on the medium and + unpacks as part of the system. MCDE is in it. It is not registered + with pkg_add. + + + MCDE + The Makronix Common Desktop Environment: the fork of + CDE that is Makronix's desktop. + + + Motif + The widget toolkit CDE and MCDE are written + against. + + + msrc + The Makronix source set: the tools, the documentation, + pkgsrc, the distfiles and the pins, installed in + /usr/msrc. + + + npf + NetBSD's packet filter, the firewall Makronix enables + by default. + + + pkgsrc + The package system that supplies + /usr/pkg: a tree of recipes, the package tools, + and binary repositories. + + + release + Everything a version of Makronix consists of: the sets, + the kernels, the media and the name. 0.99.10 is + Camouflage. + + + set + A group of files that the installer can select: the + base sets, the X sets, the games and the source sets. The + makronix set is the desktop and its + programs. + + + sysinst + The installer. Makronix's fork has a simple way and + the full NetBSD way. + + + wsrc + The group that may write the source tree, so that a + user can rebuild the system without becoming root. + + + diff --git a/docs/guide/chapters/help.xml b/docs/guide/chapters/help.xml new file mode 100644 index 0000000000..6ceb9e0ee5 --- /dev/null +++ b/docs/guide/chapters/help.xml @@ -0,0 +1,64 @@ + + + Appendix A: Getting Help + + A Unix system documents itself. The order that works is: the manual + page for the command, the file in /usr/share/doc, the + source, then the network. The network is last because it is the only one + that may be wrong about your version. + + + The manual pages + + man is described in + . The pages that are worth reading before + anything else are: + + + afterboot8 + — what to do after the first boot; + intro8 + — the system administration commands and how they fit; + hier7 + — the file system layout; + pkgsrc7 + — pkgsrc and the package tools; + rc.conf5 + — the services; + npf.conf5 + — the firewall. + + + + + The web and the source + + The NetBSD project's documentation is the reference for the parts + Makronix inherited: https://www.NetBSD.org/docs/, + the NetBSD Guide and the manual pages online. For Makronix itself, the + source tree is the last word: /usr/msrc holds the + guide, the tools, the build contract and the records of what was + measured. + + When you ask for help, give the version + (uname -a), the command you ran, what you expected + and what happened. The output of dmesg and the + relevant lines of /var/log/messages are worth more + than a description. + + + + This guide in its four forms + + + man makronix-guide lists the + chapters; each chapter is a page in section 7. + /usr/share/doc/makronix/makronix-guide.pdf + is the printable form. + /usr/share/doc/makronix/makronix-guide.html + is one file and opens in any browser. + dtinfo opens the same text in the + MCDE Information Manager, with search. + + + diff --git a/docs/guide/chapters/install.xml b/docs/guide/chapters/install.xml new file mode 100644 index 0000000000..12ea1e0713 --- /dev/null +++ b/docs/guide/chapters/install.xml @@ -0,0 +1,164 @@ + + + Installing Makronix + + The installer is sysinst8, + Makronix's fork of NetBSD's installer. It has two ways: the simple way, + which decides as much as it can, and the full way, which is NetBSD's + installation with every question. Both install the same system. + + + Starting the installer + + Start the machine from the medium. On a machine with UEFI, choose + the stick or the DVD in the firmware's boot menu; on a Mac, hold + Option while it starts. On a BIOS machine, set the + boot order or press the firmware's boot-menu key. The installer starts + from the medium and runs in memory, so the medium can be removed once + the installation has begun. + + The first questions are the language and the keyboard layout. + They apply to the installer only; the installed system gets its + keyboard layout from the desktop settings. + + + + The simple way + + + + Choose the installation type. The simple + way is the first choice. The full way is + Install NetBSD and is described in + . + + + Choose the disk. The installer lists the + disks it found. Choosing one erases every partition on it. If the + machine has more than one disk, unplug the one you want to keep + before you start; that is safer than reading the list twice. + + + Decide about encryption. If you say yes, + the installer encrypts the root file system with + cgd4 + and asks for the passphrase twice. The passphrase is asked for at + every boot. If you say no, the disk is installed in clear text. + + + The installer partitions the disk and unpacks the + sets. It installs the base system, the + makronix set (the desktop and its programs) and, when + the medium carries them, the source sets. It asks whether to + install the games; the default is yes. + + + Answer the configuration forms. The + installer asks for the computer's name, the network (Ethernet with + DHCP, or Wi-Fi and its passphrase), the time zone, the + administrator's password and your account. These are the answers + from . + + + Reboot. Remove the medium. The machine + starts into dtlogin1, + the MCDE login screen. + + + + The installer sets up more than the account: SSH is enabled, time + synchronisation is enabled, a firewall (npf) lets in SSH and the replies + to outgoing traffic, and the machine answers to + name.local on the local + network. + + Note: the simple way uses the whole disk. It + does not preserve another operating system. If the machine must keep + one, use the full way and partition by hand. + + + + The full way + + The full way is the NetBSD installation. It asks for the + partition table (MBR or GPT), the NetBSD disklabel, the sets, the network + and the time zone, and it writes the boot blocks. The procedure is the + one in The NetBSD Guide, chapter + Example installation; the questions and their meanings + are NetBSD's, and the installer's manual page is + sysinst8. + + Two Makronix details matter in the full way: + + + Choose the makronix set as well as the + base sets. Without it there is no desktop, no + dtlogin and no MCDE programs. + The Next CD menu asks for the next + medium when a set is not on the current one. A DVD or a USB image + does not need it. + + + + + An encrypted system + + With encryption, the disk holds one cgd + partition with the root file system, and a small unencrypted partition + that the boot loader can read: the kernel, cgdroot.kmod + and cgd.conf. The loader asks for the passphrase, + unlocks the disk and starts the kernel from the encrypted root. + + The unencrypted partition is mounted as /cgdboot + (with noauto in /etc/fstab). A + kernel update on an encrypted system is not complete until the new + kernel and the matching cgdroot.kmod are copied to + it; gives the commands. + + + + The first boot + + The login screen is MCDE's dtlogin. Log in with + the account you created; the desktop starts with the front panel, the + bar at the top and the workspace controls. + explains what you are looking at. + + Open a terminal and check the machine: + + $ ifconfig -a +$ netstat -rn +$ date +$ ps -ax | grep -E 'dhcpcd|ntpd|dtlogin' + + If the network is not up, dhcpcd can be started + by hand; if the clock is wrong, ntpd needs a reachable + server. Both are services in /etc/rc.conf; see + . + + Change the administrator's password and your own with + passwd1. + The account is in the wheel group, so su works; use + it for administrative commands, as the rest of this guide does. + + + + When the installation does not start + + + The firmware does not offer the stick. + Write the image again to a different stick and compare its checksum. + On a UEFI machine, disable Secure Boot for the + installation; on a Mac, the stick must be formatted by the image, not + copied as a file. + The machine starts, then stops with a mount + or unpacking error. The medium is bad or the disk is + failing. Check the medium's checksum and try another disk. + The installed machine does not start. + Start from the medium again and choose the shell, then inspect the + disk with disklabel and mount the root partition by + hand. The boot messages are on the console; dmesg + repeats them. + + + diff --git a/docs/guide/chapters/license.xml b/docs/guide/chapters/license.xml new file mode 100644 index 0000000000..0bde970a96 --- /dev/null +++ b/docs/guide/chapters/license.xml @@ -0,0 +1,77 @@ + + + Appendix C: Licence and Sources + + A guide is a derived work too. This one follows the structure of + The NetBSD Guide and uses its general NetBSD + procedures; the Makronix text, the MCDE chapter and the four output forms + are Makronix's. + + + Makronix + + The Makronix text and the tools in this tree are under the CNCL + 1.0 (Could Not Care Less), the licence at the top of the tree in + LICENSE. In short: do what you like with it, and + do not blame the authors. + + + + The NetBSD Guide and NetBSD + + The structure of this guide and the general NetBSD procedures + follow The NetBSD Guide, Copyright (c) 1998-2026 + The NetBSD Foundation, Inc., which is distributed under the BSD + 2-clause licence. NetBSD's source, which Makronix is built from, keeps + its BSD licence and its copyright notices. The NetBSD Guide is at + https://www.NetBSD.org/docs/guide/en/. + + + + CDE and MCDE + + MCDE is a fork of CDE, the Common Desktop Environment. CDE is + Copyright (c) 1993-2012 The Open Group and is distributed under the GNU + Lesser General Public License, version 2 or later. The MCDE changes keep + that licence; the MCDE source is in ext/src/mcde + in the source tree. + + The Hack font, which MCDE uses for the terminal and the login + screen, is by Source Foundry and is distributed under the MIT + licence. + + + + The book format + + The guide's source is DocBook XML 4.5. The DocBook DTD is + Copyright (c) 1992-2006 OASIS and is distributed under the OASIS + licence. The MCDE Information Manager reads the older DocBook SGML + dialect that CDE's tools define; the guide's build converts the XML to + that dialect for the library. + + + + The sources of this guide + + + docs/guide/book.xml and + docs/guide/chapters/ — the text. + docs/guide/build.sh — the + build of the four forms. + docs/guide/tools/docbook-to-cde.lua + — the DocBook XML to CDE SGML writer. + docs/logo/ — the + logo. + www/style.css — the + Camouflage palette that the guide's colours follow. + + + The Makronix Guide is installed as manual pages from + makronix-guide7, + as /usr/share/doc/makronix/makronix-guide.pdf, as + /usr/share/doc/makronix/makronix-guide.html and as + an information library in + /etc/dt/infolib/en_US.UTF-8/makronix.dti. + + diff --git a/docs/guide/chapters/mailweb.xml b/docs/guide/chapters/mailweb.xml new file mode 100644 index 0000000000..8af6fcfec0 --- /dev/null +++ b/docs/guide/chapters/mailweb.xml @@ -0,0 +1,76 @@ + + + Mail and the Web + + Two services that a small machine often provides: a mail transfer + agent that delivers local mail, and a web server that serves a directory. + Both are NetBSD base services; Makronix ships the clients and the desktop + programs that read the results. + + + Mail + + The base system's mail transfer agent is + Postfix. A desktop that only needs local + mail — the daily security report, cron's output, the messages of + the package tools — runs it with the default configuration and + reads the mail with mail or MCDE's + dtmail1: + + # echo 'postfix=YES' >> /etc/rc.conf +# /etc/rc.d/postfix start +$ mail + + /etc/postfix/main.cf is the configuration. A + machine that should accept mail from the network sets + inet_interfaces and a proper + myhostname, and needs a DNS name with an MX record. + That is a mail server, not a desktop; the NetBSD Guide's mail chapter + and the Postfix documentation describe the decisions, and the firewall + chapter describes the port that has to be opened. + + Local mail is delivered to /var/mail/name. + If mail does not arrive, read /var/log/maillog; + Postfix writes there, and postfix check reports a + configuration that it cannot use. + + + + A web server + + The base system's HTTP server is + bozohttpd8, + installed as httpd. It serves one directory, which + is enough for a documentation page or a small site: + + # echo 'httpd=YES' >> /etc/rc.conf +# echo 'httpd_flags="-b /var/www"' >> /etc/rc.conf +# /etc/rc.d/httpd start +$ curl http://localhost/ + + /var/www is the document root; the index file + is index.html. A server that needs CGI, PHP, TLS + or virtual hosts should use a package: nginx + or apache, with their own documentation and + their own service scripts. + + TLS needs a certificate. For a public name, the certificate + authority's client (for example certbot) + obtains and renews it; for a name that only the local network uses, a + self-signed certificate is enough, and every client has to be told to + trust it. A certificate that has expired is the most common reason a + site that worked yesterday does not work today. + + + + The desktop clients + + Firefox reads the web, Thunderbird reads mail and news, and + dtmail reads local mail in the MCDE style. All three + are on the medium as packages; the installer can put them on the + machine, and pkg_add installs them later + (). Their settings belong to the user, not to + the system, and live under ~/.mozilla, + ~/.thunderbird and ~/.dt. + + diff --git a/docs/guide/chapters/mcde.xml b/docs/guide/chapters/mcde.xml new file mode 100644 index 0000000000..6b3359bbac --- /dev/null +++ b/docs/guide/chapters/mcde.xml @@ -0,0 +1,231 @@ + + + MCDE: The Desktop + + MCDE is the Makronix Common Desktop Environment, a fork of CDE 2.5.3. + CDE is the desktop that Sun, HP, IBM, DEC, SCO, Fujitsu and Hitachi + shipped on their workstations, and it has been open source since 2012. + MCDE keeps what made it good — Motif, a quick and steady desktop + that does not need a fast machine — and makes it one desktop that + works as a whole. + + MCDE is written in C99 against Motif, Xlib and X11. It uses no + other toolkit and no compositor, and it builds and runs on NetBSD and on + Linux through pkgsrc on both. Everything that differs between the + operating systems — users, network, sound — is behind one + layer, so that no program has to know which system it runs on. + + + Logging in + + The graphical login is dtlogin1. + It shows the users of the machine and a field for the password; the + Options menu chooses the session type and the + language. After login, dtsession1 + starts the session: the window manager, the front panel, the bar at the + top and the programs that are set to open at login. + + Lock Screen in the Makronix menu locks + the session without ending it; Log Out ends + it and returns to dtlogin. A session can be saved on + logout and restored at the next login; the setting is in System + Settings, under Login. + + + + The bar at the top + + One bar runs along the top of the screen. On the left is the + Makronix menu: about this computer, software update, system settings, + your favourites and recent items, force quit, sleep, restart, shut down, + lock the screen and log out. Next to it are the menus of the program + you are working with. They leave the program's window and stand in the + bar, for every MCDE program, without a change to the program itself. + + On the right are the status items: the volume (a slider in the + menu, a mute switch, and the wheel over the speaker), Bluetooth, the + network, the battery on a machine that has one, and the clock. + + + + The front panel + + CDE's front panel stays as it is: the controls in the middle, the + drawers above them, the workspace switches, and the trash. Left of the + trash the panel shows the programs that are open and have no place in + the panel yet; a click brings the window forward. The right button + keeps one in the panel, or you can drag it to the left; from then on it + is there at every login. A click starts it, or brings it forward when it + is already running. + + The workspaces are in the middle of the panel. A window can be + sent to another workspace from its window menu; the panel's workspace + buttons switch between them. The number of workspaces is set in the + window manager's settings. + + + + Windows and the window manager + + dtwm1 + draws the frames. The title bar has the window menu on the left and the + minimize and maximize buttons on the right; the window menu moves, + resizes, raises, lowers, sends the window to a workspace, or closes it. + A double click on the title bar maximizes the window. + + The window manager's configuration is + ~/.dt/dtwmrc; without it, the system file + /usr/pkg/dt/config/C/sys.dtwmrc applies. The menu + that appears on the root window (the desktop) is defined there. Most + people never edit it: the settings that matter are in System + Settings. + + + + The file manager + + dtfile1 + is the file manager. A toolbar has Back and Forward — every + window keeps its own history — and the views. A sidebar holds the + places: the computer, your home, the desktop, documents and downloads, + and the free space of the disk is in the status line. + + The column view shows one column for each folder down to the one + you are in, and on the right what you selected: its icon, kind, size and + date. Files are copied and moved by dragging them; the trash is on the + front panel. The file manager also shows network places when the + sharing services are configured (). + + + + The terminal + + dtterm1 + is the terminal. It has tabs: Ctrl+Shift+T + opens one, Ctrl+Shift+W + closes it, and Ctrl+Shift+Left + and Ctrl+Shift+Right + move between them. A program's title appears on its tab, and the window + title is the title of the tab in front. A profile gives a tab its font, + its colours and its command + (Window, New Tab with Profile). + Ctrl+Shift+D + splits a tab and puts another terminal below it. Started as + dtterm -dropdown, the terminal waits out of sight and + comes down from the top of the screen at F12; the next + press puts it back. + + The terminal draws anti-aliased UTF-8 text in the Hack font, and + falls back to another font for characters Hack does not have. The + shell inside it is the login shell of your account; on a fresh account + it is sh1. + + + + The other programs + + + + dtpad1 + The text editor. It edits plain text, has a + search and replace, and opens several files in one window. + + + dtcalc1 + The calculator: a normal calculator, a scientific + one and a programmer's one, in one window. + + + dtpaint + The paint program: lines, curves, shapes, fill, + text and zoom, in the colours of the release. It is for pictures + drawn by hand; a raster editor for photographs is being made. + + + dtlaunch + The launcher, opened with + Alt+Space. + Type a few letters to find a program; type a keyword to find a text + snippet; leave the field empty to see what you copied last; type + =12*(3+4) and it shows 84. Return starts the + program or puts the text on the clipboard. Snippets live in + ~/.dt/snippets. + + + dtinfo1 + The Information Manager: books and help pages, + including this guide. is its + chapter. + + + + + + System Settings + + dtsystemsettings is one window for every + setting of the computer. It has four rows of icons — personal, + hardware, internet and network, system — and a click opens a + setting in the same window; Show All goes back. + + It draws the colours (every palette with its colours), the font of + every window, the backdrop (a picture, or a folder of pictures that + change by themselves) and the screen saver, the keyboard and the mouse, + sound, the network and the Wi-Fi networks in reach, Bluetooth, the date, + time and time zone, the accounts of the people who use the computer, the + software update and the facts about the computer. It also decides what + happens at login: the session and the programs that open by + themselves. + + Changing an account, the network or the software update asks for + the administrator's password. The settings that belong to one user are + stored in ~/.dt; the ones that belong to the + machine are in /etc/dt and + /usr/pkg/dt/config. + + + + Colours, fonts and the palette + + A Makronix release is named after a CDE palette, and the desktop + starts in that palette. For 0.99.10 it is Camouflage: + the background is a grey-green, the panels are olive and grey-green, and + the title bars are a deep green. The palette is a plain file, + /usr/pkg/dt/share/palettes/Camouflage.dp, and + System Settings shows every installed palette with its colours before + you choose it. + + Fonts are set the same way. MCDE ships Hack, an open source + monospace font, and uses it for the terminal and the login screen; the + rest of the desktop uses the system font, which System Settings can + change. Anti-aliasing is on by default and can be turned off for a + machine that is too slow for it. + + + + The session and your files + + Everything that belongs to your desktop is under + ~/.dt: the session, the panel layout, the menus, + the snippets, the backdrop choice and the settings of the programs. + Removing a file there resets that part of the desktop at the next login; + removing the whole directory gives you a fresh desktop, without touching + your documents. + + The session manager can save the programs that are open when you + log out and start them again at the next login. The setting is in + System Settings under Login. A program that should + always start belongs in the session, not in a shell startup file: the + session is what the desktop restores. + + + + Help + + Every MCDE program has a Help menu; it opens the + program's help page in the Information Manager. The Information + Manager also holds this guide, which is the place to start when the + question is about the system rather than about one program. The next + chapter explains how to open it and how to search in it. + + diff --git a/docs/guide/chapters/network.xml b/docs/guide/chapters/network.xml new file mode 100644 index 0000000000..ba0c322f0b --- /dev/null +++ b/docs/guide/chapters/network.xml @@ -0,0 +1,98 @@ + + + Networking + + NetBSD's network configuration is small and explicit: an interface + is configured with ifconfig, an address can come from + DHCP, and the routes and the resolver are plain files. Makronix's + installer writes the files for the network you chose; this chapter is for + changing them later. + + + Interfaces and addresses + + $ ifconfig -a +$ netstat -rn +$ cat /etc/resolv.conf + + The name of an interface is the driver's: wm0 + for an Intel Ethernet, re0 for a Realtek, + ath0 or urtwn0 for Wi-Fi, + lo0 for the loopback. An address from DHCP is + requested by dhcpcd8: + + # dhcpcd wm0 +# /etc/rc.d/dhcpcd restart + + The service reads /etc/rc.conf; with + dhcpcd=YES it configures every interface that is not + configured by a fixed file at boot. + + + + A fixed address + + A machine that should have the same address every time does not + need DHCP. The address belongs in + /etc/ifconfig.interface: + + inet 192.168.1.20/24 + + The default route is /etc/mygate: + + 192.168.1.1 + + and the resolver is /etc/resolv.conf: + + nameserver 192.168.1.1 +nameserver 9.9.9.9 + + Set dhcpcd=NO for that interface, or leave the + service off entirely. The name of the machine is in + /etc/myname; the local names are in + /etc/hosts: + + 127.0.0.1 localhost +192.168.1.20 studio.example studio + + + + Wi-Fi + + A Wi-Fi interface needs its network and passphrase before DHCP can + run. wpa_passphrase8 + writes the configuration: + + # wpa_passphrase "network-name" "the passphrase" > /etc/wpa_supplicant.conf +# chmod 600 /etc/wpa_supplicant.conf +# ifconfig ath0 up +# wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf +# dhcpcd ath0 + + The service configuration is: + + wpa_supplicant=YES +wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf" +dhcpcd=YES + + The MCDE System Settings network pane lists the networks in reach + and asks for the passphrase; it writes the same files. A USB Wi-Fi + adapter is a second interface with its own name; use that name in the + commands above. + + + + Testing + + $ ping -c 3 192.168.1.1 +$ ping -c 3 www.NetBSD.org +$ route -n get default +$ netstat -an | grep LISTEN + + If the first ping works and the second does not, the address and + the route are fine and the resolver or the uplink is not. If neither + works, the interface is down or the cable is not in the right port. + dmesg names the interface the driver found, and + ifconfig shows whether it has an address. + + diff --git a/docs/guide/chapters/pkgsrc.xml b/docs/guide/chapters/pkgsrc.xml new file mode 100644 index 0000000000..a6836cd36e --- /dev/null +++ b/docs/guide/chapters/pkgsrc.xml @@ -0,0 +1,113 @@ + + + Packages and pkgsrc + + Makronix has two kinds of software: what NetBSD's build puts in the + base system, and what pkgsrc installs under /usr/pkg. + The desktop, Firefox, Thunderbird and the games are pkgsrc packages. The + package tools are NetBSD's; the packages on the medium are built for + Makronix or taken from the NetBSD project. + + + The package tools + + pkg_add1 + installs, pkg_delete1 + removes, and pkg_info1 + asks questions. The package database is + /usr/pkg/pkgdb. + + $ pkg_info | less +$ pkg_info -L firefox | less +$ pkg_info -D firefox +$ pkg_info -W /usr/pkg/bin/firefox + + lists the files of a package, + prints the message that came with it (where its + documentation is, which service to enable), and + answers which package owns a file. + + + + Installing a package + + /etc/pkg_install.conf names the repository in + PKG_PATH. The installer writes it when the machine is + installed; it points at the package repository on the installation + medium or at the NetBSD project's repository for the release the packages + were built for. With the path set, a package is one command: + + # pkg_add firefox +# pkg_add -u firefox +# pkg_delete firefox + + pkg_add -u updates an installed package to the + newest version the repository has. Without an argument it updates + everything that has a newer version: + + # pkg_add -uu +# pkg_admin rebuild + + An update can replace a library that another program needs. Read + the messages pkg_add prints, and keep the previous + package until the new one has started. + + + + The makronix set and the package database + + The packages that Makronix itself ships are in the + makronix set, which the installer unpacks as part of the + system. They are not registered in the package database: they change + with a Makronix release, and pkg_add -u does not + touch them. A program that is in the base set or in the + makronix set is therefore updated by installing a new + Makronix release, not by a package update. The programs that were + installed with pkg_add (Firefox, Thunderbird, QEMU, + the games) are registered and do update. + + pkg_info shows the registered packages. If it + does not list MCDE, that is not a defect: MCDE came with the release. + + + + Building from source + + The source set carries pkgsrc in /usr/pkgsrc. + A package is built in its own directory with the NetBSD make: + + # cd /usr/pkgsrc/www/firefox +# make install clean + + The build needs the distfiles for the package and its + dependencies. The source set carries the distfiles of the packages + Makronix ships, not the whole pkgsrc archive; a package outside that set + fetches what it needs, which requires a network connection. The + authoritative description of pkgsrc is The pkgsrc + Guide, installed with the tree and available on the NetBSD + project's web site. + + A build on the installed machine writes into + /usr/pkg and its work directories under + /usr/pkgsrc. It needs free space — a browser + can take several gigabytes while it builds — and it is the wrong + thing to do on a machine with a nearly full disk. + + + + Security updates + + pkg_admin1 + can compare the installed packages with the published vulnerability + list: + + # pkg_admin audit +# pkg_admin fetch-pkg-vulnerabilities + + Makronix enables fetch_pkg_vulnerabilities=YES + in /etc/daily.conf, so the list is fetched daily + and security8 + reports what it finds to root's mail. The report is only as good as the + list; read it, and update the packages it names. + + diff --git a/docs/guide/chapters/preface.xml b/docs/guide/chapters/preface.xml new file mode 100644 index 0000000000..968206bc38 --- /dev/null +++ b/docs/guide/chapters/preface.xml @@ -0,0 +1,62 @@ + + + Preface + + This is the guide to Makronix, a desktop operating system built on + NetBSD. It is written for the person who installs the system, uses the + MCDE desktop and administers the machine afterwards. It is not a + replacement for the manual pages; it tells you which page to read and in + which order. + + The guide follows the shape of The NetBSD Guide: + a tour, installation, the desktop, administration, networking and building, + with the same assumption that a system is something you understand rather + than something you click through. It is not a copy. Makronix decides what + NetBSD leaves open — the installer, the desktop, the packages on the + medium, the way a release is made — and where NetBSD's guide has a + chapter for a subsystem Makronix does not change, this guide names the + manual pages and the NetBSD text instead of repeating them. + + + How to read it + + Read first, then if + the system is new. The chapters about the desktop + ( and ) are for everybody; + the administration chapters are reference material. The last part is for + the person who builds Makronix from its own sources. + + Commands are shown as they are typed. A # at the + beginning means the command runs as root; a $ means it + runs as your own account. File names are in this + style, commands in this style, and values + you replace in this style. + + + + The guide in four forms + + The same text is installed four ways, so that it is readable where + you are: + + + as manual pages, starting at + makronix-guide7; + as a PDF, /usr/share/doc/makronix/makronix-guide.pdf; + as one HTML file, /usr/share/doc/makronix/makronix-guide.html; + as a book in the MCDE Information Manager + (dtinfo1). + + + + + Conventions + + Makronix is based on NetBSD, and much of what this guide describes + is NetBSD's mechanism, unchanged. When a chapter says + NetBSD, it means the mechanism Makronix inherited; when it + says Makronix, it means the part Makronix decides itself. + Where a procedure differs between the two, the chapter gives the Makronix + way first. + + diff --git a/docs/guide/chapters/printing.xml b/docs/guide/chapters/printing.xml new file mode 100644 index 0000000000..ffcd9c3b25 --- /dev/null +++ b/docs/guide/chapters/printing.xml @@ -0,0 +1,94 @@ + + + Printing, Sound and Power + + Three things a desktop is expected to get right, and three things + NetBSD leaves to the administrator: a printer, sound, and what happens + when the machine is idle or the battery is low. + + + Printing with CUPS + + Makronix uses the Common UNIX Printing System. The packages + cups and cups-filters + are on the medium; the service is cupsd in + /etc/rc.conf. With the service running, a printer + is added with lpadmin8: + + # echo 'cupsd=YES' >> /etc/rc.conf +# /etc/rc.d/cupsd start +# lpadmin -p office -E -v ipp://printer.example/ipp/print -m everywhere +# lpadmin -d office +# lpstat -t + + asks the printer for its own + description, which is the modern way; a printer that does not answer it + needs a driver package and a PPD file. The web interface at + http://localhost:631 does the same through a + browser, and lpoptions -p office -l lists the + options of the printer. + + Printing a file is lpr1: + + $ lpr -P office document.pdf +$ lpq -P office + + CUPS keeps its queues and its logs in + /var/spool/cups and + /var/log/cups. A job that stays in the queue is + usually a wrong device address or a printer that is off; the error log + says which. + + + + Sound + + NetBSD's audio device is configured with + audioctl1 + and mixerctl1; + audiocfg1 + lists the devices and lets you test them: + + $ audiocfg list +$ audiocfg test 0 +$ mixerctl -a +$ mixerctl -w outputs.master=180 + + MCDE shows the volume in the bar at the top: a slider in the menu, + a mute switch, and the wheel over the speaker. The setting is the same + mixer that mixerctl changes. + + The package pulseaudio and its volume + control pavucontrol are on the medium for + programs that expect a PulseAudio server; MCDE itself does not need one. + audioplay1 + plays a WAV file without a server, and + aucat1 + records and plays audio and can act as a sound server. + + + + Power and temperature + + envstat8 + shows the sensors the machine has: temperatures, fan speeds, voltages + and the battery. powerd8 + adjusts the CPU frequency to the load, which is what keeps a laptop + cool and quiet: + + # echo 'powerd=YES' >> /etc/rc.conf +# /etc/rc.d/powerd start +$ envstat +$ sysctl -a | grep -E 'cpu.frequency|machdep.cpu' + + A desktop machine can run at full speed all the time; a laptop + should not. The MCDE bar shows the battery when the machine has one, + and System Settings has the screen and sleep settings. On a machine + that supports it, apm8 + reports the battery and the AC state as well. + + A machine that shuts down without warning is usually hot or has a + failing power supply. Read envstat before you blame + the software; the temperatures are the first number to look at. + + diff --git a/docs/guide/chapters/rc.xml b/docs/guide/chapters/rc.xml new file mode 100644 index 0000000000..868649883f --- /dev/null +++ b/docs/guide/chapters/rc.xml @@ -0,0 +1,116 @@ + + + Services and rc.d + + NetBSD starts services through rc.d: one script + per service, and one configuration file that decides which of them run. + Makronix uses the mechanism unchanged; the services that a desktop needs + are already configured. + + + /etc/rc.conf + + /etc/rc.conf holds one variable per service. + foo=YES starts the service at boot, + foo=NO does not. The file is read by + rc8; + the variables are documented in + rc.conf5 + and in the header of each script. + + # grep -v '^#' /etc/rc.conf | grep . + + A local addition belongs in /etc/rc.conf, not + in a script: it survives an upgrade, and etcupdate + knows how to merge it. A single service can also be configured in + /etc/rc.conf.d/service, + which is useful when a package or an administrator owns one file. + + + + Starting, stopping and checking a service + + The scripts are in /etc/rc.d. Each takes the + verbs start, stop, + restart, status and + onestart (start it now without changing + rc.conf): + + # /etc/rc.d/dhcpcd status +# /etc/rc.d/dhcpcd restart +# /etc/rc.d/sshd onestart + + A service that fails at boot writes its reason to the console and + to /var/log/messages. A script that is not + executable, or a variable with a typo, is the usual cause. The order in + which the scripts run is decided by the REQUIRE and + PROVIDE lines at the top of each script, not by the + alphabetical order; rcorder8 + prints the order. + + + + The desktop services + + On a Makronix desktop the relevant entries are: + + + + dhcpcd=YES + The DHCP client, when the network is configured by + DHCP. A machine with a fixed address sets + dhcpcd=NO and configures the interface in + /etc/ifconfig.if. + + + sshd=YES + The Secure Shell server. The installer enables it; + the firewall lets it in. + + + ntpd=YES + Time synchronisation. The server list is + /etc/ntp.conf. + + + npf=YES + The firewall. Its rules are in + /etc/npf.conf; + explains them. + + + dtlogin=YES + The graphical login. Without it the machine starts + with a text console; startx is not the same + thing, and the MCDE session is started by + dtlogin. + + + cupsd=YES + The print service, when printing is set up + (). + + + + + + Adding a service + + A service that comes from pkgsrc installs its own script in + /usr/pkg/share/examples/rc.d or + /etc/rc.d. Copy it into + /etc/rc.d if it is an example, make it executable, + add the variable to /etc/rc.conf, and start it once + to see whether it works before the next boot: + + # cp /usr/pkg/share/examples/rc.d/foo /etc/rc.d/foo +# chmod 755 /etc/rc.d/foo +# echo 'foo=YES' >> /etc/rc.conf +# /etc/rc.d/foo start +# /etc/rc.d/foo status + + If the service needs a directory or a user, its package + documentation says so; pkg_info -D foo prints the + message that came with the package. + + diff --git a/docs/guide/chapters/services.xml b/docs/guide/chapters/services.xml new file mode 100644 index 0000000000..f083765147 --- /dev/null +++ b/docs/guide/chapters/services.xml @@ -0,0 +1,94 @@ + + + DNS, DHCP and NTP + + Three small services make a network usable: something that answers + name lookups, something that hands out addresses, and something that keeps + the clock right. A desktop uses all three as a client; a machine that + serves a network runs the first two as a server. + + + Name resolution + + The resolver reads /etc/resolv.conf. It lists + the name servers in the order they are tried, and the domain that + short names belong to: + + search example.lan +nameserver 192.168.1.1 +nameserver 9.9.9.9 + + /etc/nsswitch.conf decides where a lookup + goes first. Makronix's installer sets hosts: files mdnsd + dns, so the local file answers first, then the local network + names, then DNS. The local name + name.local is answered + by mdnsd8. + + A machine that should answer DNS for a small network can run + unbound8 + as a caching resolver, or nsd8 + as an authoritative server. Both are packages; both have their own + documentation, and both should be reachable only from the network they + serve. The firewall chapter is the place to decide that. + + + + DHCP + + A client runs dhcpcd8 + and needs no configuration beyond dhcpcd=YES. A + server runs dhcpd8 + with a lease file and a subnet declaration: + + # cat /etc/dhcpd.conf +subnet 192.168.1.0 netmask 255.255.255.0 { + range 192.168.1.100 192.168.1.199; + option routers 192.168.1.1; + option domain-name-servers 192.168.1.1; + default-lease-time 86400; + max-lease-time 604800; +} + +# echo 'dhcpd=YES' >> /etc/rc.conf +# touch /var/db/dhcpd.leases +# /etc/rc.d/dhcpd start + + The interface that serves the network must have a fixed address in + the same subnet (); a DHCP server with an + address from DHCP is a machine that cannot find itself. A machine that + should always get the same address can be pinned by its Ethernet + address: + + host printer { + hardware ethernet 00:11:22:33:44:55; + fixed-address 192.168.1.50; +} + + + + Time + + A correct clock matters for TLS, for mail and for the logs of two + machines that are compared. ntpd8 + is the daemon; /etc/ntp.conf names the servers: + + server 0.pool.ntp.org +server 1.pool.ntp.org +server 2.pool.ntp.org + + + With ntpd=YES, the clock is corrected + continuously and slowly. A clock that is wrong by hours is set once by + hand before the daemon starts: + + # date 202611151200 +# /etc/rc.d/ntpd restart +$ ntpq -p + + ntpq -p lists the servers, the stratum and the + offset. A server marked with an asterisk is the one the daemon is + following. If none of them answers, the network or the firewall is the + problem, not the clock. + + diff --git a/docs/guide/chapters/sharing.xml b/docs/guide/chapters/sharing.xml new file mode 100644 index 0000000000..77ea112fa2 --- /dev/null +++ b/docs/guide/chapters/sharing.xml @@ -0,0 +1,139 @@ + + + Remote Access and File Sharing + + A Makronix machine is a Unix machine on a network. It can be + reached with SSH, it can serve files with NFS, SMB or AFP, and it can + mount the shares of other machines. MCDE's file manager shows the network + places that the system has been told about; System Settings has the + sharing controls. + + + SSH + + The installer enables sshd8 + and the firewall lets it in. Log in from another machine with your + account: + + $ ssh name@studio.example +$ ssh name@studio.local + + A key is better than a password and is the only way to log in + without typing one. Create it once, then put the public half on the + machines you log in to: + + $ ssh-keygen -t ed25519 +$ cat ~/.ssh/id_ed25519.pub | ssh name@studio.example \ + 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys' +$ chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys + + scp copies a file, sftp is + an interactive file transfer, and a tunnel forwards a port through the + connection: + + $ scp report.pdf name@studio.example:/home/name/ +$ ssh -L 8080:localhost:80 name@studio.example + + The server's configuration is + /etc/ssh/sshd_config. Password logins for root are + disabled by default; log in as yourself and use su. + After a change, test the configuration and reload the daemon: + + # sshd -t +# /etc/rc.d/sshd reload + + + + NFS + + NFS is the native Unix file sharing. The server exports a + directory in /etc/exports: + + /home -alldirs -maproot=root -network 192.168.1.0 -mask 255.255.255.0 + + and runs the daemons: + + # echo 'rpcbind=YES' >> /etc/rc.conf +# echo 'nfsd=YES' >> /etc/rc.conf +# echo 'mountd=YES' >> /etc/rc.conf +# /etc/rc.d/rpcbind start +# /etc/rc.d/mountd start +# /etc/rc.d/nfsd start +# /etc/rc.d/mountd restart + + The client mounts it with mount_nfs or + mount -t nfs: + + # mount -t nfs 192.168.1.20:/home /mnt + + An entry in /etc/fstab makes it permanent. + lets root on the client write as root on + the server; without it, root is mapped to nobody. A share that is open + to the whole network should be a decision, not a default. + + + + SMB and AFP + + Windows and macOS machines speak SMB; older Macs speak AFP. + Makronix ships both servers as packages: + + # pkg_add samba4 netatalk4 +# echo 'smbd=YES' >> /etc/rc.conf +# echo 'nmbd=YES' >> /etc/rc.conf +# echo 'afpd=YES' >> /etc/rc.conf + + The Samba configuration is + /usr/pkg/etc/samba/smb.conf. A minimal share that + is visible to one user: + + [global] + workgroup = HOME + server string = Makronix + security = user + passdb backend = tdbsam + +[share] + path = /home/share + valid users = name + read only = no + browseable = yes + + Create the Samba user after the system account exists: + + # smbpasswd -a name +# /etc/rc.d/smbd start +# /etc/rc.d/nmbd start + + AFP is configured in /usr/pkg/etc/netatalk/afp.conf; + the package's documentation has the share syntax for the version that is + installed. MCDE's System Settings has the + sharing controls for both, and its file manager shows a share that is + mounted or announced on the network. + + + + Mounting a remote directory + + When the other machine offers only SSH, SSHFS mounts a directory + over it: + + # pkg_add fuse-sshfs +$ sshfs name@studio.example:/home/name /mnt/studio +$ umount /mnt/studio + + The package afpfs-ng does the same for + an AFP server. Both need the FUSE device and the user's permission to + mount; the package message says which group to join. + + + + Before you open a service + + Every service that listens on the network is a door. Open only + the ones you use, restrict them to the network they serve, and read the + firewall chapter before you connect the machine to a network you do not + control. A file share with a weak password is worse than no file + share. + + diff --git a/docs/guide/chapters/shell.xml b/docs/guide/chapters/shell.xml new file mode 100644 index 0000000000..319378b603 --- /dev/null +++ b/docs/guide/chapters/shell.xml @@ -0,0 +1,118 @@ + + + The Command Line + + The desktop is where the work starts, but the command line is where + a Unix system is understood and repaired. Makronix uses NetBSD's shell, + NetBSD's tools and NetBSD's manual pages; nothing here is special to + Makronix except the paths of the MCDE programs. + + + The shell + + The login shell of a new account is + sh1, + NetBSD's POSIX shell. It reads ~/.profile at login + and ~/.shrc for interactive shells. A user who + prefers a Korn shell can use /usr/pkg/bin/ksh93 + (installed for MCDE's dtksh) and change the login + shell with chsh1. + + The important environment variables are PATH, + HOME, SHELL, TERM and + LANG. A desktop session gets PATH from + the session configuration, not only from + ~/.profile; if a program is found in a terminal but + not from the panel, compare the two: + + $ echo $PATH +$ env | sort + + + + Pipes, redirection and jobs + + A pipe sends the output of one program to the input of the next; + redirection sends it to a file. The three that matter every day: + + $ dmesg | less +$ grep -i error /var/log/messages > /tmp/errors +$ command 2>&1 | tee log + + Ctrl+C stops the program in the + foreground, Ctrl+Z suspends it, and + bg, fg and + jobs manage it. command & + starts it in the background. + + A file's permissions are read with ls -l and + changed with chmod1. + The three digits are the owner, the group and everybody else; the + execute bit is what makes a file a program. A directory needs the + execute bit to be entered, and the write bit to be changed. + + $ chmod 644 notes.txt +$ chmod 755 script.sh +$ chown user:wheel script.sh + + + + Editing files + + vi1 + is in the base system and is the editor to know when the desktop is not + running. It has two modes: command mode, where keys are commands, and + insert mode, where they are text. i enters insert + mode, Esc returns to command mode, + :w writes, :q quits and + :wq does both. dd deletes a line, + /text searches, and u undoes. + + On the desktop, dtpad1 + edits plain text with menus and a search dialog. Configuration files + are plain text either way; keep a copy before a large change + (cp file file.orig) and compare afterwards with + diff1. + + + + Finding the documentation + + man1 + reads the manual pages. The sections are 1 (commands), 2 (system + calls), 3 (library functions), 4 (devices), 5 (file formats), 7 + (conventions) and 8 (administration). The useful forms: + + $ man ls +$ man 5 rc.conf +$ man -k firewall +$ apropos password + + man -k searches the one-line descriptions; + apropos is the same. The Makronix Guide is a set of + pages in section 7, starting at + makronix-guide7. + The HTML and PDF forms are under + /usr/share/doc/makronix. + + + + Becoming the administrator + + Administrative commands run as root. On a + desktop, log in as yourself and use + su1: + + $ su - +Password: +# + + The minus makes it a login shell, with root's + PATH and environment. Your account is in the wheel + group, which is what allows su; a terminal that is + left alone returns to your prompt when you type exit. + Log in as yourself rather than as root: the desktop account is the + account for people, and su is the door to the + system. + + diff --git a/docs/guide/chapters/tour.xml b/docs/guide/chapters/tour.xml new file mode 100644 index 0000000000..36b323479e --- /dev/null +++ b/docs/guide/chapters/tour.xml @@ -0,0 +1,139 @@ + + + A Tour of the System + + Before you change anything, know where things are. Makronix uses + NetBSD's layout; the Makronix parts sit in the places CDE and pkgsrc + already use. + + + The file system + + + + / + The root file system: the kernel + (/netbsd), the boot loader and the base + userland. + + + /etc + The configuration of this machine: + rc.conf, fstab, + master.passwd, the network configuration and + the rc.d scripts. Files here belong to the + administrator, not to a package. + + + /usr + The base system's programs, libraries, headers, + manual pages and shared files. /usr/src, + /usr/xsrc and /usr/msrc + hold the sources when the source set is installed. + + + /usr/pkg + Everything pkgsrc installs. The programs are in + /usr/pkg/bin and + /usr/pkg/sbin; the MCDE desktop is in + /usr/pkg/dt. The package database is + /usr/pkg/pkgdb. + + + /home + One directory per user. A new account gets + /home/name and the + files from /etc/skel. + + + /var + Data that changes: logs in + /var/log, mail spools, databases, the package + cache and the print spool. + + + + + + Where MCDE lives + + MCDE is installed as a package under + /usr/pkg/dt. The programs are in + /usr/pkg/dt/bin; the shared data, the palettes and + the colors are in /usr/pkg/dt/share; the session + configuration is in /usr/pkg/dt/config. A user's + own desktop settings live in ~/.dt. + + The system-wide CDE configuration directory is + /etc/dt. It is the place for settings that apply + to every user, and it is where the Makronix Guide's information library + is installed (see ). + + + + The files you will edit + + + /etc/rc.conf — which + services start at boot. The variables are documented in + rc.conf5. + /etc/fstab — which file + systems are mounted where. + /etc/hosts, + /etc/resolv.conf and + /etc/mygate — the network, as in NetBSD. + /etc/npf.conf — the + firewall. Makronix installs a rule set that lets in SSH and the + replies to outgoing traffic. + /etc/makronix/update — the + first line names the source of software updates. + /etc/dt/config/Xsession.d/ — + scripts that every MCDE session runs. + + + + + What runs + + After boot, init8 + starts the services named in /etc/rc.conf. On a + Makronix desktop the important ones are: + + + dtlogin1 + — the graphical login screen. It starts the X server and the + user's session. + dtwm1 + — the window manager: window frames, the front panel and the + workspaces. + dtsession1 + — the session manager behind the desktop. + dhcpcd8 + — the DHCP client, when the network is configured by DHCP. + ntpd8 + — the time synchronisation the installer enables. + + + ps1 + shows them; top1 + shows what they use. A process that fails at boot leaves its reason in + /var/log/messages and, for a service, in the + console output of rc.d. + + + + Documentation on the machine + + The manual pages are installed in the usual sections. Start with + afterboot8, + then read the page for the program you are using. The Makronix Guide + itself is makronix-guide7; + each chapter has its own page, and the guide is also installed as a PDF + and as HTML under /usr/share/doc/makronix. + + When a page does not answer the question, the source is the last + word. The source set puts NetBSD's source in /usr/src + and Makronix's own tools and documentation in + /usr/msrc. + + diff --git a/docs/guide/chapters/updating.xml b/docs/guide/chapters/updating.xml new file mode 100644 index 0000000000..ef63187609 --- /dev/null +++ b/docs/guide/chapters/updating.xml @@ -0,0 +1,98 @@ + + + Updating the Desktop + + Makronix is one system: the base, the X server, the desktop and the + packages that came with the release move together. The package tools + update the packages that were installed with them; a Makronix release + updates everything else. This chapter is the practical order. + + + From System Settings + + Open System Settings and choose + Software Update. The dialog reads the source from + the first line of /etc/makronix/update, shows what + it found, and asks for the administrator's password before it changes + anything. It runs sysupgrade for the base system and + then pkg_add -uu for the registered packages. The + machine must be rebooted afterwards. + + The source is a directory, a file:// address + or an https:// address. http:// + and ftp:// are refused: a base system that is + fetched over an unencrypted connection is a base system that can be + changed on the way. An https:// source is protected + by TLS; a file:// source is as trusted as the medium + it is on. This release does not verify a signature on the sets, so use + a source you control and keep the previous medium until the new system + has started. + + + + From the command line + + # cat /etc/makronix/update +https://example.invalid/makronix/0.99.10/amd64 +# sysupgrade auto "$(cat /etc/makronix/update)" +# postinstall -s /usr/src/etc fix +# etcupdate -s /usr/src/etc +# pkg_add -uu +# reboot + + The order matters: the base system first, then the configuration + merge, then the packages, then the reboot. If sysupgrade + fails, stop there; a half-updated base with new packages is harder to + repair than either one alone. + + + + MCDE and the makronix set + + The desktop is part of the makronix set, which the + installer unpacks as part of the system. It is not in the package + database, so pkg_add -u does not update it; a new + Makronix release does. The same is true of the base system's programs + (vim, git-base, sysupgrade) and of the libraries MCDE needs. + + A person who builds Makronix from source updates the desktop by + building the new tree and installing its release; the next chapter + describes the build. A person who only uses the desktop updates it with + the release's own update dialog or medium. + + + + The guide itself + + The guide is generated from docs/guide and + installed with the release. After a change to the guide's source, rebuild + it and install the four forms: + + $ cd /usr/msrc +$ sh docs/guide/build.sh all +$ sh docs/guide/build.sh install + + The build needs pandoc, + xmllint, mandoc, + Chrome or Google Chrome for the PDF, and a host build of MCDE for the + information library. build.sh check verifies that + every form was produced; the details are in + docs/guide/AGENTS.md. + + + + If an update goes wrong + + The old kernel is /netbsd.old and the loader's + menu can start it. The old configuration is in + /etc/rc.conf.old after postinstall + or etcupdate replaced it. On an encrypted system, the + kernel the machine starts is the copy in /cgdboot; + explains how to put the old one + back. + + A machine that does not start is not a machine that is lost. Start + the medium, mount the root file system and read the logs; the data is + still there, and the source set can rebuild the system around it. + + diff --git a/docs/guide/chapters/upgrade.xml b/docs/guide/chapters/upgrade.xml new file mode 100644 index 0000000000..efb8acf52c --- /dev/null +++ b/docs/guide/chapters/upgrade.xml @@ -0,0 +1,111 @@ + + + Upgrading Makronix + + An upgrade replaces the base system and keeps your accounts, your + files and the packages you installed. There are two ways to do it: from a + new installation medium, or from a running system with + sysupgrade8. + Both end with the same steps: the sets are unpacked, the configuration is + merged, and the machine is rebooted. + + + From the medium + + Start the new medium and choose Upgrade NetBSD on a hard + disk in sysinst. The installer asks for the + disk and the root partition, unpacks the new sets over the old system + and leaves /etc and /home + alone. The makronix set is part of the upgrade; choose it + when the installer offers the sets. + + After the reboot, run the two NetBSD tools that bring the + configuration up to date: + + # postinstall -s /usr/src/etc fix +# etcupdate -s /usr/src/etc + + postinstall8 + repairs the files that NetBSD knows how to merge (the mail + configuration, the device files, the fonts); etcupdate8 + merges the rest and leaves its conflicts for you to resolve. Read + /etc/rc.conf afterwards: a new release can add a + service or rename a variable, and the old file is kept as + /etc/rc.conf.old when it is replaced. + + + + With sysupgrade + + sysupgrade does the same work from the running + system. It fetches the sets from a directory, a file:// + address or an https:// address, unpacks them and + updates the kernel. The address is the first line of + /etc/makronix/update: + + # cat /etc/makronix/update +https://example.invalid/makronix/0.99.10/amd64 +# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64 + + After sysupgrade, run postinstall + and etcupdate as above and reboot. The MCDE + System Settings has the same operation as a + dialog: it reads the source from /etc/makronix/update, + runs sysupgrade for the base system and then + pkg_add -uu for the packages. + + Trust: an https:// + source is protected by TLS; a file:// source is as + trusted as the medium it is on. This release does not verify a + signature on the sets. Use a source you control, and keep a copy of the + previous release until the new one has started. + + + + The packages + + Packages from pkgsrc are updated with the package tools, not with + the base system: + + # pkg_add -uu +# pkg_admin rebuild + + The packages of the makronix set are not in the + package database: the installer unpacks them as part of the set. They + change with a Makronix release, which is one reason to upgrade the whole + system rather than a single file. + + + + An encrypted system + + On an encrypted system the kernel the machine boots is the copy on + the small unencrypted partition, not /netbsd in the + encrypted root. After an upgrade, copy the new kernel and the matching + cgdroot.kmod to that partition: + + # mount /cgdboot +# cp /netbsd /cgdboot/netbsd +# cp /path/from/the/release/cgdroot.kmod /cgdboot/ +# umount /cgdboot + + The release notes name the exact path of + cgdroot.kmod; it is part of the kernel set of the + new release. Keep the old kernel as + /cgdboot/netbsd.old so that the loader can start it + if the new one fails. + + + + If the upgrade fails + + A failed upgrade is not a lost machine. Start the old medium, + mount the root partition and read /var/log/messages; + the installer has left the old configuration in + /etc/rc.conf.old and the old kernel in + /netbsd.old. The loader's menu can start + netbsd.old when the new kernel does not boot. With + the source set installed, the system can be rebuilt in place + (). + + diff --git a/docs/guide/chapters/users.xml b/docs/guide/chapters/users.xml new file mode 100644 index 0000000000..9bcb4cc6fd --- /dev/null +++ b/docs/guide/chapters/users.xml @@ -0,0 +1,95 @@ + + + Users and Accounts + + Makronix is a machine for people: the installer creates one account + for the person who uses it, and that account is in the groups a desktop + needs. More accounts are added with NetBSD's user tools, and the same + accounts appear at the login screen and in System Settings. + + + Where the accounts live + + /etc/master.passwd is the real database; + /etc/passwd is its public view, without the + password hashes. Both are generated from the master file by + pwd_mkdb8. + The group database is /etc/group. Edit them with + vipw8 + and vi1 + rather than with a text editor that does not know about the locks. + + Each account has a home directory, a login shell and a list of + groups. A new account gets the files from + /etc/skel, which is where a site puts its default + .profile and desktop files. + + + + Adding an account + + # useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \ + -c "Full Name" -s /bin/sh name +# passwd name + + useradd creates the home directory with + , puts the account in the named groups and sets the + shell. passwd then sets the password; without it the + account cannot log in. The groups are the ones the installer uses: + + + wheelMay use + su to become root. + operatorMay use the + operator commands (shutdown, and the disk tools that are marked for + it). + staffThe usual group for + files that a team shares. + usersThe ordinary users of + the machine. + dialerMay use the serial + ports and the modems. + gamesMay write the games' + score files. + wsrcMay write the source + tree under /usr/src. + + + The same operation is in System Settings under + Users; it asks for the administrator's password and + writes the same files. + + + + Changing and removing an account + + # usermod -G wheel,operator,staff,users,dialer,games,wsrc name +# chsh -s /usr/pkg/bin/ksh93 name +# userdel -r name + + usermod changes the groups, the shell, the full + name or the home directory; chsh changes the shell of + the account that runs it. userdel -r removes the + account and its home directory; without the files + stay. A removed account leaves its files owned by a number; find them + with find / -nouser -print before you delete anything + else. + + + + Passwords + + Passwords are stored as hashes in + /etc/master.passwd, which only root can read. A + user changes their own with passwd; root changes + another with passwd name. The password quality is + the administrator's business: a desktop machine on a home network needs + a different policy from a machine that is reachable from the + Internet. + + If a password is lost, root sets a new one from a single-user boot + or from another account in the wheel group. The fact that this is + possible is the reason a machine left alone in a public place must be + locked, not only logged out. + + diff --git a/docs/guide/chapters/what.xml b/docs/guide/chapters/what.xml new file mode 100644 index 0000000000..fae935042b --- /dev/null +++ b/docs/guide/chapters/what.xml @@ -0,0 +1,102 @@ + + + What Makronix Is + + Makronix is a complete operating system for the desktop: a kernel, + a userland, a graphical login, a desktop and the programs that make a + machine usable, installed together and updated together. It is built on + NetBSD, uses NetBSD's conventions and keeps NetBSD's manual pages, so a + person who knows NetBSD will find the system familiar. What Makronix + decides is everything NetBSD leaves open. + + + NetBSD underneath + + The kernel, the C library, the userland and the build system are + NetBSD's. Makronix tracks NetBSD's source tree directly; there is no + patch layer between the two. The boot loader, /etc/rc.conf, + the package tools and the section 8 manual pages are the ones NetBSD + documents. + + The kernel still calls itself NetBSD in + uname1, + on purpose: pkgsrc, config.guess and a great deal of + third-party software decide from that name which system they are on. The + product name Makronix 0.99.10 is what the installer, the + login screen, the message of the day and the release notes call the + system. + + + + What Makronix decides + + Four decisions turn NetBSD into Makronix: + + + + The installer. Makronix's + sysinst8 + has two ways. The simple way asks for the disk and whether it is + encrypted, then installs everything, then asks the questions a new + computer needs — its name, the network, the time zone, the + administrator's password and the first account — before the + first reboot. The full way is the NetBSD installation, unchanged. + + + The desktop. MCDE, the Makronix Common + Desktop Environment, is a fork of CDE. It starts at + dtlogin1, + uses Motif, and is designed to be quick on a machine from the + 1990s. It is described in . + + + The packages on the medium. The programs + that Makronix ships are on the installation medium, in the + makronix set and in the repository next to it. A + machine is usable without a network connection. + + + The source set. The medium also carries + the sources — NetBSD's source sets and the Makronix source set + — so that the system can rebuild itself offline. The + procedure is in . + + + + + + The release and its name + + This guide describes Makronix 0.99.10, whose release name is + Camouflage. Release names are CDE palette names, and a + release looks like its palette: the logo, the icon set, the installer + colours and the desktop colours come from it. The palette is installed + as /usr/pkg/dt/share/palettes/Camouflage.dp. + + 0.99.10 is a snapshot, not a long-term release. Install it on a + machine whose data you have elsewhere, and read the release notes on the + installation medium before you start. + + + + Platforms + + amd64 is the first target and the one the build tests on every + change, in QEMU with BIOS and UEFI and on a 2011 MacBook Pro. PowerPC + Macs (G3, G4 and G5) and 64-bit ARM machines (Raspberry Pi 4, + ODROID-N2, ODROID-M1) are the next targets; a platform counts as + supported only when an installation from its medium reaches a login + prompt. The measured state of each platform is in + /usr/src/docs/PLATFORMS.md in the source set. + + + + Licence + + Makronix's own text and tools are under the CNCL 1.0 (Could Not + Care Less), a licence that asks only that you do not blame the authors. + NetBSD's source keeps its BSD licence, MCDE keeps the CDE licence (LGPL + 2.0 or later), and pkgsrc packages keep their own licences. Appendix C + lists the details. + + diff --git a/docs/guide/chapters/x11.xml b/docs/guide/chapters/x11.xml new file mode 100644 index 0000000000..9647d2d376 --- /dev/null +++ b/docs/guide/chapters/x11.xml @@ -0,0 +1,87 @@ + + + The Display and X11 + + MCDE draws on the X Window System, and X is part of the Makronix + base system. The server, the drivers, the fonts and the clients are in + /usr/X11R7; there is no separate X package to + install. On a normal machine the server needs no configuration at all, + and dtlogin starts it. + + + The server and the session + + The login screen starts the X server and, after a login, the MCDE + session. A text console can start a bare X session with + startx1, + but that is not the MCDE session: it starts the user's + ~/.xinitrc and nothing else. Use it to test the + server, not as the daily desktop. + + $ startx +$ xdpyinfo | head +$ xrandr + + xdpyinfo prints the display's capabilities, and + xrandr lists the outputs and the modes. A second + monitor is enabled with xrandr --output; the setting + lasts for the session unless it is put in a session script. + + + + When the server needs a configuration + + Most hardware is detected. A machine with an unusual graphics + chip, a wrong resolution or a display that stays black can be given a + configuration file: + + # X -configure +# cp /root/xorg.conf.new /etc/X11/xorg.conf +# X -config /etc/X11/xorg.conf + + The file is a starting point, not a guarantee. The log is + /var/log/Xorg.0.log; the lines marked + (EE) are errors and (WW) are + warnings. A server that starts from the console but not from + dtlogin usually has a permission or a display-manager + problem, not a driver problem. + + + + Keyboard and fonts + + The text console and X have separate keyboard settings. The + console is configured with + wsconsctl8: + + # wsconsctl -w keyboard.encoding=de + + The key map is set in /etc/wscons.conf. In X, + MCDE's System Settings sets the layout for the session; the + X server's own configuration is in + /etc/X11/xorg.conf.d/. A keyboard that types the + wrong characters in a terminal but the right ones on the console (or the + other way round) is set in the other place. + + The fonts are installed with the X sets. + fc-list1 + lists them and fc-cache -f refreshes the cache after + a font is added. MCDE's terminal and login screen use Hack; the rest of + the desktop uses the system font, which System Settings changes. + + + + Programs from another machine + + An X program can run on one machine and display on another. SSH + forwards the connection, which is the safe way: + + $ ssh -X name@studio.example xterm + + asks for trusted forwarding; + is the older, less restricted form. The remote + machine needs an X client and the local one needs the server, which + Makronix has. A program that refuses to start has usually failed an + authorization check; the SSH connection sets that up for you. + + diff --git a/docs/guide/check.sh b/docs/guide/check.sh new file mode 100755 index 0000000000..8d5b0d453b --- /dev/null +++ b/docs/guide/check.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# +# check.sh -- verify the installed copies of The Makronix Guide. +# +# This is the test that can go red: it reads the files the release installs +# (src/share/doc/makronix, src/share/man/man7, src/etc) and checks that each +# form is present and readable. It does not rebuild anything; the build is +# docs/guide/build.sh, which needs pandoc and Chrome. +# +# Usage: docs/guide/check.sh [root] +# (default root: the repository this script is in) + +set -eu + +HERE=$(cd "$(dirname "$0")" && pwd) +ROOT=${1:-$(cd "$HERE/../.." && pwd)} +DOC=$ROOT/src/share/doc/makronix +MAN=$ROOT/src/share/man/man7 +ETC=$ROOT/src/etc + +die() +{ + echo "guide check: $*" >&2 + exit 1 +} + +[ -s "$DOC/makronix-guide.html" ] || die "missing HTML" +grep -q 'The Makronix Guide' "$DOC/makronix-guide.html" || + die "the HTML does not name the guide" +grep -q 'class="cover"' "$DOC/makronix-guide.html" || + die "the HTML has no cover" +grep -q 'data:image/png;base64,' "$DOC/makronix-guide.html" || + die "the HTML has no embedded logo" + +[ -s "$DOC/makronix-guide.pdf" ] || die "missing PDF" +pages=1 +if command -v pdfinfo >/dev/null 2>&1; then + pages=$(pdfinfo "$DOC/makronix-guide.pdf" 2>/dev/null | + awk '/^Pages:/ { print $2; exit }') + [ -n "$pages" ] || die "the PDF has no page count" + [ "$pages" -gt 10 ] || die "the PDF has only $pages pages" + head -c 4 "$DOC/makronix-guide.pdf" | grep -q '%PDF' || + die "the PDF has no PDF header" +fi + +[ -f "$DOC/infolib/makronix.dti/bookcase.map" ] || + die "missing information library" +grep -q 'MAKRONIX' "$DOC/infolib/makronix.dti/bookcase.map" || + die "the information library does not name MAKRONIX" +[ -f "$DOC/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd" ] || + die "the information library has no book database" +[ -f "$DOC/infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf" ] || + die "the information library has no search index" + +command -v mandoc >/dev/null 2>&1 || die "mandoc is not installed" +want=$(( $(grep -c '^[^#].*|' "$HERE/chapters.list") + 1 )) +n=0 +for f in "$MAN"/makronix-guide*.7; do + [ -f "$f" ] || continue + head -1 "$f" | grep -q '^\.TH ' || die "$f has no .TH line" + mandoc -Tutf8 "$f" >/dev/null 2>&1 || die "$f does not render" + n=$((n + 1)) +done +[ "$n" -eq "$want" ] || die "found $n manual pages, expected $want" + +[ -f "$ETC/makronix-xsession" ] || die "missing the Xsession script" +grep -q 'DTINFOLIBDEFAULT=makronix' "$ETC/makronix-xsession" || + die "the Xsession script does not select the guide" +grep -q '/usr/share/doc/makronix/infolib/makronix.dti' "$ETC/Makefile" || + die "src/etc/Makefile does not link the information library" + +echo "guide check: ok ($n manual pages, $pages PDF pages)" diff --git a/docs/guide/style.css b/docs/guide/style.css new file mode 100644 index 0000000000..3fbc6f25e8 --- /dev/null +++ b/docs/guide/style.css @@ -0,0 +1,355 @@ +/* License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. */ +/* + * makronix-guide.css -- the Makronix Guide. + * + * The colours are the Camouflage palette of the release (the same palette + * as www/style.css): background #acbeb4, panels #8e8e77 and #6e7d76, + * dark #4e6b65, accent #907b7b. The bevels are drawn the way Motif draws + * them: light on the top and the left, dark on the bottom and the right. + */ + +:root { + --mak-bg: #acbeb4; + --mak-panel: #8e8e77; + --mak-dark: #4e6b65; + --mak-accent: #907b7b; + --mak-light: #dfe7e2; + --mak-mid: #c5d2cb; + --mak-ink: #1a1a1a; + --mak-line: #6e7d76; +} + +html { font-size: 16px; } + +body { + margin: 0; + padding: 0; + background: var(--mak-bg); + color: var(--mak-ink); + font-family: "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", sans-serif; + font-size: 0.95rem; + line-height: 1.55; +} + +/* ------------------------------------------------------------------ cover */ + +.cover { + box-sizing: border-box; + max-width: 50rem; + margin: 2cm auto 1cm auto; + padding: 3.2cm 2.4cm 2.2cm 2.4cm; + text-align: center; + background: var(--mak-light); + border-top: 3px solid #f4f8f6; + border-left: 3px solid #f4f8f6; + border-bottom: 3px solid var(--mak-line); + border-right: 3px solid var(--mak-line); +} + +.cover .logo { + display: block; + width: 22rem; + max-width: 90%; + margin: 0 auto 1.4rem auto; +} + +.cover-rule { + height: 3px; + margin: 0 auto 1.6rem auto; + background: var(--mak-dark); +} + +.covertitle { + margin: 0; + padding: 0; + border: 0; + color: var(--mak-dark); + font-size: 2.5rem; + line-height: 1.1; + letter-spacing: 0.04em; + page-break-before: avoid; +} + +.subtitle { + margin: 1rem 0 0 0; + color: var(--mak-ink); + font-size: 1.15rem; +} + +.edition { + margin: 0.5rem 0 1.4rem 0; + color: var(--mak-accent); + font-family: "DejaVu Sans Mono", monospace; + font-size: 0.92rem; +} + +.palette { + display: flex; + justify-content: center; + gap: 0; + margin: 0 auto 1.5rem auto; + width: 18rem; + max-width: 80%; + border-top: 2px solid #f4f8f6; + border-left: 2px solid #f4f8f6; + border-bottom: 2px solid var(--mak-line); + border-right: 2px solid var(--mak-line); +} + +.palette span { display: block; height: 1.1rem; flex: 1 1 0; } +.palette .p1 { background: var(--mak-bg); } +.palette .p2 { background: var(--mak-panel); } +.palette .p3 { background: var(--mak-dark); } +.palette .p4 { background: var(--mak-accent); } +.palette .p5 { background: var(--mak-mid); } + +.based { + margin: 0; + color: var(--mak-dark); + font-family: "DejaVu Sans Mono", monospace; + font-size: 0.8rem; + letter-spacing: 0.22em; +} + +/* -------------------------------------------------------------------- toc */ + +.tocpage { + box-sizing: border-box; + max-width: 50rem; + margin: 1rem auto 2rem auto; + padding: 1.4rem 2rem 1.8rem 2rem; + background: var(--mak-light); + border-top: 2px solid #f4f8f6; + border-left: 2px solid #f4f8f6; + border-bottom: 2px solid var(--mak-line); + border-right: 2px solid var(--mak-line); +} + +.tochead { + margin: 0 0 0.8rem 0; + padding: 0.3rem 0.7rem; + background: var(--mak-dark); + color: #ffffff; + font-size: 1.1rem; + letter-spacing: 0.04em; +} + +#TOC { margin: 0; } +#TOC ul { margin: 0.2rem 0 0.2rem 1.1rem; padding: 0; } +#TOC > ul { margin-left: 0; } +#TOC li { margin: 0.12rem 0; } +#TOC a { color: var(--mak-ink); text-decoration: none; } +#TOC a:hover { color: #000000; background: #d6e0da; } +#TOC > ul > li > a { font-weight: bold; color: var(--mak-dark); } + +/* ------------------------------------------------------------------ body */ + +.content { + box-sizing: border-box; + max-width: 50rem; + margin: 0 auto 2rem auto; + padding: 1.6rem 2.4rem 2.4rem 2.4rem; + background: var(--mak-light); + border-top: 2px solid #f4f8f6; + border-left: 2px solid #f4f8f6; + border-bottom: 2px solid var(--mak-line); + border-right: 2px solid var(--mak-line); +} + +h1, h2, h3, h4 { + color: var(--mak-dark); + font-family: "DejaVu Sans", sans-serif; + line-height: 1.2; + page-break-after: avoid; +} + +h1 { + margin: 2.2rem 0 0.8rem 0; + padding: 0.35rem 0.8rem; + background: var(--mak-mid); + border-top: 2px solid #f4f8f6; + border-left: 2px solid #f4f8f6; + border-bottom: 2px solid var(--mak-line); + border-right: 2px solid var(--mak-line); + font-size: 1.7rem; +} + +h1:first-of-type { margin-top: 0; } + +h2 { + margin: 1.6rem 0 0.5rem 0; + padding-bottom: 0.2rem; + border-bottom: 2px solid var(--mak-panel); + font-size: 1.28rem; +} + +h3 { + margin: 1.2rem 0 0.4rem 0; + font-size: 1.08rem; +} + +p { margin: 0.55rem 0; } + +a { color: #2e4a44; } +a:hover { color: #000000; background: #d6e0da; } + +code, pre, kbd, samp { + font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace; + font-size: 0.86em; +} + +pre { + margin: 0.8rem 0; + padding: 0.7rem 0.9rem; + overflow-x: auto; + background: var(--mak-mid); + border-top: 2px solid var(--mak-line); + border-left: 2px solid var(--mak-line); + border-bottom: 2px solid #f4f8f6; + border-right: 2px solid #f4f8f6; + page-break-inside: avoid; +} + +code { background: #d6e0da; padding: 0.05rem 0.2rem; } +pre code { background: transparent; padding: 0; } + +blockquote { + margin: 0.8rem 0; + padding: 0.4rem 1rem; + border-left: 4px solid var(--mak-panel); + background: #e8eeeb; +} + +ul, ol { margin: 0.5rem 0 0.7rem 1.4rem; padding: 0; } +li { margin: 0.2rem 0; } + +dl { margin: 0.6rem 0; } +dt { font-weight: bold; color: var(--mak-dark); } +dd { margin: 0 0 0.5rem 1.4rem; } + +table { + margin: 0.9rem 0; + border-collapse: collapse; + width: 100%; + font-size: 0.9rem; +} + +th, td { + padding: 0.35rem 0.55rem; + border: 1px solid var(--mak-line); + vertical-align: top; +} + +th { + background: var(--mak-panel); + color: #ffffff; + text-align: left; +} + +tr:nth-child(even) td { background: #e8eeeb; } + +.note, .tip, .warning, .caution, .important { + margin: 0.9rem 0; + padding: 0.6rem 0.9rem; + background: #e8eeeb; + border-top: 2px solid #f4f8f6; + border-left: 2px solid #f4f8f6; + border-bottom: 2px solid var(--mak-line); + border-right: 2px solid var(--mak-line); + page-break-inside: avoid; +} + +.note::before, .tip::before, .warning::before, .caution::before, .important::before { + display: block; + margin-bottom: 0.2rem; + color: var(--mak-dark); + font-weight: bold; + text-transform: uppercase; + letter-spacing: 0.08em; + font-size: 0.78rem; +} + +.note::before { content: "Note"; } +.tip::before { content: "Tip"; } +.warning::before { content: "Warning"; } +.caution::before { content: "Caution"; } +.important::before { content: "Important"; } + +hr { + margin: 1.4rem 0; + border: 0; + border-top: 2px solid var(--mak-panel); +} + +.printfooter { + margin: 1.2rem auto 2rem auto; + max-width: 50rem; + color: #2e4a44; + text-align: center; + font-family: "DejaVu Sans Mono", monospace; + font-size: 0.75rem; +} + +/* ----------------------------------------------------------------- print */ + +@page { + size: A4; + margin: 18mm 16mm 20mm 16mm; +} + +@media print { + html { font-size: 11pt; } + + body { + background: #ffffff; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + + .cover { + width: 100%; + max-width: none; + height: 247mm; + margin: 0; + padding: 42mm 22mm 20mm 22mm; + page-break-after: always; + } + + .cover .logo { width: 26rem; } + .covertitle { font-size: 3rem; } + + .tocpage { + width: 100%; + max-width: none; + margin: 0; + padding: 0; + border: 0; + background: #ffffff; + page-break-after: always; + } + + .tochead { color: var(--mak-dark); background: transparent; border-bottom: 2px solid var(--mak-panel); } + + .content { + width: 100%; + max-width: none; + margin: 0; + padding: 0; + border: 0; + background: #ffffff; + } + + h1 { + page-break-before: always; + background: var(--mak-mid); + } + + h1:first-of-type { page-break-before: avoid; } + + pre, table, blockquote, .note, .tip, .warning, .caution, .important { + page-break-inside: avoid; + } + + a { color: #2e4a44; text-decoration: none; } + .printfooter { display: none; } +} diff --git a/docs/guide/template.html5 b/docs/guide/template.html5 new file mode 100644 index 0000000000..b4728d8b5b --- /dev/null +++ b/docs/guide/template.html5 @@ -0,0 +1,41 @@ + + + + + + + +$title$ + + + + +
+ +
+

$title$

+

$subtitle$

+

$edition$

+ +

BASED ON NETBSD

+
+ +$if(toc)$ +
+

Contents

+$toc$ +
+$endif$ + +
+$body$ +
+ +
The Makronix Guide · Makronix 0.99.10 · based on NetBSD
+ + + diff --git a/docs/guide/tools/docbook-to-cde.lua b/docs/guide/tools/docbook-to-cde.lua new file mode 100644 index 0000000000..6ffca68763 --- /dev/null +++ b/docs/guide/tools/docbook-to-cde.lua @@ -0,0 +1,206 @@ +-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +-- docbook-to-cde.lua -- DocBook XML (pandoc AST) to the DocBook SGML dialect +-- that MCDE's dtdocbook2infolib reads. +-- +-- The CDE information library predates DocBook 4: it knows Book, Chapter, +-- Sect1..Sect4, Para, ItemizedList, OrderedList, VariableList, Screen, +-- Literal, Emphasis, ULink and XRef, and not much else. This writer emits +-- only that subset. + +local out = {} +local open = {} -- stack of { level = n, tag = "chapter"|"sect1"|... } +local counter = 0 + +local function emit(s) + out[#out + 1] = s +end + +local function esc(s) + if s == nil then return "" end + s = s:gsub("&", "&") + s = s:gsub("<", "<") + s = s:gsub(">", ">") + return s +end + +local function slug(s, fallback) + s = (s or ""):lower() + s = s:gsub("[^%w]+", "-") + s = s:gsub("^%-+", ""):gsub("%-+$", "") + if s == "" then s = fallback end + if not s:match("^[%a]") then s = "id-" .. s end + return s +end + +local function attr_id(el) + local id = "" + if el.attr and el.attr.identifier then id = el.attr.identifier end + if id == "" then + counter = counter + 1 + id = "MKG." .. tostring(counter) + end + return slug(id, "MKG." .. tostring(counter)) +end + +local function close_to(level) + while #open > 0 and open[#open].level >= level do + local top = table.remove(open) + emit("") + end +end + +local render_blocks, render_inlines + +render_inlines = function(xs) + for _, x in ipairs(xs) do + local t = x.t + if t == "Str" then + emit(esc(x.text)) + elseif t == "Space" then + emit(" ") + elseif t == "SoftBreak" or t == "LineBreak" then + emit("\n") + elseif t == "Emph" then + emit("") + render_inlines(x.content) + emit("") + elseif t == "Strong" then + emit("") + render_inlines(x.content) + emit("") + elseif t == "Code" then + emit("" .. esc(x.text) .. "") + elseif t == "Quoted" or t == "Cite" or t == "Span" or + t == "SmallCaps" or t == "Strikeout" or + t == "Superscript" or t == "Subscript" then + render_inlines(x.content) + elseif t == "Link" then + if x.target:sub(1, 1) == "#" then + emit("") + else + emit("") + render_inlines(x.content) + emit("") + end + elseif t == "Math" then + emit(esc(x.text)) + elseif t == "Note" then + emit("") + render_blocks(x.content) + emit("") + elseif t == "Image" then + emit(esc(pandoc.utils.stringify(x.caption))) + elseif t == "RawInline" then + -- nothing from HTML or TeX belongs in the SGML book + else + emit(esc(pandoc.utils.stringify(x))) + end + end +end + +render_blocks = function(bs) + for _, b in ipairs(bs) do + local t = b.t + if t == "Header" then + local level = b.level + local tag = "sect4" + if level <= 1 then tag = "chapter" + elseif level == 2 then tag = "sect1" + elseif level == 3 then tag = "sect2" + elseif level == 4 then tag = "sect3" + end + close_to(level) + emit("<" .. tag .. " id=\"" .. attr_id(b) .. "\">") + emit("") + render_inlines(b.content) + emit("") + open[#open + 1] = { level = level, tag = tag } + elseif t == "Para" or t == "Plain" then + emit("") + render_inlines(b.content) + emit("") + elseif t == "CodeBlock" then + emit("" .. esc(b.text) .. "") + elseif t == "BlockQuote" then + emit("
") + render_blocks(b.content) + emit("
") + elseif t == "BulletList" then + emit("") + for _, item in ipairs(b.content) do + emit("") + render_blocks(item) + emit("") + end + emit("") + elseif t == "OrderedList" then + emit("") + for _, item in ipairs(b.content) do + emit("") + render_blocks(item) + emit("") + end + emit("") + elseif t == "DefinitionList" then + emit("") + for _, item in ipairs(b.content) do + emit("") + render_inlines(item[1]) + emit("") + for _, def in ipairs(item[2]) do + render_blocks(def) + end + emit("") + end + emit("") + elseif t == "Div" then + local classes = b.attr and b.attr.classes or {} + local note = false + for _, c in ipairs(classes) do + if c == "note" or c == "tip" or c == "warning" or + c == "caution" or c == "important" then + note = true + end + end + if note then + emit("Note: " .. + esc(pandoc.utils.stringify(b.content)) .. "") + else + render_blocks(b.content) + end + elseif t == "LineBlock" then + emit("") + for i, line in ipairs(b.content) do + if i > 1 then emit("") end + render_inlines(line) + end + emit("") + elseif t == "Table" then + emit("" .. esc(pandoc.utils.stringify(b)) .. "") + elseif t == "Figure" then + render_blocks(b.content) + elseif t == "HorizontalRule" or t == "RawBlock" then + -- no rule in the CDE DTD; raw HTML/TeX is not for the book + else + emit("" .. esc(pandoc.utils.stringify(b)) .. "") + end + end +end + +function Writer(doc, opts) + local title = "The Makronix Guide" + if doc.meta and doc.meta.title then + title = pandoc.utils.stringify(doc.meta.title) + end + out = {} + open = {} + counter = 0 + render_blocks(doc.blocks) + while #open > 0 do + local top = table.remove(open) + emit("") + end + return "\n" .. + "\n" .. esc(title) .. "\n" .. + table.concat(out, "\n") .. "\n\n" +end diff --git a/src/distrib/sets/lists/base/mi b/src/distrib/sets/lists/base/mi index 30564dece2..0c40cf91d0 100644 --- a/src/distrib/sets/lists/base/mi +++ b/src/distrib/sets/lists/base/mi @@ -2299,6 +2299,32 @@ ./usr/share/doc base-sys-share ./usr/share/doc/makronix base-sys-share ./usr/share/doc/makronix/LICENSE base-sys-share +./usr/share/doc/makronix/infolib base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.sch base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23 base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/bookcase.map base-sys-share +./usr/share/doc/makronix/infolib/makronix.dti/makronix.oli base-sys-share +./usr/share/doc/makronix/makronix-guide.html base-sys-share +./usr/share/doc/makronix/makronix-guide.pdf base-sys-share ./usr/share/doc/html base-obsolete obsolete ./usr/share/doc/html/bind9 base-obsolete obsolete ./usr/share/doc/html/bind9/arm base-obsolete obsolete diff --git a/src/distrib/sets/lists/etc/mi b/src/distrib/sets/lists/etc/mi index 6ca4e081e6..6340a399ac 100644 --- a/src/distrib/sets/lists/etc/mi +++ b/src/distrib/sets/lists/etc/mi @@ -57,6 +57,14 @@ ./etc/dhcpcd.conf etc-dhcpcd-etc ./etc/disktab etc-sysutil-etc ./etc/dm.conf etc-games-etc +./etc/dt etc-sys-etc +./etc/dt/config etc-sys-etc +./etc/dt/config/Xsession.d etc-sys-etc +./etc/dt/config/Xsession.d/0000makronix etc-sys-etc +./etc/dt/infolib etc-sys-etc +./etc/dt/infolib/C etc-sys-etc +./etc/dt/infolib/en_US.UTF-8 etc-sys-etc +./etc/dt/infolib/en_US.UTF-8/makronix.dti etc-sys-etc ./etc/dumpdates etc-sysutil-etc ./etc/envsys.conf etc-sysutil-etc ./etc/floppytab etc-sysutil-etc diff --git a/src/distrib/sets/lists/man/mi b/src/distrib/sets/lists/man/mi index bf5f4f6041..d4f14bbb7f 100644 --- a/src/distrib/sets/lists/man/mi +++ b/src/distrib/sets/lists/man/mi @@ -6239,6 +6239,33 @@ ./usr/share/man/man7/life_cycle-rand.7 man-crypto-man .man,openssl=30 ./usr/share/man/man7/lint.7 man-reference-man .man ./usr/share/man/man7/mailaddr.7 man-reference-man .man +./usr/share/man/man7/makronix-guide.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-preface.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-what.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-tour.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-before-install.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-install.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-upgrade.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-mcde.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-x11.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-dtinfo.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-shell.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-rc.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-users.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-disks.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-pkgsrc.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-printing.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-network.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-services.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-sharing.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-firewall.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-mailweb.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-building.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-cross.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-updating.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-help.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-glossary.7 man-reference-man .man +./usr/share/man/man7/makronix-guide-license.7 man-reference-man .man ./usr/share/man/man7/mandoc.7 man-obsolete obsolete ./usr/share/man/man7/mdoc.7 man-groff-man .man,groff ./usr/share/man/man7/migration_guide.7 man-crypto-man .man,openssl=30 diff --git a/src/etc/Makefile b/src/etc/Makefile index 56ae2b4765..7bdad4d7f9 100644 --- a/src/etc/Makefile +++ b/src/etc/Makefile @@ -269,8 +269,17 @@ CONFIGFILES+= minfree FILESDIR_minfree= /var/crash FILESMODE_minfree= 600 +# The Makronix Guide is the default library of the MCDE Information Manager. +CONFIGFILES+= makronix-xsession +FILESDIR_makronix-xsession= /etc/dt/config/Xsession.d +FILESNAME_makronix-xsession= 0000makronix +FILESMODE_makronix-xsession= 755 + CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \ - /usr/sbin/rmt /etc/rmt + /usr/sbin/rmt /etc/rmt \ + /usr/share/doc/makronix/infolib/makronix.dti \ + /etc/dt/infolib/en_US.UTF-8/makronix.dti \ + en_US.UTF-8 /etc/dt/infolib/C # install-etc-files -- diff --git a/src/etc/makronix-xsession b/src/etc/makronix-xsession new file mode 100755 index 0000000000..bb0cbd6f2e --- /dev/null +++ b/src/etc/makronix-xsession @@ -0,0 +1,5 @@ +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# The Makronix Guide is the default library of the Information Manager. +# See docs/guide and makronix-guide(7). +DTINFOLIBDEFAULT=makronix +export DTINFOLIBDEFAULT diff --git a/src/etc/mtree/NetBSD.dist.base b/src/etc/mtree/NetBSD.dist.base index 891b27365d..994d498541 100644 --- a/src/etc/mtree/NetBSD.dist.base +++ b/src/etc/mtree/NetBSD.dist.base @@ -15,6 +15,11 @@ ./dev/fd ./dev/pts mode=0555 ./etc +./etc/dt +./etc/dt/config +./etc/dt/config/Xsession.d +./etc/dt/infolib +./etc/dt/infolib/en_US.UTF-8 ./etc/X11 ./etc/X11/fs ./etc/X11/lbxproxy @@ -416,6 +421,10 @@ ./usr/share/dict/special ./usr/share/doc ./usr/share/doc/makronix +./usr/share/doc/makronix/infolib +./usr/share/doc/makronix/infolib/makronix.dti +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX +./usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch ./usr/share/doc/papers ./usr/share/doc/papers/mckusick84-ffs ./usr/share/doc/papers/mckusick85-fsck diff --git a/src/share/doc/makronix/Makefile b/src/share/doc/makronix/Makefile index 844a320722..c4105d6d7e 100644 --- a/src/share/doc/makronix/Makefile +++ b/src/share/doc/makronix/Makefile @@ -5,8 +5,54 @@ NOOBJ= # defined .include .if ${MKSHARE} != "no" -FILES= LICENSE +FILES= LICENSE \ + makronix-guide.html \ + makronix-guide.pdf \ + infolib/makronix.dti/bookcase.map \ + infolib/makronix.dti/makronix.oli \ + infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd \ + infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi \ + infolib/makronix.dti/MAKRONIX/MAKRONIX.sch \ + infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23 \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx \ + infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp FILESDIR= /usr/share/doc/makronix + +# The information library keeps the directory layout that dtinfo expects; +# the files with the same name in MAKRONIX and MAKRONIX/dtsearch are told +# apart by the full source path in the FILESDIR_* variable name. +FILESDIR_infolib/makronix.dti/bookcase.map= /usr/share/doc/makronix/infolib/makronix.dti +FILESDIR_infolib/makronix.dti/makronix.oli= /usr/share/doc/makronix/infolib/makronix.dti +FILESDIR_infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX +FILESDIR_infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX +FILESDIR_infolib/makronix.dti/MAKRONIX/MAKRONIX.sch= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch +FILESDIR_infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp= /usr/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch .endif .include diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd new file mode 100644 index 0000000000..df66470577 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbd differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi new file mode 100644 index 0000000000..69bb4fe900 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.dbi differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.sch b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.sch new file mode 100644 index 0000000000..bc94006887 --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/MAKRONIX.sch @@ -0,0 +1,271 @@ +#MMDB 2 3 +n3\I_pKR=t:0eo=A +ey=_e= +n gin_=.dX\ + +:.Mt_iv._RphndRd=eeno +n2:y1i.=_xnMiX=z#XKIt_eMadfN419o +sd +XX8mRam\i 8A gdRs +e.e +#yK:nsdinO=XOX +p_dmp=ings=. +d +:.titI:nnn#.0tvntINg.nta=mvc=:=KnmmM\ +mt +n#e4\t0p=#IX A.=8\rrRR=:=AMMA5RNamm=anA=# MnK1ad.o +M_I \x .iNON:=i1O=i bnNambKMn=_ ec.h2e.= +nKh= +tIn +==nnKR n\K.=vNv=.NO:I +odoox.ee.0I.snMKnA_=d +m9= +nIm\n\3t_ _odxd +s8cmNX:Ocet=O=t7Op=a8 fs:fKdx +nr +t..dr=\o=s=in_pA=.3i=n\cmpn=e= +ht +=ne1d:AlX_n=X:.o6A.dd\= a: +0=N=v:oe +X\e.x=abX=\vn8cbRhNoM +nKiKo_:o_\O. + +=sMK=Ndsi=t +dAibt i +O5A. +dmM # +vd. +o=d tRK=ceiN=iddibbb +o_mNi +A2 ==d2N.0_9i xd=dO=_e:e0\X:.ie\= m.=_ =Nees13iet===3n=I=K =pR npg8\l\ +A0\um =__ =i=N\K\=m =Knb\ RoA=m3xfdnm:Kiv.rA =ydoNpiXv=..=\Mlpts +hdld +t=e.oR==:1 +N_O=t.K\sI=0btenf#Rahe: +ROg\Mv.omd _Nas +t\Ot=:IIrrv\\ R +X#KOg +fnrne. +ntA\h= + +rvI: gen= : +o4.e_#s_b +o=bnt tmd A_Rmtn +=dXol.# + e\enxO=mK +\K4\ciiic===Om90Ran_si=#.0Ov:spex\\f#ts:.R_xeKsii=:R d\.oXNos=n.dAea_t. + +m. +n0h.i t=2RbN=A38vMndaN#t=I +dsmM1Kn:edKe yI\:ivAdtIoe1nd= :8=.iMNa=mORinKOsiaMi\:1:K= +O _ r M0giIomXv. +d=noR. +ro +cx1= +:x2=pn=0K + + +nMM_. =IMM2=0on.0=d +XeNfte#i_dK\eKl#i +lt:oo +ft#=N\ln=M\r_t: K:_RI8:d=iddAri +AiRIRdoO +v7 R\I#_= +t + +f8d9tRi.=i2oO +d#RrdIK. =tN +\n.f K1:9==.nv=snKieA2i_xoIb +Ad_O:NodOie..ms _eM8nO=:=tot_8MOK2eN_ +:M +#ohMA4ti_#1x_\O +_ dm\R=nI.N:h=Ma= + Mn=x +3_.\ +__raRn=ocv9eA#:N +. = + + :=gI2vOttXi:se2.ei.ennO _. + e900rs0eAoo.M.e:_\ +s=ne +gRv0evAX: +vA2:vn=1#X1XnK_d.Kce c =x:#O\en6 XKsiv +ebI67glib_exi.=i_ +is:4=\ni_ +s1=_o\eMnN:.vdn2==XMinceaMKA +O1.gd=NA=g#XA==.XMi +fnI=b=_n:2inKR_\=sloht.=nxsAO._oee +:AmRmmvAdAK +.2pXoaR_\OiehemIO msnmcm:I A\p \miev=pXeebon=a0v +=pxi 8am +XRK=ds:d=t iKtXn1aAo=Xome +0nv: +g9_.KoM0 +=ntIeit==_ nve\hei9Rnx +g5K:=cIRmtoedN_=IsxtX##\sNt +3AdcXlm7tRm=d4 +id9Oavc#sXnseA=aiKv\x:aNRd8An Mn +ceoR 8gIOex:Od +=.i_dmn +.:Rbd tMocN +=i1_iMt#ddA_O2:Isbnon2t\i#_n:MoNoe=siR=9 e=iN81=n. e +l\.\\nml1th9a Aotdn=id n +2l +I Rv.otiX: +=R1X +rn.e +pMzn0g: +omAsb===dbvOiinA0 +_ enM +2d:7t +hI:coiIeOe +.9O\m.X#8 mdcOxn +Meil:eKt +_K_dnNRRepKe +o7irx + IX:M0d eKN=#sbtrt=2 :d Xnt c\_ 19is xd2RRme 2RRphiA\MeoA=KthcAN\piXe +eo=_OnOn +Ko3_oR52 nI==otA +=\NAxt +acIXXieeno=ixIvmdiI:1 +sni.t#nOcXpX5io.9 dvIeA_M1i_n.d0i==na 1A:n +cRg +toRNd==dt=smR4nRndg=bMIMrpnim2O\n#d=d1t== +evN.Ovdr vA +\Arnc8I. + +:#=ti6fNs:=MXa:RRs_.maO# +M + +v=5rlo\M1.: svmN_O.#c +Xg +d= +oOe# +mc2i nn.I.0\Xr :esXa##v=.p#ai v:g.\mAnr8 rKsoINd#mt= +oi2iAIo +r0OiX + +Kn nK=o_0etddna +i +cnm2vnbxc=M _\=n2 +dmsoINeinn \K:\tN=iaNo0n:o2dovnKN1agn= +f=1A=.n==taAr enMX#xNp.=mRd:=oO.I\8=om:\= d:on=d_s OI#_n=sse:Amia N0=i3Rsdt:RXs=n IeRdO\1eM._mi\=#K=tMv +K1 +_On +=xM +aI.MMnpse\i1 +A8do=od0 Atv\7 +\Ii._1:7oRXrs0\=XndiK +Mme=AN_o9:mdNni.M=2n noiNd0yodmd.MeR e:n# +\rMmiA\h #\ e3d=b=\=X _An2MAmIN2=N8OA#r +2p=b=#n +pe_pelidXXt_\at.\=n9.e.Oe2: += .iK :m=io_e_:g:e=MMMtnnm\RIt:bmX#Nl\ +Xr9d3t +nerxo=y=ee.\0A_ip\# +tp ed2r=v=n\ +ees0mNMiR0 mOvnvm= 1t=: +id_y_b\ve2 +mv0.eNd +r9_hAna=d: +Rv=o.RpK ehRAIO_m_I + +gN=mX\x:=OpI +n_aoi=\d +cd4I:riis_KO.vX= +a#e\XvetNg +Oame:1u:_0Rnt.=e# s=INt:I\Kd12nI2:neib3nn=Xt A 3c +iM#A:= +tdnNsM\odvd t.m.pgs vicNnvhib.O_0M=On0sih8i +o\fn=r. +AXIb .n1iN Nn:imM1i8d=N +#n =ns +Rd#t=\2=_ +M=i + 01i =n +xt2e8 +=\X\Ag8ps0=iA =n2e#s\s:.:No_ +scn\ X +gIop\ +\ +.= +=xO t +_4e=8e +RdIv8pitX8d0ie:cndv=pK0:sn=AgI Xod +MIKpe fdA=c__e + +=\_c +=e022 +#O.#d=InMp\em8=IM_5.iffox. yt_8_vNo4_ns +KxpXnM +3nm +=xnngi=m=Oi0 N41_gm::\ +dX=N. +nt=v\1iX +\m:MoXd:=rOp IdXnncneR0O.eib=d. 2IeMeho8gtdnggf:na:n.NoneNb4.=#xX dmOKR + +O AmO.=ode=s0MMiA.er=Id_\I==fN_nhgn hiae:nIK_e Kc:rf=Mm2n +int=igndIt_Kgc +K5c\d.lm=7nM + +I +reme=nKRonlnmn +#:d\n8XO.nKtxtt1l.A .rO3i=rdOsNmXtdnA..:AN:o:nh:b=At =Nrao_xXe## +\bAOROcnieavh_ms +8\in_lelidK=iMMsd \dX_Mgs9_ivnesd=g9atNhd _.Non=o_i=0_0fnga=.or +nroO:in\IR0#eAN +iAnIm eO.thica=O0mmAAv\niInn +s: l=eKt.onnK +td#nn2:in\2xvr\eO.n +oN =nidX +.i:nRpctx\. +fM_Xe=in=e +.=vx +=Nx\=Ksdr o\ + R#= 2R2Odvvein=e\ar=9rXO5 IOoKnN\=IeXd iibrA= +Rod +=mdlv_=tK:gehmni X +eoh +bs X#na + +o +I =m8Kvee_s +mi Rm8e 1\m.#8d:vommoenii +t +KmoN n.iIa I :nKim:gh :Rs.Kmc.oI pN0=mMta:orsfr +XRsn=MK.m +ohdd +iOsoNg i=d=nA=\t +NiXR\3a.: \2im_:1nomI=\:e.00 + +i. +n +RKoXKlmhiba OA:Xm=: + +:RAeo.u .or +\p:n +2oxI_.O Mn +mM2:m8nm2.RmKOon: +K=AdvM=n ==NNO_\:_=# +:oir.p\R.nI +5d\vdo:i.enr_n +pRXc=d=o:=dt0vg .\8_sIc0Reig +KId +o1=IXcXn\\AMeesMnedxt_s9ns=i n=\to oc\::=pOXKIO 0:rme==O= +=r=de=ea.Aei +K.2A#1NN +bt2exep +ddcrnon:i_Xogi.dhoNi Indg#=\\ + +#O +=mM ae.=i +t24Ma=ee#sao.X=_nviA:=_nnxX +O=#e_K In78\m R9 +R= +msth=8 i iO: +.KanimKo9g e=ensAOXK:RmeR +Ndun.. NMMi\\_di==itiM\\NI:Ridd=7=n==dm=doXeRIR#n1h.d=N.n=cO +#=i:_= #.s: +rnr +n.\ m=\K +#=KiAXn\_0.e9i_n.cs\oOned \ No newline at end of file diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00 new file mode 100644 index 0000000000..12215eec16 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d00 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01 new file mode 100644 index 0000000000..9df64b3f00 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d01 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21 new file mode 100644 index 0000000000..96c0cc63a4 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d21 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22 new file mode 100644 index 0000000000..ceeea9bfad Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d22 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23 new file mode 100644 index 0000000000..47719ea693 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d23 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99 new file mode 100644 index 0000000000..f95683513a Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.d99 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd new file mode 100644 index 0000000000..8d239a2ef6 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.dbd differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00 new file mode 100644 index 0000000000..e610becbc0 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k00 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01 new file mode 100644 index 0000000000..e0b2f75e0d Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k01 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21 new file mode 100644 index 0000000000..9aa1878cf4 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k21 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22 new file mode 100644 index 0000000000..081ccab546 Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k22 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23 b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23 new file mode 100644 index 0000000000..ad3fc7d1db Binary files /dev/null and b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.k23 differ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx new file mode 100644 index 0000000000..53bec2635e --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.sfx @@ -0,0 +1,161 @@ +# +# COMPONENT_NAME: austext +# +# FUNCTIONS: none +# +# ORIGINS: 27 +# +# (C) COPYRIGHT International Business Machines Corp. 1993,1996 +# All Rights Reserved +# Licensed Materials - Property of IBM +# US Government Users Restricted Rights - Use, duplication or +# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. +# +#***************** ENG.SFX ******************* +# $XConsortium: eng.sfx /main/3 1996/10/29 20:12:24 cde-ibm $ +# Paice Stemmer Suffix Removal Rules, Ascii English +# July 1993. +# File Format: +# One rule per line. +# Empty lines and lines beginning with punctuation are comments. +# Lines must be sorted lexicographically by FIRST CHAR only ('A' - 'Z'). +# Within a char section, rules sorted sequentially as applied. +# Token #1: Required, UPPERCASE suffix string, reading backwards. +# Token #2: Optional, single asterisk (*). Rule is applied only +# if original word "is intact", ie this is first rule applied. +# Token #3: Required, 'remove' count. How much of suffix to remove. +# Zero is permissable and terminates stemming. +# Token #4: Optional, append string, reading correctly. Applied +# after suffix is removed. +# Token #5: Required, continuation symbol '>' or '$'. +# If '$', stemming terminates, else continues. +# +# $Log$ +# Revision 2.3 1996/02/01 19:02:05 miker +# Restored some rules inadvertently deleted. +# +# Revision 2.2 1996/02/01 18:50:18 miker +# AusText 2.1.11, DtSearch 0.3: Changed .sfx format so certain +# values are not hardcoded in lang.c. +# + +AI * 2 $ +A * 1 $ +BB 1 $ +CITY 3 S $ +CI 2 > +CN 1 T > +DD 1 $ +DEI 3 Y > +DEEC 2 SS $ +DEE 1 $ +DE 2 > +DOOH 4 > +E 1 > +FEIL 1 V $ +FI 2 > +GNI 3 > +GAI 3 Y $ +GANAM 0 $ +GA 2 > +GG 1 $ +HT * 2 $ +HSIUG 5 CT $ +HSI 3 > +I * 1 $ +I 1 Y > +JI 1 D $ +JUF 1 S $ +JU 1 D $ +JO 1 D $ +JEH 1 R $ +JREV 1 T $ +JSIM 2 T $ +JN 1 D $ +J 1 S $ +LBAIFI 6 $ +LBAI 4 Y $ +LBA 3 > +LBI 3 $ +LIB 2 L > +LC 1 $ +LUFI 4 Y $ +LUF 3 > +LU 2 $ +LAI 3 > +LAU 3 > +LA 2 > +LL 1 $ +MUI 3 $ +MU * 2 $ +MSI 3 > +MM 1 $ +NOIS 4 J > +NOIX 4 CT $ +NOI 3 > +NAI 3 > +NA 2 > +NEE 0 $ +NE 2 > +NN 1 $ +PIHS 4 > +PP 1 $ +RE 2 > +RAE 0 $ +RA 2 $ +RO 2 > +RU 2 > +RR 1 $ +RT 1 > +REI 3 Y > +SEI 3 Y > +SIS 2 $ +SI 2 > +SSEN 4 > +SS 0 $ +SUO 3 > +SU * 2 $ +S * 1 > +S 0 $ +TACILP 4 Y $ +TA 2 > +TNEM 4 > +TNE 3 > +TNA 3 > +TPIR 2 B $ +TPRO 2 B $ +TCUD 1 $ +TPMUS 2 $ +TPEC 2 IV $ +TULO * 2 OLV $ +TSIS 0 $ +TSI 3 > +TT 1 $ +UQI 3 $ +UGO 1 $ +VIS 3 J > +VIE 0 $ +VI 2 > +YLB 1 > +YLI 3 Y > +YLP 0 $ +YL 2 > +YGO 1 $ +YHP 1 $ +YMO 1 $ +YPO 1 $ +YTISOR 6 $ +YTISO 5 > +YTI 3 > +YTE 3 > +YTL 2 $ +YRTSI 5 $ +YRA 3 > +YRO 3 > +YFI 3 $ +YCN 2 T > +YCA 3 > +Y * 1 $ +Y 1 $ +ZI 2 > +ZY 1 S $ diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp new file mode 100644 index 0000000000..7c5186150b --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/MAKRONIX.stp @@ -0,0 +1,267 @@ +# ENG.STP +# +# COMPONENT_NAME: austext +# +# FUNCTIONS: none +# +# ORIGINS: 27 +# +# (C) COPYRIGHT International Business Machines Corp. 1993,1996 +# All Rights Reserved +# Licensed Materials - Property of IBM +# US Government Users Restricted Rights - Use, duplication or +# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. +# +# $XConsortium: eng.stp /main/2 1996/07/18 15:29:49 drk $ +THE * 30083 +AND * 12772 +FOR * 6533 +THAT * 5749 +YOU * 4392 +WITH * 4222 +ARE * 3330 +THIS * 3084 +HAVE * 2975 +CAN * 2722 +FROM * 2245 +NOT * 2203 +BUT * 2124 +WILL * 1969 +HAS * 1567 +WHICH * 1477 +ONE * 1475 +USE * 1354 +ALL * 1350 +WAS * 1338 +THEY * 1300 +YOUR * 1288 +MORE * 1231 +THERE * 1228 +ANY * 1176 +ALSO * 1165 +SOME * 1088 +OTHER * 1085 +WHEN * 1084 +WOULD * 1044 +THAN * 1015 +WHAT * 998 +NEW * 997 +ITS * 944 +ONLY * 931 +ABOUT * 871 +THESE * 842 +MAY * 805 +THEIR * 798 +GET * 781 +USED * 747 +INTO * 746 +THEN * 731 +DOES * 728 +SUCH * 707 +OUT * 698 +MOST * 688 +JUST * 668 +TWO * 656 +THEM * 655 +HOW * 636 +EACH * 634 +NEED * 633 +SHOULD * 610 +SAME * 602 +BEEN * 600 +INC * 587 +HAD * 553 +MANY * 550 +COULD * 533 +NOW * 524 +WAY * 516 +BECAUSE * 506 +BOTH * 490 +SEE * 473 +ANYONE * 468 +WERE * 467 +EVEN * 466 +WANT * 465 +SAID * 446 +VERY * 440 +WHILE * 422 +WELL * 416 +MUCH * 404 +HOWEVER * 398 +STILL * 382 +UNDER * 381 +BETWEEN * 379 +OUR * 372 +ANOTHER * 359 +MUST * 357 +WHERE * 348 +SINCE * 344 +OVER * 331 +THROUGH * 318 +AFTER * 317 +SEVERAL * 315 +THINK * 313 +MIGHT * 305 +WITHOUT * 298 +BEING * 295 +THOSE * 295 +BETTER * 290 +TRY * 280 +USES * 277 +HERE * 276 +TAKE * 272 +LAST * 263 +OFF * 258 +EITHER * 252 +LET * 252 +BEFORE * 250 +END * 250 +DID * 237 +TOO * 236 +ETC * 231 +SOMETHING * 230 +LESS * 227 +FEW * 226 +NEXT * 220 +AROUND * 210 +SURE * 208 +BEST * 207 +YEARS * 207 +PUT * 205 +ALREADY * 202 +REALLY * 202 +YEAR * 199 +WHY * 193 +OWN * 190 +OLD * 189 +ONCE * 189 +SOMEONE * 188 +EVERY * 187 +RATHER * 186 +COME * 183 +LEAST * 179 +NEEDS * 178 +THOUGH * 178 +YET * 174 +COMES * 170 +SAY * 170 +HAVING * 168 +OFTEN * 168 +GIVE * 167 +WITHIN * 165 +WHETHER * 164 +ALTHOUGH * 156 +DONE * 154 +INSTEAD * 153 +ABOVE * 152 +ANYTHING * 148 +ENOUGH * 146 +AGAIN * 145 +HIS * 145 +GIVEN * 141 +SAYS * 139 +THINGS * 138 +THING * 133 +TODAY * 132 +ALWAYS * 131 +NEEDED * 131 +UNTIL * 130 +CANNOT * 126 +NEVER * 123 +OTHERS * 120 +ELSE * 119 +ACROSS * 118 +LETS * 114 +AMONG * 113 +VIA * 113 +SEEM * 111 +DURING * 110 +DOING * 106 +EVERYTHING * 104 +BECOME * 101 +WEEK * 101 +TOGETHER * 100 +WAYS * 99 +ALONG * 97 +ITSELF * 97 +THOUGHT * 93 +PERHAPS * 91 +GETS * 85 +SOMETIMES * 85 +ALMOST * 84 +EXCEPT * 81 +DAYS * 80 +EARLY * 80 +MONTH * 77 +MONTHS * 77 +FURTHER * 75 +GIVES * 75 +ONTO * 74 +EVER * 73 +DAY * 72 +THEREFORE * 72 +AWAY * 70 +BELOW * 68 +UNLESS * 63 +THUS * 62 +BECOMES * 61 +TOOK * 61 +UPON * 57 +NOTHING * 56 +AGAINST * 54 +BEYOND * 54 +OLDER * 54 +WHOLE * 54 +WANTED * 52 +WHATEVER * 51 +SHE * 50 +TOWARD * 50 +HIM * 49 +WHENEVER * 47 +NEWER * 46 +NONE * 46 +NOR * 44 +WANTS * 44 +WENT * 44 +EVERYONE * 43 +THEMSELVES * 43 +NEITHER * 41 +TAKEN * 41 +OTHERWISE * 40 +WEEKS * 38 +WHOSE * 38 +MOSTLY * 37 +BEGAN * 35 +BEHIND * 31 +THROUGHOUT * 29 +ALONE * 28 +INDEED * 27 +ANYWHERE * 26 +BESIDES * 26 +HER * 26 +ENDS * 25 +BECAME * 24 +HENCE * 24 +BECOMING * 21 +WHEREAS * 20 +FORMER * 19 +YOURSELF * 18 +THRU * 17 +ELSEWHERE * 16 +NOBODY * 16 +SEES * 13 +THEREBY * 10 +MOREOVER * 7 +SHALL * 7 +TOWARDS * 6 +FORMERLY * 5 +NAMELY * 5 +YOURS * 5 +SOMETIME * 4 +THEREAFTER * 4 +WHOM * 4 +EVENLY * 3 +NEEDING * 3 +WHEREVER * 3 +BESIDE * 2 +YOUNGER * 2 diff --git a/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf new file mode 100644 index 0000000000..0beb7b6053 --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/MAKRONIX/dtsearch/dtsearch.ocf @@ -0,0 +1 @@ +keytypes MAKRONIX = Default Head Graphics Example Index Table diff --git a/src/share/doc/makronix/infolib/makronix.dti/bookcase.map b/src/share/doc/makronix/infolib/makronix.dti/bookcase.map new file mode 100644 index 0000000000..42f7e2ad26 --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/bookcase.map @@ -0,0 +1,2 @@ +The Makronix Guide 6AoRelQMzI01y70 +MAKRONIX The Makronix Guide 5AoRelQMzI01y70 en_US.UTF-8 2 3 diff --git a/src/share/doc/makronix/infolib/makronix.dti/makronix.oli b/src/share/doc/makronix/infolib/makronix.dti/makronix.oli new file mode 100644 index 0000000000..64b6dbbd08 --- /dev/null +++ b/src/share/doc/makronix/infolib/makronix.dti/makronix.oli @@ -0,0 +1 @@ +$XConsortium: dtinfogen_worker.c /main/24 1996/11/26 12:35:07 cde-hal $ diff --git a/src/share/doc/makronix/makronix-guide.html b/src/share/doc/makronix/makronix-guide.html new file mode 100644 index 0000000000..e4eaf5d337 --- /dev/null +++ b/src/share/doc/makronix/makronix-guide.html @@ -0,0 +1,2712 @@ + + + + + + + +The Makronix Guide + + + + +
+ +
+

The Makronix Guide

+

A guide to the Makronix operating system and the +MCDE desktop

+

Makronix 0.99.10 (Camouflage) -- November 2026

+ +

BASED ON NETBSD

+
+ +
+

Contents

+ +
+ +
+

Preface

+

This is the guide to Makronix, a desktop operating system built on +NetBSD. It is written for the person who installs the system, uses the +MCDE desktop and administers the machine afterwards. It is not a +replacement for the manual pages; it tells you which page to read and in +which order.

+

The guide follows the shape of The NetBSD Guide: a tour, +installation, the desktop, administration, networking and building, with +the same assumption that a system is something you understand rather +than something you click through. It is not a copy. Makronix decides +what NetBSD leaves open — the installer, the desktop, the packages on +the medium, the way a release is made — and where NetBSD's guide has a +chapter for a subsystem Makronix does not change, this guide names the +manual pages and the NetBSD text instead of repeating them.

+

How to read it

+

Read What Makronix Is first, then Installing Makronix if the system is new. The +chapters about the desktop (MCDE: The Desktop and The Information Manager) are for everybody; the +administration chapters are reference material. The last part is for the +person who builds Makronix from its own sources.

+

Commands are shown as they are typed. A # at the +beginning means the command runs as root; a $ means it runs +as your own account. File names are in this style, commands +in this style, and values you replace in <this +style>.

+

The guide in four forms

+

The same text is installed four ways, so that it is readable where +you are:

+
    +
  • as manual pages, starting at makronix-guide(7);

  • +
  • as a PDF, +/usr/share/doc/makronix/makronix-guide.pdf;

  • +
  • as one HTML file, +/usr/share/doc/makronix/makronix-guide.html;

  • +
  • as a book in the MCDE Information Manager (dtinfo(1)).

  • +
+

Conventions

+

Makronix is based on NetBSD, and much of what this guide describes is +NetBSD's mechanism, unchanged. When a chapter says “NetBSD”, it means +the mechanism Makronix inherited; when it says “Makronix”, it means the +part Makronix decides itself. Where a procedure differs between the two, +the chapter gives the Makronix way first.

+

What Makronix Is

+

Makronix is a complete operating system for the desktop: a kernel, a +userland, a graphical login, a desktop and the programs that make a +machine usable, installed together and updated together. It is built on +NetBSD, uses NetBSD's conventions and keeps NetBSD's manual pages, so a +person who knows NetBSD will find the system familiar. What Makronix +decides is everything NetBSD leaves open.

+

NetBSD underneath

+

The kernel, the C library, the userland and the build system are +NetBSD's. Makronix tracks NetBSD's source tree directly; there is no +patch layer between the two. The boot loader, /etc/rc.conf, +the package tools and the section 8 manual pages are the ones NetBSD +documents.

+

The kernel still calls itself “NetBSD” in uname(1), on purpose: pkgsrc, +config.guess and a great deal of third-party software +decide from that name which system they are on. The product name +“Makronix 0.99.10” is what the installer, the login screen, the message +of the day and the release notes call the system.

+

What Makronix decides

+

Four decisions turn NetBSD into Makronix:

+
    +
  • The installer. Makronix's sysinst(8) has two ways. The simple way asks +for the disk and whether it is encrypted, then installs everything, then +asks the questions a new computer needs — its name, the network, the +time zone, the administrator's password and the first account — before +the first reboot. The full way is the NetBSD installation, +unchanged.

  • +
  • The desktop. MCDE, the Makronix Common Desktop +Environment, is a fork of CDE. It starts at dtlogin(1), uses Motif, and is designed to +be quick on a machine from the 1990s. It is described in MCDE: The Desktop.

  • +
  • The packages on the medium. The programs that Makronix +ships are on the installation medium, in the “makronix” set and in the +repository next to it. A machine is usable without a network +connection.

  • +
  • The source set. The medium also carries the sources — +NetBSD's source sets and the Makronix source set — so that the system +can rebuild itself offline. The procedure is in Building Makronix.

  • +
+

The release and its name

+

This guide describes Makronix 0.99.10, whose release name is +“Camouflage”. Release names are CDE palette names, and a release looks +like its palette: the logo, the icon set, the installer colours and the +desktop colours come from it. The palette is installed as +/usr/pkg/dt/share/palettes/Camouflage.dp.

+

0.99.10 is a snapshot, not a long-term release. Install it on a +machine whose data you have elsewhere, and read the release notes on the +installation medium before you start.

+

Platforms

+

amd64 is the first target and the one the build tests on every +change, in QEMU with BIOS and UEFI and on a 2011 MacBook Pro. PowerPC +Macs (G3, G4 and G5) and 64-bit ARM machines (Raspberry Pi 4, ODROID-N2, +ODROID-M1) are the next targets; a platform counts as supported only +when an installation from its medium reaches a login prompt. The +measured state of each platform is in +/usr/src/docs/PLATFORMS.md in the source set.

+

Licence

+

Makronix's own text and tools are under the CNCL 1.0 (Could Not Care +Less), a licence that asks only that you do not blame the authors. +NetBSD's source keeps its BSD licence, MCDE keeps the CDE licence (LGPL +2.0 or later), and pkgsrc packages keep their own licences. Appendix C +lists the details.

+

A Tour of the System

+

Before you change anything, know where things are. Makronix uses +NetBSD's layout; the Makronix parts sit in the places CDE and pkgsrc +already use.

+

The file system

+
+
/
+
+

The root file system: the kernel (/netbsd), the boot +loader and the base userland.

+
+
/etc
+
+

The configuration of this machine: rc.conf, +fstab, master.passwd, the network +configuration and the rc.d scripts. Files here belong to +the administrator, not to a package.

+
+
/usr
+
+

The base system's programs, libraries, headers, manual pages and +shared files. /usr/src, /usr/xsrc and +/usr/msrc hold the sources when the source set is +installed.

+
+
/usr/pkg
+
+

Everything pkgsrc installs. The programs are in +/usr/pkg/bin and /usr/pkg/sbin; the MCDE +desktop is in /usr/pkg/dt. The package database is +/usr/pkg/pkgdb.

+
+
/home
+
+

One directory per user. A new account gets +/home/<name> and the files from +/etc/skel.

+
+
/var
+
+

Data that changes: logs in /var/log, mail spools, +databases, the package cache and the print spool.

+
+
+

Where MCDE lives

+

MCDE is installed as a package under /usr/pkg/dt. The +programs are in /usr/pkg/dt/bin; the shared data, the +palettes and the colors are in /usr/pkg/dt/share; the +session configuration is in /usr/pkg/dt/config. A user's +own desktop settings live in ~/.dt.

+

The system-wide CDE configuration directory is /etc/dt. +It is the place for settings that apply to every user, and it is where +the Makronix Guide's information library is installed (see The Information Manager).

+

The files you will edit

+
    +
  • /etc/rc.conf — which services start at boot. The +variables are documented in rc.conf(5).

  • +
  • /etc/fstab — which file systems are mounted +where.

  • +
  • /etc/hosts, /etc/resolv.conf and +/etc/mygate — the network, as in NetBSD.

  • +
  • /etc/npf.conf — the firewall. Makronix installs a +rule set that lets in SSH and the replies to outgoing traffic.

  • +
  • /etc/makronix/update — the first line names the +source of software updates.

  • +
  • /etc/dt/config/Xsession.d/ — scripts that every MCDE +session runs.

  • +
+

What runs

+

After boot, init(8) starts the +services named in /etc/rc.conf. On a Makronix desktop the +important ones are:

+
    +
  • dtlogin(1) — the graphical +login screen. It starts the X server and the user's session.

  • +
  • dtwm(1) — the window manager: +window frames, the front panel and the workspaces.

  • +
  • dtsession(1) — the session +manager behind the desktop.

  • +
  • dhcpcd(8) — the DHCP client, +when the network is configured by DHCP.

  • +
  • ntpd(8) — the time +synchronisation the installer enables.

  • +
+

ps(1) shows them; top(1) shows what they use. A process that +fails at boot leaves its reason in /var/log/messages and, +for a service, in the console output of rc.d.

+

Documentation on the machine

+

The manual pages are installed in the usual sections. Start with +afterboot(8), then read the page for +the program you are using. The Makronix Guide itself is makronix-guide(7); each chapter has its own +page, and the guide is also installed as a PDF and as HTML under +/usr/share/doc/makronix.

+

When a page does not answer the question, the source is the last +word. The source set puts NetBSD's source in /usr/src and +Makronix's own tools and documentation in /usr/msrc.

+

Before You Install

+

An installation replaces what is on the disk you choose. Read this +chapter with the machine in front of you, and do not start until the +data you need is somewhere else.

+

The machine

+

amd64 is the platform this release is tested on. The USB image is 10 +GiB; give the system at least 12 GiB, and considerably more if you want +the source set on the same disk. A machine with 2 GiB of memory runs the +installer and the desktop; 4 GiB or more make the desktop +comfortable.

+

The USB image starts on UEFI machines and, through the protective +MBR, on BIOS-only machines. A Mac needs its firmware boot menu: hold +Option while the machine starts and choose the stick. The +DVD and the CDs start through the normal firmware boot order.

+

The media

+

A Makronix release is more than one image:

+
    +
  • the USB image or the DVD, which carry the +system and the “makronix” set;

  • +
  • CD 1, which carries the system and starts the +installer;

  • +
  • CD 2, which carries the “makronix” set (the desktop and +its programs);

  • +
  • CD 3, which carries the binary packages (Firefox, +Thunderbird, QEMU, the games).

  • +
+

The installer asks for the next CD when it needs one. A DVD or a USB +stick carries everything and asks for nothing. The source set is on the +DVD and on the USB image when it was built with +make sourcesets; the installed system can also fetch it +later.

+

Writing a USB stick

+

Write the image to the whole device, not to a partition. On NetBSD, +find the device with dmesg(8) after +inserting the stick; it is usually /dev/rsd0d.

+
# dd if=Makronix-0.99.10-amd64-install.img of=/dev/rsd0d bs=1m conv=sync
+

On Linux the same operation is:

+
# dd if=Makronix-0.99.10-amd64-install.img of=/dev/sdX bs=4M conv=fsync status=progress
+

Replace /dev/sdX with the stick, and check the device +name twice: dd does not ask. Afterwards, compare the +checksum of the image with the one published next to it. A stick that +reads back differently at every attempt is defective; the installer will +fail in ways that look like software bugs.

+

The answers the installer needs

+

The simple installation asks for the following. Write them down +before you start; the installer does not go back once it has begun.

+
+
The disk
+
+

The whole disk that will hold Makronix. Every partition on it is +destroyed.

+
+
Encryption
+
+

Whether the disk is encrypted with cgd(4), and the passphrase. The passphrase +is asked for at every boot and cannot be recovered. A long sentence you +can type is better than a short password.

+
+
The computer's name
+
+

A short host name, without spaces or dots. The local network name +becomes <name>.local.

+
+
The network
+
+

Ethernet with DHCP, or a Wi-Fi network and its passphrase. The +installer configures the interface and enables dhcpcd(8).

+
+
The time zone
+
+

The zone of the place the machine is in, for example +Europe/Berlin.

+
+
The administrator's password
+
+

The password of root. It is used with su.

+
+
Your account
+
+

A user name, a full name and a password. The account is put in the +groups that a desktop user needs: wheel (for su), operator, +staff, users, dialer (serial ports), games and wsrc (the source +tree).

+
+
+

Back up, then begin

+

Copy the files you need to another machine or an external disk. An +installation does not offer to preserve a partition that it is about to +overwrite. If the machine has another operating system, decide before +the installation whether it is to survive; the full installation way can +keep it, the simple way uses the whole disk.

+

Installing Makronix

+

The installer is sysinst(8), +Makronix's fork of NetBSD's installer. It has two ways: the simple way, +which decides as much as it can, and the full way, which is NetBSD's +installation with every question. Both install the same system.

+

Starting the installer

+

Start the machine from the medium. On a machine with UEFI, choose the +stick or the DVD in the firmware's boot menu; on a Mac, hold +Option while it starts. On a BIOS machine, set the boot +order or press the firmware's boot-menu key. The installer starts from +the medium and runs in memory, so the medium can be removed once the +installation has begun.

+

The first questions are the language and the keyboard layout. They +apply to the installer only; the installed system gets its keyboard +layout from the desktop settings.

+

The simple way

+
    +
  1. Choose the installation type. The simple way is the +first choice. The full way is “Install NetBSD” and is described in The full way.

  2. +
  3. Choose the disk. The installer lists the disks it found. +Choosing one erases every partition on it. If the machine has more than +one disk, unplug the one you want to keep before you start; that is +safer than reading the list twice.

  4. +
  5. Decide about encryption. If you say yes, the installer +encrypts the root file system with cgd(4) and asks for the passphrase twice. +The passphrase is asked for at every boot. If you say no, the disk is +installed in clear text.

  6. +
  7. The installer partitions the disk and unpacks the sets. +It installs the base system, the “makronix” set (the desktop and its +programs) and, when the medium carries them, the source sets. It asks +whether to install the games; the default is yes.

  8. +
  9. Answer the configuration forms. The installer asks for +the computer's name, the network (Ethernet with DHCP, or Wi-Fi and its +passphrase), the time zone, the administrator's password and your +account. These are the answers from The +answers the installer needs.

  10. +
  11. Reboot. Remove the medium. The machine starts into dtlogin(1), the MCDE login screen.

  12. +
+

The installer sets up more than the account: SSH is enabled, time +synchronisation is enabled, a firewall (npf) lets in SSH and the replies +to outgoing traffic, and the machine answers to +<name>.local on the local network.

+

Note: the simple way uses the whole disk. It does not +preserve another operating system. If the machine must keep one, use the +full way and partition by hand.

+

The full way

+

The full way is the NetBSD installation. It asks for the partition +table (MBR or GPT), the NetBSD disklabel, the sets, the network and the +time zone, and it writes the boot blocks. The procedure is the one in +The NetBSD Guide, chapter “Example installation”; the questions and +their meanings are NetBSD's, and the installer's manual page is sysinst(8).

+

Two Makronix details matter in the full way:

+
    +
  • Choose the “makronix” set as well as the base sets. Without it +there is no desktop, no dtlogin and no MCDE +programs.

  • +
  • The “Next CD” menu asks for the next medium when a set is not on +the current one. A DVD or a USB image does not need it.

  • +
+

An encrypted system

+

With encryption, the disk holds one cgd partition with +the root file system, and a small unencrypted partition that the boot +loader can read: the kernel, cgdroot.kmod and +cgd.conf. The loader asks for the passphrase, unlocks the +disk and starts the kernel from the encrypted root.

+

The unencrypted partition is mounted as /cgdboot (with +“noauto” in /etc/fstab). A kernel update on an encrypted +system is not complete until the new kernel and the matching +cgdroot.kmod are copied to it; An encrypted system gives the +commands.

+

The first boot

+

The login screen is MCDE's dtlogin. Log in with the +account you created; the desktop starts with the front panel, the bar at +the top and the workspace controls. MCDE: The +Desktop explains what you are looking at.

+

Open a terminal and check the machine:

+
$ ifconfig -a
+$ netstat -rn
+$ date
+$ ps -ax | grep -E 'dhcpcd|ntpd|dtlogin'
+

If the network is not up, dhcpcd can be started by hand; +if the clock is wrong, ntpd needs a reachable server. Both +are services in /etc/rc.conf; see Services +and rc.d.

+

Change the administrator's password and your own with passwd(1). The account is in the wheel +group, so su works; use it for administrative commands, as +the rest of this guide does.

+

When the installation does not start

+
    +
  • The firmware does not offer the stick. Write the image +again to a different stick and compare its checksum. On a UEFI machine, +disable “Secure Boot” for the installation; on a Mac, the stick must be +formatted by the image, not copied as a file.

  • +
  • The machine starts, then stops with a mount or unpacking +error. The medium is bad or the disk is failing. Check the medium's +checksum and try another disk.

  • +
  • The installed machine does not start. Start from the +medium again and choose the shell, then inspect the disk with +disklabel and mount the root partition by hand. The boot +messages are on the console; dmesg repeats them.

  • +
+

Upgrading Makronix

+

An upgrade replaces the base system and keeps your accounts, your +files and the packages you installed. There are two ways to do it: from +a new installation medium, or from a running system with sysupgrade(8). Both end with the same steps: +the sets are unpacked, the configuration is merged, and the machine is +rebooted.

+

From the medium

+

Start the new medium and choose “Upgrade NetBSD on a hard disk” in +sysinst. The installer asks for the disk and the root +partition, unpacks the new sets over the old system and leaves +/etc and /home alone. The “makronix” set is +part of the upgrade; choose it when the installer offers the sets.

+

After the reboot, run the two NetBSD tools that bring the +configuration up to date:

+
# postinstall -s /usr/src/etc fix
+# etcupdate -s /usr/src/etc
+

postinstall(8) repairs the files +that NetBSD knows how to merge (the mail configuration, the device +files, the fonts); etcupdate(8) merges +the rest and leaves its conflicts for you to resolve. Read +/etc/rc.conf afterwards: a new release can add a service or +rename a variable, and the old file is kept as +/etc/rc.conf.old when it is replaced.

+

With sysupgrade

+

sysupgrade does the same work from the running system. +It fetches the sets from a directory, a file:// address or +an https:// address, unpacks them and updates the kernel. +The address is the first line of /etc/makronix/update:

+
# cat /etc/makronix/update
+https://example.invalid/makronix/0.99.10/amd64
+# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64
+

After sysupgrade, run postinstall and +etcupdate as above and reboot. The MCDE System Settings has +the same operation as a dialog: it reads the source from +/etc/makronix/update, runs sysupgrade for the +base system and then pkg_add -uu for the packages.

+

Trust: an https:// source is protected by TLS; +a file:// source is as trusted as the medium it is on. This +release does not verify a signature on the sets. Use a source you +control, and keep a copy of the previous release until the new one has +started.

+

The packages

+

Packages from pkgsrc are updated with the package tools, not with the +base system:

+
# pkg_add -uu
+# pkg_admin rebuild
+

The packages of the “makronix” set are not in the package database: +the installer unpacks them as part of the set. They change with a +Makronix release, which is one reason to upgrade the whole system rather +than a single file.

+

An encrypted system

+

On an encrypted system the kernel the machine boots is the copy on +the small unencrypted partition, not /netbsd in the +encrypted root. After an upgrade, copy the new kernel and the matching +cgdroot.kmod to that partition:

+
# mount /cgdboot
+# cp /netbsd /cgdboot/netbsd
+# cp /path/from/the/release/cgdroot.kmod /cgdboot/
+# umount /cgdboot
+

The release notes name the exact path of cgdroot.kmod; +it is part of the kernel set of the new release. Keep the old kernel as +/cgdboot/netbsd.old so that the loader can start it if the +new one fails.

+

If the upgrade fails

+

A failed upgrade is not a lost machine. Start the old medium, mount +the root partition and read /var/log/messages; the +installer has left the old configuration in +/etc/rc.conf.old and the old kernel in +/netbsd.old. The loader's menu can start +netbsd.old when the new kernel does not boot. With the +source set installed, the system can be rebuilt in place (Building Makronix).

+

MCDE: The Desktop

+

MCDE is the Makronix Common Desktop Environment, a fork of CDE 2.5.3. +CDE is the desktop that Sun, HP, IBM, DEC, SCO, Fujitsu and Hitachi +shipped on their workstations, and it has been open source since 2012. +MCDE keeps what made it good — Motif, a quick and steady desktop that +does not need a fast machine — and makes it one desktop that works as a +whole.

+

MCDE is written in C99 against Motif, Xlib and X11. It uses no other +toolkit and no compositor, and it builds and runs on NetBSD and on Linux +through pkgsrc on both. Everything that differs between the operating +systems — users, network, sound — is behind one layer, so that no +program has to know which system it runs on.

+

Logging in

+

The graphical login is dtlogin(1). +It shows the users of the machine and a field for the password; the +Options menu chooses the session type and the language. After login, +dtsession(1) starts the session: the +window manager, the front panel, the bar at the top and the programs +that are set to open at login.

+

Lock Screen in the Makronix menu locks the session without ending it; +Log Out ends it and returns to dtlogin. A session can be +saved on logout and restored at the next login; the setting is in System +Settings, under Login.

+

The bar at the top

+

One bar runs along the top of the screen. On the left is the Makronix +menu: about this computer, software update, system settings, your +favourites and recent items, force quit, sleep, restart, shut down, lock +the screen and log out. Next to it are the menus of the program you are +working with. They leave the program's window and stand in the bar, for +every MCDE program, without a change to the program itself.

+

On the right are the status items: the volume (a slider in the menu, +a mute switch, and the wheel over the speaker), Bluetooth, the network, +the battery on a machine that has one, and the clock.

+

The front panel

+

CDE's front panel stays as it is: the controls in the middle, the +drawers above them, the workspace switches, and the trash. Left of the +trash the panel shows the programs that are open and have no place in +the panel yet; a click brings the window forward. The right button keeps +one in the panel, or you can drag it to the left; from then on it is +there at every login. A click starts it, or brings it forward when it is +already running.

+

The workspaces are in the middle of the panel. A window can be sent +to another workspace from its window menu; the panel's workspace buttons +switch between them. The number of workspaces is set in the window +manager's settings.

+

Windows and the window manager

+

dtwm(1) draws the frames. The title +bar has the window menu on the left and the minimize and maximize +buttons on the right; the window menu moves, resizes, raises, lowers, +sends the window to a workspace, or closes it. A double click on the +title bar maximizes the window.

+

The window manager's configuration is ~/.dt/dtwmrc; +without it, the system file /usr/pkg/dt/config/C/sys.dtwmrc +applies. The menu that appears on the root window (the desktop) is +defined there. Most people never edit it: the settings that matter are +in System Settings.

+

The file manager

+

dtfile(1) is the file manager. A +toolbar has Back and Forward — every window keeps its own history — and +the views. A sidebar holds the places: the computer, your home, the +desktop, documents and downloads, and the free space of the disk is in +the status line.

+

The column view shows one column for each folder down to the one you +are in, and on the right what you selected: its icon, kind, size and +date. Files are copied and moved by dragging them; the trash is on the +front panel. The file manager also shows network places when the sharing +services are configured (Remote Access and File +Sharing).

+

The terminal

+

dtterm(1) is the terminal. It has +tabs: Ctrl+Shift+T opens one, Ctrl+Shift+W +closes it, and Ctrl+Shift+Left and +Ctrl+Shift+Right move between them. A program's title +appears on its tab, and the window title is the title of the tab in +front. A profile gives a tab its font, its colours and its command +(Window, New Tab with Profile). Ctrl+Shift+D splits a tab +and puts another terminal below it. Started as +dtterm -dropdown, the terminal waits out of sight and comes +down from the top of the screen at F12; the next press puts +it back.

+

The terminal draws anti-aliased UTF-8 text in the Hack font, and +falls back to another font for characters Hack does not have. The shell +inside it is the login shell of your account; on a fresh account it is +sh(1).

+

The other programs

+
+
dtpad(1)
+
+

The text editor. It edits plain text, has a search and replace, and +opens several files in one window.

+
+
dtcalc(1)
+
+

The calculator: a normal calculator, a scientific one and a +programmer's one, in one window.

+
+
dtpaint
+
+

The paint program: lines, curves, shapes, fill, text and zoom, in the +colours of the release. It is for pictures drawn by hand; a raster +editor for photographs is being made.

+
+
dtlaunch
+
+

The launcher, opened with Alt+Space. Type a few letters +to find a program; type a keyword to find a text snippet; leave the +field empty to see what you copied last; type =12*(3+4) and +it shows 84. Return starts the program or puts the text on the +clipboard. Snippets live in ~/.dt/snippets.

+
+
dtinfo(1)
+
+

The Information Manager: books and help pages, including this guide. +The Information Manager is its chapter.

+
+
+

System Settings

+

dtsystemsettings is one window for every setting of the +computer. It has four rows of icons — personal, hardware, internet and +network, system — and a click opens a setting in the same window; Show +All goes back.

+

It draws the colours (every palette with its colours), the font of +every window, the backdrop (a picture, or a folder of pictures that +change by themselves) and the screen saver, the keyboard and the mouse, +sound, the network and the Wi-Fi networks in reach, Bluetooth, the date, +time and time zone, the accounts of the people who use the computer, the +software update and the facts about the computer. It also decides what +happens at login: the session and the programs that open by +themselves.

+

Changing an account, the network or the software update asks for the +administrator's password. The settings that belong to one user are +stored in ~/.dt; the ones that belong to the machine are in +/etc/dt and /usr/pkg/dt/config.

+

Colours, fonts and the palette

+

A Makronix release is named after a CDE palette, and the desktop +starts in that palette. For 0.99.10 it is “Camouflage”: the background +is a grey-green, the panels are olive and grey-green, and the title bars +are a deep green. The palette is a plain file, +/usr/pkg/dt/share/palettes/Camouflage.dp, and System +Settings shows every installed palette with its colours before you +choose it.

+

Fonts are set the same way. MCDE ships Hack, an open source monospace +font, and uses it for the terminal and the login screen; the rest of the +desktop uses the system font, which System Settings can change. +Anti-aliasing is on by default and can be turned off for a machine that +is too slow for it.

+

The session and your files

+

Everything that belongs to your desktop is under ~/.dt: +the session, the panel layout, the menus, the snippets, the backdrop +choice and the settings of the programs. Removing a file there resets +that part of the desktop at the next login; removing the whole directory +gives you a fresh desktop, without touching your documents.

+

The session manager can save the programs that are open when you log +out and start them again at the next login. The setting is in System +Settings under Login. A program that should always start belongs in the +session, not in a shell startup file: the session is what the desktop +restores.

+

Help

+

Every MCDE program has a Help menu; it opens the program's help page +in the Information Manager. The Information Manager also holds this +guide, which is the place to start when the question is about the system +rather than about one program. The next chapter explains how to open it +and how to search in it.

+

The Display and X11

+

MCDE draws on the X Window System, and X is part of the Makronix base +system. The server, the drivers, the fonts and the clients are in +/usr/X11R7; there is no separate X package to install. On a +normal machine the server needs no configuration at all, and +dtlogin starts it.

+

The server and the session

+

The login screen starts the X server and, after a login, the MCDE +session. A text console can start a bare X session with startx(1), but that is not the MCDE session: +it starts the user's ~/.xinitrc and nothing else. Use it to +test the server, not as the daily desktop.

+
$ startx
+$ xdpyinfo | head
+$ xrandr
+

xdpyinfo prints the display's capabilities, and +xrandr lists the outputs and the modes. A second monitor is +enabled with xrandr --output; the setting lasts for the +session unless it is put in a session script.

+

When the server needs a configuration

+

Most hardware is detected. A machine with an unusual graphics chip, a +wrong resolution or a display that stays black can be given a +configuration file:

+
# X -configure
+# cp /root/xorg.conf.new /etc/X11/xorg.conf
+# X -config /etc/X11/xorg.conf
+

The file is a starting point, not a guarantee. The log is +/var/log/Xorg.0.log; the lines marked (EE) are +errors and (WW) are warnings. A server that starts from the +console but not from dtlogin usually has a permission or a +display-manager problem, not a driver problem.

+

Keyboard and fonts

+

The text console and X have separate keyboard settings. The console +is configured with wsconsctl(8):

+
# wsconsctl -w keyboard.encoding=de
+

The key map is set in /etc/wscons.conf. In X, MCDE's +System Settings sets the layout for the session; the X server's own +configuration is in /etc/X11/xorg.conf.d/. A keyboard that +types the wrong characters in a terminal but the right ones on the +console (or the other way round) is set in the other place.

+

The fonts are installed with the X sets. fc-list(1) lists them and +fc-cache -f refreshes the cache after a font is added. +MCDE's terminal and login screen use Hack; the rest of the desktop uses +the system font, which System Settings changes.

+

Programs from another machine

+

An X program can run on one machine and display on another. SSH +forwards the connection, which is the safe way:

+
$ ssh -X name@studio.example xterm
+

-X asks for trusted forwarding; -Y is the +older, less restricted form. The remote machine needs an X client and +the local one needs the server, which Makronix has. A program that +refuses to start has usually failed an authorization check; the SSH +connection sets that up for you.

+

The Information Manager

+

dtinfo(1) is MCDE's Information +Manager. It reads information libraries: directories of books, each with +a table of contents and a full-text index. The help pages of the MCDE +programs are books in it, and so is this guide.

+

Opening the guide

+

The Makronix Guide is the default library of the Information Manager, +so dtinfo opens it directly. It is also in the Help menu of +the MCDE programs and in the Makronix menu. From a terminal, the +same:

+
$ dtinfo
+$ dtinfo -l makronix
+

The first command opens the default library; the second names the +library explicitly. The library is installed as +/etc/dt/infolib/en_US.UTF-8/makronix.dti. The session +script /etc/dt/config/Xsession.d/0000makronix sets +DTINFOLIBDEFAULT to makronix, which is why the +plain command works.

+

Reading and searching

+

The window has a list of the books in the library and the table of +contents of the selected book. A click on a chapter opens it; the +navigation buttons go back and forward in the history, and the table of +contents stays available while you read. The search field searches the +whole library, not only the open chapter; the results are shown with the +book and section they come from, and a click opens the result in +place.

+

The guide is one book with a chapter for every part of the system. +The chapters are the same text as the manual pages and the PDF; the +Information Manager adds the search and the links between them.

+

What an information library is

+

An information library is a directory whose name ends in +.dti. It contains a bookcase.map that names +the library and its bookcases, one directory per bookcase with the +compiled books, and a dtsearch directory with the full-text +index. The books are written in DocBook, the SGML dialect that CDE's +documentation uses, and compiled with +dtdocbook2infolib.

+

The Makronix Guide is built from docs/guide/book.xml in +the source tree. The same source produces the manual pages, the PDF, the +HTML file and this library; Building Makronix +explains the build. If you change the guide, rebuild it with:

+
$ cd /usr/msrc
+$ sh docs/guide/build.sh all
+$ sh docs/guide/build.sh install
+

The first command builds all four forms in +docs/guide/out; the second copies them to the places the +system reads: /usr/share/doc/makronix, +/usr/share/man/man7 and /etc/dt/infolib.

+

Adding another library

+

A library that someone gives you is a directory ending in +.dti. Put it under the locale directory of the system +library and name it on the command line:

+
# cp -R example.dti /etc/dt/infolib/en_US.UTF-8/
+$ dtinfo -l example
+

The library's own bookcase.map names its bookcases; +dtinfo reads that file, so the directory name and the short +name in the map are what matter. A library for one user can live in +~/.dt/infolib; the search path finds it there as well.

+

When the Information Manager is empty

+

If dtinfo starts but shows no books, the library was not +found. Check the three things it depends on:

+
    +
  • /etc/dt/infolib/en_US.UTF-8/makronix.dti/bookcase.map +exists and is readable.

  • +
  • DTINFOLIBDEFAULT is makronix in the +session (echo $DTINFOLIBDEFAULT).

  • +
  • DTINFOLIBSEARCHPATH contains +/etc/dt/infolib/%L/%I.dti. The command +dtsearchpath prints the assembled path; run it in the +session that has the problem.

  • +
+

A library that was copied from another machine can have a stale +search index. Rebuilding it with dtdocbook2infolib is +described in the DocBook chapter of the CDE documentation; for the +Makronix Guide, docs/guide/build.sh infolib does it.

+

The Command Line

+

The desktop is where the work starts, but the command line is where a +Unix system is understood and repaired. Makronix uses NetBSD's shell, +NetBSD's tools and NetBSD's manual pages; nothing here is special to +Makronix except the paths of the MCDE programs.

+

The shell

+

The login shell of a new account is sh(1), NetBSD's POSIX shell. It reads +~/.profile at login and ~/.shrc for +interactive shells. A user who prefers a Korn shell can use +/usr/pkg/bin/ksh93 (installed for MCDE's +dtksh) and change the login shell with chsh(1).

+

The important environment variables are PATH, +HOME, SHELL, TERM and +LANG. A desktop session gets PATH from the +session configuration, not only from ~/.profile; if a +program is found in a terminal but not from the panel, compare the +two:

+
$ echo $PATH
+$ env | sort
+

Pipes, redirection and jobs

+

A pipe sends the output of one program to the input of the next; +redirection sends it to a file. The three that matter every day:

+
$ dmesg | less
+$ grep -i error /var/log/messages > /tmp/errors
+$ command 2>&1 | tee log
+

Ctrl+C stops the program in the foreground, +Ctrl+Z suspends it, and bg, +fg and jobs manage it. +command & starts it in the background.

+

A file's permissions are read with ls -l and changed +with chmod(1). The three digits are +the owner, the group and everybody else; the execute bit is what makes a +file a program. A directory needs the execute bit to be entered, and the +write bit to be changed.

+
$ chmod 644 notes.txt
+$ chmod 755 script.sh
+$ chown user:wheel script.sh
+

Editing files

+

vi(1) is in the base system and is +the editor to know when the desktop is not running. It has two modes: +command mode, where keys are commands, and insert mode, where they are +text. i enters insert mode, Esc returns to +command mode, :w writes, :q quits and +:wq does both. dd deletes a line, +/text searches, and u undoes.

+

On the desktop, dtpad(1) edits +plain text with menus and a search dialog. Configuration files are plain +text either way; keep a copy before a large change +(cp file file.orig) and compare afterwards with diff(1).

+

Finding the documentation

+

man(1) reads the manual pages. The +sections are 1 (commands), 2 (system calls), 3 (library functions), 4 +(devices), 5 (file formats), 7 (conventions) and 8 (administration). The +useful forms:

+
$ man ls
+$ man 5 rc.conf
+$ man -k firewall
+$ apropos password
+

man -k searches the one-line descriptions; +apropos is the same. The Makronix Guide is a set of pages +in section 7, starting at makronix-guide(7). The HTML and PDF forms +are under /usr/share/doc/makronix.

+

Becoming the administrator

+

Administrative commands run as root. On a desktop, log in as yourself +and use su(1):

+
$ su -
+Password:
+# 
+

The minus makes it a login shell, with root's PATH and +environment. Your account is in the wheel group, which is what allows +su; a terminal that is left alone returns to your prompt +when you type exit. Log in as yourself rather than as root: +the desktop account is the account for people, and su is +the door to the system.

+

Services and rc.d

+

NetBSD starts services through rc.d: one script per +service, and one configuration file that decides which of them run. +Makronix uses the mechanism unchanged; the services that a desktop needs +are already configured.

+

/etc/rc.conf

+

/etc/rc.conf holds one variable per service. +foo=YES starts the service at boot, foo=NO +does not. The file is read by rc(8); +the variables are documented in rc.conf(5) and in the header of each +script.

+
# grep -v '^#' /etc/rc.conf | grep .
+

A local addition belongs in /etc/rc.conf, not in a +script: it survives an upgrade, and etcupdate knows how to +merge it. A single service can also be configured in +/etc/rc.conf.d/<service>, which is useful when a +package or an administrator owns one file.

+

Starting, stopping and checking a service

+

The scripts are in /etc/rc.d. Each takes the verbs +start, stop, restart, +status and onestart (start it now without +changing rc.conf):

+
# /etc/rc.d/dhcpcd status
+# /etc/rc.d/dhcpcd restart
+# /etc/rc.d/sshd onestart
+

A service that fails at boot writes its reason to the console and to +/var/log/messages. A script that is not executable, or a +variable with a typo, is the usual cause. The order in which the scripts +run is decided by the REQUIRE and PROVIDE +lines at the top of each script, not by the alphabetical order; rcorder(8) prints the order.

+

The desktop services

+

On a Makronix desktop the relevant entries are:

+
+
dhcpcd=YES
+
+

The DHCP client, when the network is configured by DHCP. A machine +with a fixed address sets dhcpcd=NO and configures the +interface in /etc/ifconfig.<if>.

+
+
sshd=YES
+
+

The Secure Shell server. The installer enables it; the firewall lets +it in.

+
+
ntpd=YES
+
+

Time synchronisation. The server list is +/etc/ntp.conf.

+
+
npf=YES
+
+

The firewall. Its rules are in /etc/npf.conf; The Firewall explains them.

+
+
dtlogin=YES
+
+

The graphical login. Without it the machine starts with a text +console; startx is not the same thing, and the MCDE session +is started by dtlogin.

+
+
cupsd=YES
+
+

The print service, when printing is set up (Printing, Sound and Power).

+
+
+

Adding a service

+

A service that comes from pkgsrc installs its own script in +/usr/pkg/share/examples/rc.d or /etc/rc.d. +Copy it into /etc/rc.d if it is an example, make it +executable, add the variable to /etc/rc.conf, and start it +once to see whether it works before the next boot:

+
# cp /usr/pkg/share/examples/rc.d/foo /etc/rc.d/foo
+# chmod 755 /etc/rc.d/foo
+# echo 'foo=YES' >> /etc/rc.conf
+# /etc/rc.d/foo start
+# /etc/rc.d/foo status
+

If the service needs a directory or a user, its package documentation +says so; pkg_info -D foo prints the message that came with +the package.

+

Users and Accounts

+

Makronix is a machine for people: the installer creates one account +for the person who uses it, and that account is in the groups a desktop +needs. More accounts are added with NetBSD's user tools, and the same +accounts appear at the login screen and in System Settings.

+

Where the accounts live

+

/etc/master.passwd is the real database; +/etc/passwd is its public view, without the password +hashes. Both are generated from the master file by pwd_mkdb(8). The group database is +/etc/group. Edit them with vipw(8) and vi(1) rather than with a text editor that +does not know about the locks.

+

Each account has a home directory, a login shell and a list of +groups. A new account gets the files from /etc/skel, which +is where a site puts its default .profile and desktop +files.

+

Adding an account

+
# useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \
+    -c "Full Name" -s /bin/sh name
+# passwd name
+

useradd creates the home directory with -m, +puts the account in the named groups and sets the shell. +passwd then sets the password; without it the account +cannot log in. The groups are the ones the installer uses:

+
+
wheel
+
+

May use su to become root.

+
+
operator
+
+

May use the operator commands (shutdown, and the disk tools that are +marked for it).

+
+
staff
+
+

The usual group for files that a team shares.

+
+
users
+
+

The ordinary users of the machine.

+
+
dialer
+
+

May use the serial ports and the modems.

+
+
games
+
+

May write the games' score files.

+
+
wsrc
+
+

May write the source tree under /usr/src.

+
+
+

The same operation is in System Settings under Users; it asks for the +administrator's password and writes the same files.

+

Changing and removing an account

+
# usermod -G wheel,operator,staff,users,dialer,games,wsrc name
+# chsh -s /usr/pkg/bin/ksh93 name
+# userdel -r name
+

usermod changes the groups, the shell, the full name or +the home directory; chsh changes the shell of the account +that runs it. userdel -r removes the account and its home +directory; without -r the files stay. A removed account +leaves its files owned by a number; find them with +find / -nouser -print before you delete anything else.

+

Passwords

+

Passwords are stored as hashes in /etc/master.passwd, +which only root can read. A user changes their own with +passwd; root changes another with passwd name. +The password quality is the administrator's business: a desktop machine +on a home network needs a different policy from a machine that is +reachable from the Internet.

+

If a password is lost, root sets a new one from a single-user boot or +from another account in the wheel group. The fact that this is possible +is the reason a machine left alone in a public place must be locked, not +only logged out.

+

Disks and Filesystems

+

NetBSD names disks by driver and number: sd0 is the +first SCSI or SATA disk, wd0 the first IDE disk, +ld0 a logical disk, cd0 a CD or DVD drive. A +partition is a letter after the disk: sd0a is the first +partition of the first disk. The raw device has an r in +front (rsd0a); the block device is the one you mount.

+

Seeing what is there

+
$ dmesg | grep -E 'sd|wd|cd'
+$ disklabel sd0
+$ df -h
+$ du -sh /home/*
+

disklabel(8) prints the partition +table of a disk; df(1) shows what is +mounted and how full it is. A machine installed with the simple way has +a GPT label and a root partition that uses the whole disk; the full way +can have an MBR label and a NetBSD disklabel inside it, as NetBSD +documents.

+

Adding a disk

+

A new disk has no label until one is written. The interactive editor +is the safe way to look first:

+
# disklabel -i sd1
+disklabel> p
+disklabel> a
+partition> a
+offset> [Enter]
+size> [Enter]
+fstype> 4.2BSD
+disklabel> w
+disklabel> q
+

The partition table is written by w; nothing happens +before it. A GPT disk can be edited with gpt(8) instead. After the label, make a file +system and mount it:

+
# newfs /dev/rsd1e
+# mkdir -p /data
+# mount /dev/sd1e /data
+

The raw device is the one for newfs. A file system that +should come back after a reboot belongs in /etc/fstab:

+
/dev/sd1e  /data  ffs  rw  1 2
+

newfs(8) destroys what was on the +partition. Check the device name with disklabel before you +type it.

+

Backing up a file system

+

dump(8) and restore(8) are the NetBSD pair for a whole +file system. They preserve owners, modes and hard links, which +cp does not:

+
# dump -0 -f /backup/root.dump /
+# restore -i -f /backup/root.dump
+

For a directory, tar(1) is enough, +and a compressed archive is easier to keep:

+
$ tar -czf /backup/home.tar.gz /home
+$ tar -xzf /backup/home.tar.gz -C /
+

A backup that has never been restored is a hope. Restore one file +from the archive before you trust it.

+

Encrypted disks

+

An installation with encryption uses cgd(4). The key is derived from a passphrase +and stored in /etc/cgd/<disk>. The installer writes +it; the boot loader asks for the passphrase before the root file system +is mounted. The unencrypted partition that the loader reads is +/cgdboot.

+

To encrypt another disk by hand, create the configuration, then the +cgd device, then a file system on it:

+
# cgdconfig -g -k argon2id -o /etc/cgd/sd1e adiantum 256
+# cgdconfig cgd0 /dev/sd1e
+/dev/sd1e's passphrase:
+# newfs /dev/rcgd0a
+# mount /dev/cgd0a /mnt
+

The exact partition letters and the choice of algorithm are the +administrator's; cgdconfig(8) +documents the parameters and the verification methods. A lost passphrase +cannot be recovered; keep a copy of the configuration in a safe place, +not the passphrase.

+

RAID, LVM and concatenation

+

NetBSD has three ways to combine disks. Each has its own manual page +and its own recovery rules, and each is a decision to make before the +data is on it:

+
    +
  • raidctl(8) — RAIDframe, +hardware-independent RAID levels 0, 1, 5 and more. The configuration is +a file; the set must be assembled before the root file system is mounted +if it holds the root.

  • +
  • lvm(8) — logical volumes: +physical volumes, a volume group, logical volumes that can grow. It is +the flexible choice for a data disk.

  • +
  • ccdconfig(8) — concatenation +and striping without RAIDframe. Simple, and with no redundancy.

  • +
+

Whichever you choose, the rule is the same: write the configuration +down, test that it comes back after a reboot, and only then put the data +on it. A RAID set that has never been assembled from a cold boot is not +yet a backup.

+

Checking a file system

+

fsck(8) runs at boot on an unclean +file system. A file system that needs it by hand must be unmounted +first:

+
# umount /data
+# fsck -f /dev/rsd1e
+# mount /data
+

fsck -n only reports; it changes nothing. The output +names every repaired inode, and a file that was open during a crash can +end up in lost+found at the top of the file system.

+

Packages and pkgsrc

+

Makronix has two kinds of software: what NetBSD's build puts in the +base system, and what pkgsrc installs under /usr/pkg. The +desktop, Firefox, Thunderbird and the games are pkgsrc packages. The +package tools are NetBSD's; the packages on the medium are built for +Makronix or taken from the NetBSD project.

+

The package tools

+

pkg_add(1) installs, pkg_delete(1) removes, and pkg_info(1) asks questions. The package +database is /usr/pkg/pkgdb.

+
$ pkg_info | less
+$ pkg_info -L firefox | less
+$ pkg_info -D firefox
+$ pkg_info -W /usr/pkg/bin/firefox
+

-L lists the files of a package, -D prints +the message that came with it (where its documentation is, which service +to enable), and -W answers which package owns a file.

+

Installing a package

+

/etc/pkg_install.conf names the repository in +PKG_PATH. The installer writes it when the machine is +installed; it points at the package repository on the installation +medium or at the NetBSD project's repository for the release the +packages were built for. With the path set, a package is one +command:

+
# pkg_add firefox
+# pkg_add -u firefox
+# pkg_delete firefox
+

pkg_add -u updates an installed package to the newest +version the repository has. Without an argument it updates everything +that has a newer version:

+
# pkg_add -uu
+# pkg_admin rebuild
+

An update can replace a library that another program needs. Read the +messages pkg_add prints, and keep the previous package +until the new one has started.

+

The makronix set and the package database

+

The packages that Makronix itself ships are in the “makronix” set, +which the installer unpacks as part of the system. They are not +registered in the package database: they change with a Makronix release, +and pkg_add -u does not touch them. A program that is in +the base set or in the “makronix” set is therefore updated by installing +a new Makronix release, not by a package update. The programs that were +installed with pkg_add (Firefox, Thunderbird, QEMU, the +games) are registered and do update.

+

pkg_info shows the registered packages. If it does not +list MCDE, that is not a defect: MCDE came with the release.

+

Building from source

+

The source set carries pkgsrc in /usr/pkgsrc. A package +is built in its own directory with the NetBSD make:

+
# cd /usr/pkgsrc/www/firefox
+# make install clean
+

The build needs the distfiles for the package and its dependencies. +The source set carries the distfiles of the packages Makronix ships, not +the whole pkgsrc archive; a package outside that set fetches what it +needs, which requires a network connection. The authoritative +description of pkgsrc is The pkgsrc Guide, installed with the tree and +available on the NetBSD project's web site.

+

A build on the installed machine writes into /usr/pkg +and its work directories under /usr/pkgsrc. It needs free +space — a browser can take several gigabytes while it builds — and it is +the wrong thing to do on a machine with a nearly full disk.

+

Security updates

+

pkg_admin(1) can compare the +installed packages with the published vulnerability list:

+
# pkg_admin audit
+# pkg_admin fetch-pkg-vulnerabilities
+

Makronix enables fetch_pkg_vulnerabilities=YES in +/etc/daily.conf, so the list is fetched daily and security(8) reports what it finds to root's +mail. The report is only as good as the list; read it, and update the +packages it names.

+

Printing, Sound and Power

+

Three things a desktop is expected to get right, and three things +NetBSD leaves to the administrator: a printer, sound, and what happens +when the machine is idle or the battery is low.

+

Printing with CUPS

+

Makronix uses the Common UNIX Printing System. The packages cups and +cups-filters are on the medium; the service is cupsd in +/etc/rc.conf. With the service running, a printer is added +with lpadmin(8):

+
# echo 'cupsd=YES' >> /etc/rc.conf
+# /etc/rc.d/cupsd start
+# lpadmin -p office -E -v ipp://printer.example/ipp/print -m everywhere
+# lpadmin -d office
+# lpstat -t
+

-m everywhere asks the printer for its own description, +which is the modern way; a printer that does not answer it needs a +driver package and a PPD file. The web interface at +http://localhost:631 does the same through a browser, and +lpoptions -p office -l lists the options of the +printer.

+

Printing a file is lpr(1):

+
$ lpr -P office document.pdf
+$ lpq -P office
+

CUPS keeps its queues and its logs in /var/spool/cups +and /var/log/cups. A job that stays in the queue is usually +a wrong device address or a printer that is off; the error log says +which.

+

Sound

+

NetBSD's audio device is configured with audioctl(1) and mixerctl(1); audiocfg(1) lists the devices and lets you +test them:

+
$ audiocfg list
+$ audiocfg test 0
+$ mixerctl -a
+$ mixerctl -w outputs.master=180
+

MCDE shows the volume in the bar at the top: a slider in the menu, a +mute switch, and the wheel over the speaker. The setting is the same +mixer that mixerctl changes.

+

The package pulseaudio and its volume control pavucontrol are on the +medium for programs that expect a PulseAudio server; MCDE itself does +not need one. audioplay(1) plays a WAV +file without a server, and aucat(1) +records and plays audio and can act as a sound server.

+

Power and temperature

+

envstat(8) shows the sensors the +machine has: temperatures, fan speeds, voltages and the battery. powerd(8) adjusts the CPU frequency to the +load, which is what keeps a laptop cool and quiet:

+
# echo 'powerd=YES' >> /etc/rc.conf
+# /etc/rc.d/powerd start
+$ envstat
+$ sysctl -a | grep -E 'cpu.frequency|machdep.cpu'
+

A desktop machine can run at full speed all the time; a laptop should +not. The MCDE bar shows the battery when the machine has one, and System +Settings has the screen and sleep settings. On a machine that supports +it, apm(8) reports the battery and the +AC state as well.

+

A machine that shuts down without warning is usually hot or has a +failing power supply. Read envstat before you blame the +software; the temperatures are the first number to look at.

+

Networking

+

NetBSD's network configuration is small and explicit: an interface is +configured with ifconfig, an address can come from DHCP, +and the routes and the resolver are plain files. Makronix's installer +writes the files for the network you chose; this chapter is for changing +them later.

+

Interfaces and addresses

+
$ ifconfig -a
+$ netstat -rn
+$ cat /etc/resolv.conf
+

The name of an interface is the driver's: wm0 for an +Intel Ethernet, re0 for a Realtek, ath0 or +urtwn0 for Wi-Fi, lo0 for the loopback. An +address from DHCP is requested by dhcpcd(8):

+
# dhcpcd wm0
+# /etc/rc.d/dhcpcd restart
+

The service reads /etc/rc.conf; with +dhcpcd=YES it configures every interface that is not +configured by a fixed file at boot.

+

A fixed address

+

A machine that should have the same address every time does not need +DHCP. The address belongs in +/etc/ifconfig.<interface>:

+
inet 192.168.1.20/24
+

The default route is /etc/mygate:

+
192.168.1.1
+

and the resolver is /etc/resolv.conf:

+
nameserver 192.168.1.1
+nameserver 9.9.9.9
+

Set dhcpcd=NO for that interface, or leave the service +off entirely. The name of the machine is in /etc/myname; +the local names are in /etc/hosts:

+
127.0.0.1       localhost
+192.168.1.20    studio.example  studio
+

Wi-Fi

+

A Wi-Fi interface needs its network and passphrase before DHCP can +run. wpa_passphrase(8) writes the +configuration:

+
# wpa_passphrase "network-name" "the passphrase" > /etc/wpa_supplicant.conf
+# chmod 600 /etc/wpa_supplicant.conf
+# ifconfig ath0 up
+# wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf
+# dhcpcd ath0
+

The service configuration is:

+
wpa_supplicant=YES
+wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
+dhcpcd=YES
+

The MCDE System Settings network pane lists the networks in reach and +asks for the passphrase; it writes the same files. A USB Wi-Fi adapter +is a second interface with its own name; use that name in the commands +above.

+

Testing

+
$ ping -c 3 192.168.1.1
+$ ping -c 3 www.NetBSD.org
+$ route -n get default
+$ netstat -an | grep LISTEN
+

If the first ping works and the second does not, the address and the +route are fine and the resolver or the uplink is not. If neither works, +the interface is down or the cable is not in the right port. +dmesg names the interface the driver found, and +ifconfig shows whether it has an address.

+

DNS, DHCP and NTP

+

Three small services make a network usable: something that answers +name lookups, something that hands out addresses, and something that +keeps the clock right. A desktop uses all three as a client; a machine +that serves a network runs the first two as a server.

+

Name resolution

+

The resolver reads /etc/resolv.conf. It lists the name +servers in the order they are tried, and the domain that short names +belong to:

+
search example.lan
+nameserver 192.168.1.1
+nameserver 9.9.9.9
+

/etc/nsswitch.conf decides where a lookup goes first. +Makronix's installer sets hosts: files mdnsd dns, so the +local file answers first, then the local network names, then DNS. The +local name <name>.local is answered by mdnsd(8).

+

A machine that should answer DNS for a small network can run unbound(8) as a caching resolver, or nsd(8) as an authoritative server. Both are +packages; both have their own documentation, and both should be +reachable only from the network they serve. The firewall chapter is the +place to decide that.

+

DHCP

+

A client runs dhcpcd(8) and needs +no configuration beyond dhcpcd=YES. A server runs dhcpd(8) with a lease file and a subnet +declaration:

+
# cat /etc/dhcpd.conf
+subnet 192.168.1.0 netmask 255.255.255.0 {
+    range 192.168.1.100 192.168.1.199;
+    option routers 192.168.1.1;
+    option domain-name-servers 192.168.1.1;
+    default-lease-time 86400;
+    max-lease-time 604800;
+}
+
+# echo 'dhcpd=YES' >> /etc/rc.conf
+# touch /var/db/dhcpd.leases
+# /etc/rc.d/dhcpd start
+

The interface that serves the network must have a fixed address in +the same subnet (A fixed address); a DHCP +server with an address from DHCP is a machine that cannot find itself. A +machine that should always get the same address can be pinned by its +Ethernet address:

+
host printer {
+    hardware ethernet 00:11:22:33:44:55;
+    fixed-address 192.168.1.50;
+}
+

Time

+

A correct clock matters for TLS, for mail and for the logs of two +machines that are compared. ntpd(8) is +the daemon; /etc/ntp.conf names the servers:

+
server 0.pool.ntp.org
+server 1.pool.ntp.org
+server 2.pool.ntp.org
+

With ntpd=YES, the clock is corrected continuously and +slowly. A clock that is wrong by hours is set once by hand before the +daemon starts:

+
# date 202611151200
+# /etc/rc.d/ntpd restart
+$ ntpq -p
+

ntpq -p lists the servers, the stratum and the offset. A +server marked with an asterisk is the one the daemon is following. If +none of them answers, the network or the firewall is the problem, not +the clock.

+

Remote Access and File Sharing

+

A Makronix machine is a Unix machine on a network. It can be reached +with SSH, it can serve files with NFS, SMB or AFP, and it can mount the +shares of other machines. MCDE's file manager shows the network places +that the system has been told about; System Settings has the sharing +controls.

+

SSH

+

The installer enables sshd(8) and +the firewall lets it in. Log in from another machine with your +account:

+
$ ssh name@studio.example
+$ ssh name@studio.local
+

A key is better than a password and is the only way to log in without +typing one. Create it once, then put the public half on the machines you +log in to:

+
$ ssh-keygen -t ed25519
+$ cat ~/.ssh/id_ed25519.pub | ssh name@studio.example \
+    'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'
+$ chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys
+

scp copies a file, sftp is an interactive +file transfer, and a tunnel forwards a port through the connection:

+
$ scp report.pdf name@studio.example:/home/name/
+$ ssh -L 8080:localhost:80 name@studio.example
+

The server's configuration is /etc/ssh/sshd_config. +Password logins for root are disabled by default; log in as yourself and +use su. After a change, test the configuration and reload +the daemon:

+
# sshd -t
+# /etc/rc.d/sshd reload
+

NFS

+

NFS is the native Unix file sharing. The server exports a directory +in /etc/exports:

+
/home -alldirs -maproot=root -network 192.168.1.0 -mask 255.255.255.0
+

and runs the daemons:

+
# echo 'rpcbind=YES' >> /etc/rc.conf
+# echo 'nfsd=YES' >> /etc/rc.conf
+# echo 'mountd=YES' >> /etc/rc.conf
+# /etc/rc.d/rpcbind start
+# /etc/rc.d/mountd start
+# /etc/rc.d/nfsd start
+# /etc/rc.d/mountd restart
+

The client mounts it with mount_nfs or +mount -t nfs:

+
# mount -t nfs 192.168.1.20:/home /mnt
+

An entry in /etc/fstab makes it permanent. +-maproot=root lets root on the client write as root on the +server; without it, root is mapped to nobody. A share that is open to +the whole network should be a decision, not a default.

+

SMB and AFP

+

Windows and macOS machines speak SMB; older Macs speak AFP. Makronix +ships both servers as packages:

+
# pkg_add samba4 netatalk4
+# echo 'smbd=YES' >> /etc/rc.conf
+# echo 'nmbd=YES' >> /etc/rc.conf
+# echo 'afpd=YES' >> /etc/rc.conf
+

The Samba configuration is /usr/pkg/etc/samba/smb.conf. +A minimal share that is visible to one user:

+
[global]
+   workgroup = HOME
+   server string = Makronix
+   security = user
+   passdb backend = tdbsam
+
+[share]
+   path = /home/share
+   valid users = name
+   read only = no
+   browseable = yes
+

Create the Samba user after the system account exists:

+
# smbpasswd -a name
+# /etc/rc.d/smbd start
+# /etc/rc.d/nmbd start
+

AFP is configured in /usr/pkg/etc/netatalk/afp.conf; the +package's documentation has the share syntax for the version that is +installed. MCDE's System Settings has the sharing controls for both, and +its file manager shows a share that is mounted or announced on the +network.

+

Mounting a remote directory

+

When the other machine offers only SSH, SSHFS mounts a directory over +it:

+
# pkg_add fuse-sshfs
+$ sshfs name@studio.example:/home/name /mnt/studio
+$ umount /mnt/studio
+

The package afpfs-ng does the same for an AFP server. Both need the +FUSE device and the user's permission to mount; the package message says +which group to join.

+

Before you open a service

+

Every service that listens on the network is a door. Open only the +ones you use, restrict them to the network they serve, and read the +firewall chapter before you connect the machine to a network you do not +control. A file share with a weak password is worse than no file +share.

+

The Firewall

+

Makronix turns on NetBSD's packet filter, npf(7), and installs a rule set that lets +nothing in that the machine did not ask for. Outgoing connections work, +their replies come back, DHCP and IPv6 set-up work, ping works, SSH +works and the local network names work. Everything else is blocked.

+

The default rule set

+

/etc/npf.conf on a freshly installed machine is the +following. It is the rule set that the installer writes and that +/usr/src/docs/reference/npf-default.conf records for +validation:

+
alg "icmp"
+
+group default {
+    pass final on lo0 all
+
+    # out: everything, with the replies
+    pass stateful out final all
+
+    # DHCP replies (a broadcast, so no state) and IPv6 set-up
+    pass in final proto udp from any port 67 to any port 68
+    pass final family inet6 proto ipv6-icmp all
+
+    # ping
+    pass stateful in final family inet4 proto icmp all
+
+    # remote login
+    pass stateful in final proto tcp to any port ssh
+
+    # mDNS and DNS-SD (mdnsd): the multicast announcements, port 5353
+    pass in final proto udp to any port 5353
+
+    block in final all
+}
+

Read it from the bottom up: everything that arrives is blocked unless +an earlier rule lets it in. The rules above it are the exceptions. +stateful means that the reply to a connection the machine +started is allowed without a rule of its own.

+

Opening one port

+

A service that should be reachable from the network needs a rule +above the final block. For a web server on port 80, add this line before +block in final all:

+
    pass stateful in final proto tcp to any port 80
+

Then check the file and reload the running rule set. A rule set with +a syntax error must not be loaded; npfctl validate reads +the file without touching the running one:

+
# npfctl validate /etc/npf.conf
+# /etc/rc.d/npf reload
+# npfctl show
+# npfctl stats
+

npfctl show prints the rules that are active, after the +variables and groups have been expanded. If the line you added is not +there, the reload did not happen; the console and +/var/log/messages say why.

+

The firewall at boot

+

The service is enabled in /etc/rc.conf:

+
npf=YES
+

At boot, npf loads /etc/npf.conf before the +network is up. A machine that boots without a rule set is a machine that +is open for the time it takes to notice. After a change, reload rather +than restart; the existing connections survive a reload.

+

NAT and a router

+

A machine that routes between two networks needs NAT and forwarding. +The rules are in npf.conf(5); the +shape is a map line for the outgoing interface and +pass rules for the two directions. Forwarding itself is a +sysctl(8) setting:

+
# sysctl -w net.inet.ip.forwarding=1
+# echo 'net.inet.ip.forwarding=1' >> /etc/sysctl.conf
+

A router is a machine with two interfaces and a rule set that +describes both directions. Do not enable forwarding on a desktop that +has one interface; it has nothing to forward between.

+

Mail and the Web

+

Two services that a small machine often provides: a mail transfer +agent that delivers local mail, and a web server that serves a +directory. Both are NetBSD base services; Makronix ships the clients and +the desktop programs that read the results.

+

Mail

+

The base system's mail transfer agent is Postfix. A desktop that only +needs local mail — the daily security report, cron's output, the +messages of the package tools — runs it with the default configuration +and reads the mail with mail or MCDE's dtmail(1):

+
# echo 'postfix=YES' >> /etc/rc.conf
+# /etc/rc.d/postfix start
+$ mail
+

/etc/postfix/main.cf is the configuration. A machine +that should accept mail from the network sets +inet_interfaces and a proper myhostname, and +needs a DNS name with an MX record. That is a mail server, not a +desktop; the NetBSD Guide's mail chapter and the Postfix documentation +describe the decisions, and the firewall chapter describes the port that +has to be opened.

+

Local mail is delivered to /var/mail/<name>. If +mail does not arrive, read /var/log/maillog; Postfix writes +there, and postfix check reports a configuration that it +cannot use.

+

A web server

+

The base system's HTTP server is bozohttpd(8), installed as +httpd. It serves one directory, which is enough for a +documentation page or a small site:

+
# echo 'httpd=YES' >> /etc/rc.conf
+# echo 'httpd_flags="-b /var/www"' >> /etc/rc.conf
+# /etc/rc.d/httpd start
+$ curl http://localhost/
+

/var/www is the document root; the index file is +index.html. A server that needs CGI, PHP, TLS or virtual +hosts should use a package: nginx or apache, with their own +documentation and their own service scripts.

+

TLS needs a certificate. For a public name, the certificate +authority's client (for example certbot) obtains and renews it; for a +name that only the local network uses, a self-signed certificate is +enough, and every client has to be told to trust it. A certificate that +has expired is the most common reason a site that worked yesterday does +not work today.

+

The desktop clients

+

Firefox reads the web, Thunderbird reads mail and news, and +dtmail reads local mail in the MCDE style. All three are on +the medium as packages; the installer can put them on the machine, and +pkg_add installs them later (Packages and +pkgsrc). Their settings belong to the user, not to the system, and +live under ~/.mozilla, ~/.thunderbird and +~/.dt.

+

Building Makronix

+

Makronix builds itself from its own sources. The installation medium +can carry those sources, so a machine can be rebuilt without a network; +a development machine does the same with more room and more patience. +This chapter is the map: the source layout, the one entry point, and +what each target produces.

+

The source tree

+
+
src/
+
+

Makronix's NetBSD tree: the kernel, the userland, the build system +and the installer. It is edited directly; there is no patch layer +between it and the system. Upstream NetBSD is in +refs/netbsd/src, for reading.

+
+
xsrc/
+
+

The X tree, imported the same way. X is part of the base system: the +server, the drivers, the fonts and the clients are built into the X +sets.

+
+
pkgsrc/
+
+

The pkgsrc checkout, pinned. It is not edited; a change is a moved +pin or a package in ext/ or the local wip.

+
+
ext/
+
+

The third-party trees Makronix ships and changes: MCDE, its Motif +build, afpfs-ng and glibc. Each has its own recipe and its own +IMPORT note.

+
+
tools/
+
+

Makronix's own POSIX shell tools: the build stamp, the package list +reader, the set generator, the test harnesses and the MCDE helpers.

+
+
docs/ and www/
+
+

The contracts and the guide, and the web site. The guide's source is +docs/guide/book.xml.

+
+
+

One entry point

+

Everything is built from the top-level Makefile. The +interface is deliberately small:

+
$ make                     # the distribution (no medium)
+$ make release ARCH=amd64  # through to a finished release
+$ make iso                # the installation CD/DVD image
+$ make usb                # the bootable USB image
+$ make userland           # the pkgsrc packages and the makronix set
+$ make sourcesets         # the source sets for the medium
+$ make test               # the tool tests, then the installation tests
+$ make install            # install over a running Makronix
+

make release builds the sets and the kernels; +make iso packages what the release built; it refuses to run +if a source changed since, because the medium would not match its sets. +make usb needs the source sets under +source/sets; make sourcesets writes them.

+

ARCH is the name a person types: amd64, i386, macppc, +evbarm. On a NetBSD host without ARCH, the host decides; on +a cross host it is amd64 unless named. JOBS sets the +parallelism.

+

Cross and native are one build

+

The build detects whether the host is NetBSD or not. A NetBSD host +builds natively with its own toolchain; a Linux or another host +cross-builds the same tree with the toolchain that build.sh +builds first. A package that builds only on one of the two is a defect +in the recipe, not a reason to use a virtual machine.

+

The pkgsrc packages are built for the target with the same toolchain; +tools/pkgsrc-cross.mk.conf is the whole configuration, and +pkgsrc/ itself is not patched. The workarounds in that file +are measured; Cross-Building and the Source Tree +explains them and when they can go.

+

Where the results land

+

The build writes to build/obj: the object tree, +destdir.<arch> and the release directory +releasedir. The logs are in build/logs. A +medium is in releasedir/images; the sets are in +releasedir/<arch>/binary/sets.

+

The gate is checkflist, run the way NetBSD runs it: the +set lists and what the build actually installed must agree. Extra or +missing files fail the build. A build is done when +checkflist reports neither.

+

Building on the installed system

+

The source set installs to /usr/src, +/usr/xsrc and /usr/msrc. Build from +/usr/msrc as a user in the wsrc group:

+
$ cd /usr/msrc
+$ export MAKRONIX_TOP=/usr/msrc
+$ make release ARCH=amd64
+

A full self-build needs room for the object tree and the distfiles +and takes hours on a laptop; the first build is the slow one. The source +set is not the development history: it carries the files a rebuild +needs, and PINS names the revisions they came from.

+

Tests

+

make test runs the tests of the tools first, then the +installation tests: a machine is installed from the medium in QEMU and +must reach a login prompt and shut down cleanly. The MCDE tests run +before the release tests, from a native build of the host. A test that +has never failed has not been tested; the harnesses are in +tools/ and each can be run alone.

+

Cross-Building and the Source Tree

+

Makronix is built on NetBSD and on other systems. The same tree, the +same packages and the same release come out; the difference is the +toolchain that build.sh builds first. This chapter is for +the person who works on that build, not for the person who installs the +result.

+

What the build detects

+

tools/userland.sh looks at uname -s. On +NetBSD it builds natively with the host's pkgsrc and installs into the +host's /usr/pkg; on anything else it cross-builds with the +toolchain and the sysroot in build/obj. The packages are +the same either way; tools/pkgsrc-cross.mk.conf is the only +configuration that is specific to the cross case, and +pkgsrc/ is not patched.

+

The build's paths come from MAKRONIX_TOP. On a +development machine that is the repository root; on an installed system +with the source set it is /usr/msrc.

+

The cross workarounds, and why they +exist

+

Four settings in tools/pkgsrc-cross.mk.conf were each +added after a measured failure. They are documented in +docs/CROSS.md in the source set; in short:

+
    +
  • fonts/Xft2 runs a C++ probe it does not declare. The cross +configuration adds USE_LANGUAGES+= c c++, which gives it a +real compiler instead of pkgsrc's fail wrapper.

  • +
  • fonts/Xft2 calls FT_GlyphSlot_Embolden without the +header that declares it after FreeType moved it. The build adds +-include freetype/ftsynth.h. This is a GCC-14 strictness +issue, not a cross issue; the native build may need it too.

  • +
  • pkgtools/x11-links probes /usr for X headers. In a +cross build that is the host's X, not the target's; the configuration +points it at ${CROSS_DESTDIR}/usr/X11R7.

  • +
  • X's configure passes absolute /usr/X11R7/include and +/usr/X11R7/lib, which do not resolve inside the sysroot. +The build adds the sysroot-relative GCC form +-I=/usr/X11R7/include and +-L=/usr/X11R7/lib.

  • +
+

Each setting has a removal criterion in docs/CROSS.md: +when the package builds without it in both modes, it goes. A workaround +that outlives its cause is a bug with a comment.

+

Forks and imported trees

+

What Makronix changes is a fork in ext/; what it does +not change is imported and left alone. The NetBSD tree is +src/ with its base commit in src/BASE; the X +tree is xsrc/ with xsrc/BASE; upstream for +reading is refs/netbsd and refs/linux. The +import of a fork is one commit of the upstream archive, and every change +after it is a visible diff.

+

MCDE is the largest fork. Its build for the host is +make mcde-host; its Linux build is +make mcde-linux. The host build is what produces +dtdocbook2infolib and dtinfo for the +documentation and for testing without a target machine; the cross build +for the release is part of make userland.

+

The rules that keep it buildable

+
    +
  • A package that builds only on one host is broken. Fix the recipe, +the configuration in tools/, or the source in +ext/; do not build it in a virtual machine.

  • +
  • pkgsrc/ and refs/ are not edited. A +change is a moved pin, recorded in PINS, or a package of +our own.

  • +
  • tools/ is POSIX shell: no bash, no Python, no +transient units. A tool that only runs on the author's machine is not a +tool.

  • +
  • The set list is generated, not written: +tools/makronix-set.sh reads the installed tree back and +writes src/distrib/sets/lists/makronix/mi. A file that is +installed but not in the list fails checkflist.

  • +
+

Other platforms

+

make release ARCH=macppc and the other architectures use +the same tree with a different target. A platform is supported when its +installation has been run to a login prompt; the measured state is in +docs/PLATFORMS.md. Cross building makes the compiler for +that platform; it does not test the firmware, the drivers or the desktop +on it. That is what the hardware is for.

+

Updating the Desktop

+

Makronix is one system: the base, the X server, the desktop and the +packages that came with the release move together. The package tools +update the packages that were installed with them; a Makronix release +updates everything else. This chapter is the practical order.

+

From System Settings

+

Open System Settings and choose Software Update. The dialog reads the +source from the first line of /etc/makronix/update, shows +what it found, and asks for the administrator's password before it +changes anything. It runs sysupgrade for the base system +and then pkg_add -uu for the registered packages. The +machine must be rebooted afterwards.

+

The source is a directory, a file:// address or an +https:// address. http:// and +ftp:// are refused: a base system that is fetched over an +unencrypted connection is a base system that can be changed on the way. +An https:// source is protected by TLS; a +file:// source is as trusted as the medium it is on. This +release does not verify a signature on the sets, so use a source you +control and keep the previous medium until the new system has +started.

+

From the command line

+
# cat /etc/makronix/update
+https://example.invalid/makronix/0.99.10/amd64
+# sysupgrade auto "$(cat /etc/makronix/update)"
+# postinstall -s /usr/src/etc fix
+# etcupdate -s /usr/src/etc
+# pkg_add -uu
+# reboot
+

The order matters: the base system first, then the configuration +merge, then the packages, then the reboot. If sysupgrade +fails, stop there; a half-updated base with new packages is harder to +repair than either one alone.

+

MCDE and the makronix set

+

The desktop is part of the “makronix” set, which the installer +unpacks as part of the system. It is not in the package database, so +pkg_add -u does not update it; a new Makronix release does. +The same is true of the base system's programs (vim, git-base, +sysupgrade) and of the libraries MCDE needs.

+

A person who builds Makronix from source updates the desktop by +building the new tree and installing its release; the next chapter +describes the build. A person who only uses the desktop updates it with +the release's own update dialog or medium.

+

The guide itself

+

The guide is generated from docs/guide and installed +with the release. After a change to the guide's source, rebuild it and +install the four forms:

+
$ cd /usr/msrc
+$ sh docs/guide/build.sh all
+$ sh docs/guide/build.sh install
+

The build needs pandoc, xmllint, mandoc, Chrome or Google Chrome for +the PDF, and a host build of MCDE for the information library. +build.sh check verifies that every form was produced; the +details are in docs/guide/AGENTS.md.

+

If an update goes wrong

+

The old kernel is /netbsd.old and the loader's menu can +start it. The old configuration is in /etc/rc.conf.old +after postinstall or etcupdate replaced it. On +an encrypted system, the kernel the machine starts is the copy in +/cgdboot; An encrypted +system explains how to put the old one back.

+

A machine that does not start is not a machine that is lost. Start +the medium, mount the root file system and read the logs; the data is +still there, and the source set can rebuild the system around it.

+

Appendix A: Getting Help

+

A Unix system documents itself. The order that works is: the manual +page for the command, the file in /usr/share/doc, the +source, then the network. The network is last because it is the only one +that may be wrong about your version.

+

The manual pages

+

man is described in Finding the +documentation. The pages that are worth reading before anything else +are:

+
    +
  • afterboot(8) — what to do after +the first boot;

  • +
  • intro(8) — the system +administration commands and how they fit;

  • +
  • hier(7) — the file system +layout;

  • +
  • pkgsrc(7) — pkgsrc and the +package tools;

  • +
  • rc.conf(5) — the +services;

  • +
  • npf.conf(5) — the +firewall.

  • +
+

The web and the source

+

The NetBSD project's documentation is the reference for the parts +Makronix inherited: https://www.NetBSD.org/docs/, the +NetBSD Guide and the manual pages online. For Makronix itself, the +source tree is the last word: /usr/msrc holds the guide, +the tools, the build contract and the records of what was measured.

+

When you ask for help, give the version (uname -a), the +command you ran, what you expected and what happened. The output of +dmesg and the relevant lines of +/var/log/messages are worth more than a description.

+

This guide in its four forms

+
    +
  • man makronix-guide lists the chapters; each chapter +is a page in section 7.

  • +
  • /usr/share/doc/makronix/makronix-guide.pdf is the +printable form.

  • +
  • /usr/share/doc/makronix/makronix-guide.html is one +file and opens in any browser.

  • +
  • dtinfo opens the same text in the MCDE Information +Manager, with search.

  • +
+

Appendix B: Glossary

+

The words this guide uses in a particular sense.

+
+
base system
+
+

What NetBSD's build produces and Makronix ships in the NetBSD sets: +the kernel, the C library, the userland, the X server and the manual +pages. It is not in the package database.

+
+
CDE
+
+

The Common Desktop Environment, the Motif desktop that Sun, HP, IBM, +DEC and others shipped. MCDE is its fork.

+
+
cgd
+
+

NetBSD's cryptographic disk driver. An encrypted installation is a +cgd over the root file system.

+
+
cross build
+
+

Building for one machine on another. Makronix's build cross-builds +when the host is not NetBSD and builds natively when it is.

+
+
disklabel
+
+

The partition table NetBSD keeps on a disk. A GPT label is the modern +form; an MBR label with a NetBSD disklabel inside it is the older +one.

+
+
dtinfo
+
+

The MCDE Information Manager: the program that reads information +libraries and displays their books.

+
+
dtlogin
+
+

The MCDE login screen. It starts the X server and the session.

+
+
information library
+
+

A directory ending in .dti that holds a bookcase, its +books and the full-text index. The Makronix Guide is one.

+
+
makronix set
+
+

The packages that Makronix ships on the medium and unpacks as part of +the system. MCDE is in it. It is not registered with +pkg_add.

+
+
MCDE
+
+

The Makronix Common Desktop Environment: the fork of CDE that is +Makronix's desktop.

+
+
Motif
+
+

The widget toolkit CDE and MCDE are written against.

+
+
msrc
+
+

The Makronix source set: the tools, the documentation, pkgsrc, the +distfiles and the pins, installed in /usr/msrc.

+
+
npf
+
+

NetBSD's packet filter, the firewall Makronix enables by default.

+
+
pkgsrc
+
+

The package system that supplies /usr/pkg: a tree of +recipes, the package tools, and binary repositories.

+
+
release
+
+

Everything a version of Makronix consists of: the sets, the kernels, +the media and the name. 0.99.10 is “Camouflage”.

+
+
set
+
+

A group of files that the installer can select: the base sets, the X +sets, the games and the source sets. The “makronix” set is the desktop +and its programs.

+
+
sysinst
+
+

The installer. Makronix's fork has a simple way and the full NetBSD +way.

+
+
wsrc
+
+

The group that may write the source tree, so that a user can rebuild +the system without becoming root.

+
+
+

Appendix C: Licence and Sources

+

A guide is a derived work too. This one follows the structure of The +NetBSD Guide and uses its general NetBSD procedures; the Makronix text, +the MCDE chapter and the four output forms are Makronix's.

+

Makronix

+

The Makronix text and the tools in this tree are under the CNCL 1.0 +(Could Not Care Less), the licence at the top of the tree in +LICENSE. In short: do what you like with it, and do not +blame the authors.

+

The NetBSD Guide and NetBSD

+

The structure of this guide and the general NetBSD procedures follow +The NetBSD Guide, Copyright (c) 1998-2026 The NetBSD Foundation, Inc., +which is distributed under the BSD 2-clause licence. NetBSD's source, +which Makronix is built from, keeps its BSD licence and its copyright +notices. The NetBSD Guide is at +https://www.NetBSD.org/docs/guide/en/.

+

CDE and MCDE

+

MCDE is a fork of CDE, the Common Desktop Environment. CDE is +Copyright (c) 1993-2012 The Open Group and is distributed under the GNU +Lesser General Public License, version 2 or later. The MCDE changes keep +that licence; the MCDE source is in ext/src/mcde in the +source tree.

+

The Hack font, which MCDE uses for the terminal and the login screen, +is by Source Foundry and is distributed under the MIT licence.

+

The book format

+

The guide's source is DocBook XML 4.5. The DocBook DTD is Copyright +(c) 1992-2006 OASIS and is distributed under the OASIS licence. The MCDE +Information Manager reads the older DocBook SGML dialect that CDE's +tools define; the guide's build converts the XML to that dialect for the +library.

+

The sources of this guide

+
    +
  • docs/guide/book.xml and +docs/guide/chapters/ — the text.

  • +
  • docs/guide/build.sh — the build of the four +forms.

  • +
  • docs/guide/tools/docbook-to-cde.lua — the DocBook +XML to CDE SGML writer.

  • +
  • docs/logo/ — the logo.

  • +
  • www/style.css — the Camouflage palette that the +guide's colours follow.

  • +
+

The Makronix Guide is installed as manual pages from makronix-guide(7), as +/usr/share/doc/makronix/makronix-guide.pdf, as +/usr/share/doc/makronix/makronix-guide.html and as an +information library in +/etc/dt/infolib/en_US.UTF-8/makronix.dti.

+
+ +
The Makronix Guide · Makronix 0.99.10 · based on NetBSD
+ + + diff --git a/src/share/doc/makronix/makronix-guide.pdf b/src/share/doc/makronix/makronix-guide.pdf new file mode 100644 index 0000000000..32aec7a69f Binary files /dev/null and b/src/share/doc/makronix/makronix-guide.pdf differ diff --git a/src/share/man/man7/Makefile b/src/share/man/man7/Makefile index 9a8ab4202f..81179b952d 100644 --- a/src/share/man/man7/Makefile +++ b/src/share/man/man7/Makefile @@ -51,4 +51,33 @@ MLINKS+=c.7 c78.7 \ c.7 c11.7 \ entropy.7 random.7 +# The Makronix Guide. +MAN+= makronix-guide.7 +MAN+= makronix-guide-preface.7 +MAN+= makronix-guide-what.7 +MAN+= makronix-guide-tour.7 +MAN+= makronix-guide-before-install.7 +MAN+= makronix-guide-install.7 +MAN+= makronix-guide-upgrade.7 +MAN+= makronix-guide-mcde.7 +MAN+= makronix-guide-x11.7 +MAN+= makronix-guide-dtinfo.7 +MAN+= makronix-guide-shell.7 +MAN+= makronix-guide-rc.7 +MAN+= makronix-guide-users.7 +MAN+= makronix-guide-disks.7 +MAN+= makronix-guide-pkgsrc.7 +MAN+= makronix-guide-printing.7 +MAN+= makronix-guide-network.7 +MAN+= makronix-guide-services.7 +MAN+= makronix-guide-sharing.7 +MAN+= makronix-guide-firewall.7 +MAN+= makronix-guide-mailweb.7 +MAN+= makronix-guide-building.7 +MAN+= makronix-guide-cross.7 +MAN+= makronix-guide-updating.7 +MAN+= makronix-guide-help.7 +MAN+= makronix-guide-glossary.7 +MAN+= makronix-guide-license.7 + .include diff --git a/src/share/man/man7/makronix-guide-before-install.7 b/src/share/man/man7/makronix-guide-before-install.7 new file mode 100644 index 0000000000..034fd268b5 --- /dev/null +++ b/src/share/man/man7/makronix-guide-before-install.7 @@ -0,0 +1,100 @@ +.TH "MAKRONIX-GUIDE-BEFORE-INSTALL" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Before You Install +An installation replaces what is on the disk you choose. +Read this chapter with the machine in front of you, and do not start +until the data you need is somewhere else. +.SS The machine +amd64 is the platform this release is tested on. +The USB image is 10 GiB; give the system at least 12 GiB, and +considerably more if you want the source set on the same disk. +A machine with 2 GiB of memory runs the installer and the desktop; 4 GiB +or more make the desktop comfortable. +.PP +The USB image starts on UEFI machines and, through the protective MBR, +on BIOS\-only machines. +A Mac needs its firmware boot menu: hold \f[CR]Option\f[R] while the +machine starts and choose the stick. +The DVD and the CDs start through the normal firmware boot order. +.SS The media +A Makronix release is more than one image: +.IP \(bu 2 +the \f[I]USB image\f[R] or the \f[I]DVD\f[R], which carry the system and +the \(lqmakronix\(rq set; +.IP \(bu 2 +\f[I]CD 1\f[R], which carries the system and starts the installer; +.IP \(bu 2 +\f[I]CD 2\f[R], which carries the \(lqmakronix\(rq set (the desktop and +its programs); +.IP \(bu 2 +\f[I]CD 3\f[R], which carries the binary packages (Firefox, Thunderbird, +QEMU, the games). +.PP +The installer asks for the next CD when it needs one. +A DVD or a USB stick carries everything and asks for nothing. +The source set is on the DVD and on the USB image when it was built with +\f[CR]make sourcesets\f[R]; the installed system can also fetch it +later. +.SS Writing a USB stick +Write the image to the whole device, not to a partition. +On NetBSD, find the device with \f[CR]dmesg(8)\f[R] after inserting the +stick; it is usually \f[CR]/dev/rsd0d\f[R]. +.IP +.EX +# dd if=Makronix\-0.99.10\-amd64\-install.img of=/dev/rsd0d bs=1m conv=sync +.EE +.PP +On Linux the same operation is: +.IP +.EX +# dd if=Makronix\-0.99.10\-amd64\-install.img of=/dev/sdX bs=4M conv=fsync status=progress +.EE +.PP +Replace \f[CR]/dev/sdX\f[R] with the stick, and check the device name +twice: \f[CR]dd\f[R] does not ask. +Afterwards, compare the checksum of the image with the one published +next to it. +A stick that reads back differently at every attempt is defective; the +installer will fail in ways that look like software bugs. +.SS The answers the installer needs +The simple installation asks for the following. +Write them down before you start; the installer does not go back once it +has begun. +.TP +The disk +The whole disk that will hold Makronix. +Every partition on it is destroyed. +.TP +Encryption +Whether the disk is encrypted with \f[CR]cgd(4)\f[R], and the +passphrase. +The passphrase is asked for at every boot and cannot be recovered. +A long sentence you can type is better than a short password. +.TP +The computer\(aqs name +A short host name, without spaces or dots. +The local network name becomes \f[CR].local\f[R]. +.TP +The network +Ethernet with DHCP, or a Wi\-Fi network and its passphrase. +The installer configures the interface and enables \f[CR]dhcpcd(8)\f[R]. +.TP +The time zone +The zone of the place the machine is in, for example +\f[CR]Europe/Berlin\f[R]. +.TP +The administrator\(aqs password +The password of root. +It is used with \f[CR]su\f[R]. +.TP +Your account +A user name, a full name and a password. +The account is put in the groups that a desktop user needs: wheel (for +\f[CR]su\f[R]), operator, staff, users, dialer (serial ports), games and +wsrc (the source tree). +.SS Back up, then begin +Copy the files you need to another machine or an external disk. +An installation does not offer to preserve a partition that it is about +to overwrite. +If the machine has another operating system, decide before the +installation whether it is to survive; the full installation way can +keep it, the simple way uses the whole disk. diff --git a/src/share/man/man7/makronix-guide-building.7 b/src/share/man/man7/makronix-guide-building.7 new file mode 100644 index 0000000000..bb11d9bbd3 --- /dev/null +++ b/src/share/man/man7/makronix-guide-building.7 @@ -0,0 +1,112 @@ +.TH "MAKRONIX-GUIDE-BUILDING" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Building Makronix +Makronix builds itself from its own sources. +The installation medium can carry those sources, so a machine can be +rebuilt without a network; a development machine does the same with more +room and more patience. +This chapter is the map: the source layout, the one entry point, and +what each target produces. +.SS The source tree +.TP +\f[CR]src/\f[R] +Makronix\(aqs NetBSD tree: the kernel, the userland, the build system +and the installer. +It is edited directly; there is no patch layer between it and the +system. +Upstream NetBSD is in \f[CR]refs/netbsd/src\f[R], for reading. +.TP +\f[CR]xsrc/\f[R] +The X tree, imported the same way. +X is part of the base system: the server, the drivers, the fonts and the +clients are built into the X sets. +.TP +\f[CR]pkgsrc/\f[R] +The pkgsrc checkout, pinned. +It is not edited; a change is a moved pin or a package in +\f[CR]ext/\f[R] or the local \f[CR]wip\f[R]. +.TP +\f[CR]ext/\f[R] +The third\-party trees Makronix ships and changes: MCDE, its Motif +build, afpfs\-ng and glibc. +Each has its own recipe and its own \f[CR]IMPORT\f[R] note. +.TP +\f[CR]tools/\f[R] +Makronix\(aqs own POSIX shell tools: the build stamp, the package list +reader, the set generator, the test harnesses and the MCDE helpers. +.TP +\f[CR]docs/\f[R] and \f[CR]www/\f[R] +The contracts and the guide, and the web site. +The guide\(aqs source is \f[CR]docs/guide/book.xml\f[R]. +.SS One entry point +Everything is built from the top\-level \f[CR]Makefile\f[R]. +The interface is deliberately small: +.IP +.EX +$ make # the distribution (no medium) +$ make release ARCH=amd64 # through to a finished release +$ make iso # the installation CD/DVD image +$ make usb # the bootable USB image +$ make userland # the pkgsrc packages and the makronix set +$ make sourcesets # the source sets for the medium +$ make test # the tool tests, then the installation tests +$ make install # install over a running Makronix +.EE +.PP +\f[CR]make release\f[R] builds the sets and the kernels; +\f[CR]make iso\f[R] packages what the release built; it refuses to run +if a source changed since, because the medium would not match its sets. +\f[CR]make usb\f[R] needs the source sets under \f[CR]source/sets\f[R]; +\f[CR]make sourcesets\f[R] writes them. +.PP +\f[CR]ARCH\f[R] is the name a person types: amd64, i386, macppc, evbarm. +On a NetBSD host without \f[CR]ARCH\f[R], the host decides; on a cross +host it is amd64 unless named. +\f[CR]JOBS\f[R] sets the parallelism. +.SS Cross and native are one build +The build detects whether the host is NetBSD or not. +A NetBSD host builds natively with its own toolchain; a Linux or another +host cross\-builds the same tree with the toolchain that +\f[CR]build.sh\f[R] builds first. +A package that builds only on one of the two is a defect in the recipe, +not a reason to use a virtual machine. +.PP +The pkgsrc packages are built for the target with the same toolchain; +\f[CR]tools/pkgsrc\-cross.mk.conf\f[R] is the whole configuration, and +\f[CR]pkgsrc/\f[R] itself is not patched. +The workarounds in that file are measured; ??? +explains them and when they can go. +.SS Where the results land +The build writes to \f[CR]build/obj\f[R]: the object tree, +\f[CR]destdir.\f[R] and the release directory +\f[CR]releasedir\f[R]. +The logs are in \f[CR]build/logs\f[R]. +A medium is in \f[CR]releasedir/images\f[R]; the sets are in +\f[CR]releasedir/\f[R]\f[CR]/binary/sets\f[R]. +.PP +The gate is \f[CR]checkflist\f[R], run the way NetBSD runs it: the set +lists and what the build actually installed must agree. +Extra or missing files fail the build. +A build is done when \f[CR]checkflist\f[R] reports neither. +.SS Building on the installed system +The source set installs to \f[CR]/usr/src\f[R], \f[CR]/usr/xsrc\f[R] and +\f[CR]/usr/msrc\f[R]. +Build from \f[CR]/usr/msrc\f[R] as a user in the wsrc group: +.IP +.EX +$ cd /usr/msrc +$ export MAKRONIX_TOP=/usr/msrc +$ make release ARCH=amd64 +.EE +.PP +A full self\-build needs room for the object tree and the distfiles and +takes hours on a laptop; the first build is the slow one. +The source set is not the development history: it carries the files a +rebuild needs, and \f[CR]PINS\f[R] names the revisions they came from. +.SS Tests +\f[CR]make test\f[R] runs the tests of the tools first, then the +installation tests: a machine is installed from the medium in QEMU and +must reach a login prompt and shut down cleanly. +The MCDE tests run before the release tests, from a native build of the +host. +A test that has never failed has not been tested; the harnesses are in +\f[CR]tools/\f[R] and each can be run alone. diff --git a/src/share/man/man7/makronix-guide-cross.7 b/src/share/man/man7/makronix-guide-cross.7 new file mode 100644 index 0000000000..821ff0e74d --- /dev/null +++ b/src/share/man/man7/makronix-guide-cross.7 @@ -0,0 +1,91 @@ +.TH "MAKRONIX-GUIDE-CROSS" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Cross\-Building and the Source Tree +Makronix is built on NetBSD and on other systems. +The same tree, the same packages and the same release come out; the +difference is the toolchain that \f[CR]build.sh\f[R] builds first. +This chapter is for the person who works on that build, not for the +person who installs the result. +.SS What the build detects +\f[CR]tools/userland.sh\f[R] looks at \f[CR]uname \-s\f[R]. +On NetBSD it builds natively with the host\(aqs pkgsrc and installs into +the host\(aqs \f[CR]/usr/pkg\f[R]; on anything else it cross\-builds +with the toolchain and the sysroot in \f[CR]build/obj\f[R]. +The packages are the same either way; +\f[CR]tools/pkgsrc\-cross.mk.conf\f[R] is the only configuration that is +specific to the cross case, and \f[CR]pkgsrc/\f[R] is not patched. +.PP +The build\(aqs paths come from \f[CR]MAKRONIX_TOP\f[R]. +On a development machine that is the repository root; on an installed +system with the source set it is \f[CR]/usr/msrc\f[R]. +.SS The cross workarounds, and why they exist +Four settings in \f[CR]tools/pkgsrc\-cross.mk.conf\f[R] were each added +after a measured failure. +They are documented in \f[CR]docs/CROSS.md\f[R] in the source set; in +short: +.IP \(bu 2 +fonts/Xft2 runs a C++ probe it does not declare. +The cross configuration adds \f[CR]USE_LANGUAGES+= c c++\f[R], which +gives it a real compiler instead of pkgsrc\(aqs fail wrapper. +.IP \(bu 2 +fonts/Xft2 calls \f[CR]FT_GlyphSlot_Embolden\f[R] without the header +that declares it after FreeType moved it. +The build adds \f[CR]\-include freetype/ftsynth.h\f[R]. +This is a GCC\-14 strictness issue, not a cross issue; the native build +may need it too. +.IP \(bu 2 +pkgtools/x11\-links probes \f[CR]/usr\f[R] for X headers. +In a cross build that is the host\(aqs X, not the target\(aqs; the +configuration points it at \f[CR]${CROSS_DESTDIR}/usr/X11R7\f[R]. +.IP \(bu 2 +X\(aqs configure passes absolute \f[CR]/usr/X11R7/include\f[R] and +\f[CR]/usr/X11R7/lib\f[R], which do not resolve inside the sysroot. +The build adds the sysroot\-relative GCC form +\f[CR]\-I=/usr/X11R7/include\f[R] and \f[CR]\-L=/usr/X11R7/lib\f[R]. +.PP +Each setting has a removal criterion in \f[CR]docs/CROSS.md\f[R]: when +the package builds without it in both modes, it goes. +A workaround that outlives its cause is a bug with a comment. +.SS Forks and imported trees +What Makronix changes is a fork in \f[CR]ext/\f[R]; what it does not +change is imported and left alone. +The NetBSD tree is \f[CR]src/\f[R] with its base commit in +\f[CR]src/BASE\f[R]; the X tree is \f[CR]xsrc/\f[R] with +\f[CR]xsrc/BASE\f[R]; upstream for reading is \f[CR]refs/netbsd\f[R] and +\f[CR]refs/linux\f[R]. +The import of a fork is one commit of the upstream archive, and every +change after it is a visible diff. +.PP +MCDE is the largest fork. +Its build for the host is \f[CR]make mcde\-host\f[R]; its Linux build is +\f[CR]make mcde\-linux\f[R]. +The host build is what produces \f[CR]dtdocbook2infolib\f[R] and +\f[CR]dtinfo\f[R] for the documentation and for testing without a target +machine; the cross build for the release is part of +\f[CR]make userland\f[R]. +.SS The rules that keep it buildable +.IP \(bu 2 +A package that builds only on one host is broken. +Fix the recipe, the configuration in \f[CR]tools/\f[R], or the source in +\f[CR]ext/\f[R]; do not build it in a virtual machine. +.IP \(bu 2 +\f[CR]pkgsrc/\f[R] and \f[CR]refs/\f[R] are not edited. +A change is a moved pin, recorded in \f[CR]PINS\f[R], or a package of +our own. +.IP \(bu 2 +\f[CR]tools/\f[R] is POSIX shell: no bash, no Python, no transient +units. +A tool that only runs on the author\(aqs machine is not a tool. +.IP \(bu 2 +The set list is generated, not written: +\f[CR]tools/makronix\-set.sh\f[R] reads the installed tree back and +writes \f[CR]src/distrib/sets/lists/makronix/mi\f[R]. +A file that is installed but not in the list fails +\f[CR]checkflist\f[R]. +.SS Other platforms +\f[CR]make release ARCH=macppc\f[R] and the other architectures use the +same tree with a different target. +A platform is supported when its installation has been run to a login +prompt; the measured state is in \f[CR]docs/PLATFORMS.md\f[R]. +Cross building makes the compiler for that platform; it does not test +the firmware, the drivers or the desktop on it. +That is what the hardware is for. diff --git a/src/share/man/man7/makronix-guide-disks.7 b/src/share/man/man7/makronix-guide-disks.7 new file mode 100644 index 0000000000..2fb7dec623 --- /dev/null +++ b/src/share/man/man7/makronix-guide-disks.7 @@ -0,0 +1,141 @@ +.TH "MAKRONIX-GUIDE-DISKS" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Disks and Filesystems +NetBSD names disks by driver and number: \f[CR]sd0\f[R] is the first +SCSI or SATA disk, \f[CR]wd0\f[R] the first IDE disk, \f[CR]ld0\f[R] a +logical disk, \f[CR]cd0\f[R] a CD or DVD drive. +A partition is a letter after the disk: \f[CR]sd0a\f[R] is the first +partition of the first disk. +The raw device has an \f[CR]r\f[R] in front (\f[CR]rsd0a\f[R]); the +block device is the one you mount. +.SS Seeing what is there +.IP +.EX +$ dmesg | grep \-E \(aqsd|wd|cd\(aq +$ disklabel sd0 +$ df \-h +$ du \-sh /home/* +.EE +.PP +\f[CR]disklabel(8)\f[R] prints the partition table of a disk; +\f[CR]df(1)\f[R] shows what is mounted and how full it is. +A machine installed with the simple way has a GPT label and a root +partition that uses the whole disk; the full way can have an MBR label +and a NetBSD disklabel inside it, as NetBSD documents. +.SS Adding a disk +A new disk has no label until one is written. +The interactive editor is the safe way to look first: +.IP +.EX +# disklabel \-i sd1 +disklabel> p +disklabel> a +partition> a +offset> [Enter] +size> [Enter] +fstype> 4.2BSD +disklabel> w +disklabel> q +.EE +.PP +The partition table is written by \f[CR]w\f[R]; nothing happens before +it. +A GPT disk can be edited with \f[CR]gpt(8)\f[R] instead. +After the label, make a file system and mount it: +.IP +.EX +# newfs /dev/rsd1e +# mkdir \-p /data +# mount /dev/sd1e /data +.EE +.PP +The raw device is the one for \f[CR]newfs\f[R]. +A file system that should come back after a reboot belongs in +\f[CR]/etc/fstab\f[R]: +.IP +.EX +/dev/sd1e /data ffs rw 1 2 +.EE +.PP +\f[CR]newfs(8)\f[R] destroys what was on the partition. +Check the device name with \f[CR]disklabel\f[R] before you type it. +.SS Backing up a file system +\f[CR]dump(8)\f[R] and \f[CR]restore(8)\f[R] are the NetBSD pair for a +whole file system. +They preserve owners, modes and hard links, which \f[CR]cp\f[R] does +not: +.IP +.EX +# dump \-0 \-f /backup/root.dump / +# restore \-i \-f /backup/root.dump +.EE +.PP +For a directory, \f[CR]tar(1)\f[R] is enough, and a compressed archive +is easier to keep: +.IP +.EX +$ tar \-czf /backup/home.tar.gz /home +$ tar \-xzf /backup/home.tar.gz \-C / +.EE +.PP +A backup that has never been restored is a hope. +Restore one file from the archive before you trust it. +.SS Encrypted disks +An installation with encryption uses \f[CR]cgd(4)\f[R]. +The key is derived from a passphrase and stored in +\f[CR]/etc/cgd/\f[R]. +The installer writes it; the boot loader asks for the passphrase before +the root file system is mounted. +The unencrypted partition that the loader reads is \f[CR]/cgdboot\f[R]. +.PP +To encrypt another disk by hand, create the configuration, then the cgd +device, then a file system on it: +.IP +.EX +# cgdconfig \-g \-k argon2id \-o /etc/cgd/sd1e adiantum 256 +# cgdconfig cgd0 /dev/sd1e +/dev/sd1e\(aqs passphrase: +# newfs /dev/rcgd0a +# mount /dev/cgd0a /mnt +.EE +.PP +The exact partition letters and the choice of algorithm are the +administrator\(aqs; \f[CR]cgdconfig(8)\f[R] documents the parameters and +the verification methods. +A lost passphrase cannot be recovered; keep a copy of the configuration +in a safe place, not the passphrase. +.SS RAID, LVM and concatenation +NetBSD has three ways to combine disks. +Each has its own manual page and its own recovery rules, and each is a +decision to make before the data is on it: +.IP \(bu 2 +\f[CR]raidctl(8)\f[R] \(em RAIDframe, hardware\-independent RAID levels +0, 1, 5 and more. +The configuration is a file; the set must be assembled before the root +file system is mounted if it holds the root. +.IP \(bu 2 +\f[CR]lvm(8)\f[R] \(em logical volumes: physical volumes, a volume +group, logical volumes that can grow. +It is the flexible choice for a data disk. +.IP \(bu 2 +\f[CR]ccdconfig(8)\f[R] \(em concatenation and striping without +RAIDframe. +Simple, and with no redundancy. +.PP +Whichever you choose, the rule is the same: write the configuration +down, test that it comes back after a reboot, and only then put the data +on it. +A RAID set that has never been assembled from a cold boot is not yet a +backup. +.SS Checking a file system +\f[CR]fsck(8)\f[R] runs at boot on an unclean file system. +A file system that needs it by hand must be unmounted first: +.IP +.EX +# umount /data +# fsck \-f /dev/rsd1e +# mount /data +.EE +.PP +\f[CR]fsck \-n\f[R] only reports; it changes nothing. +The output names every repaired inode, and a file that was open during a +crash can end up in \f[CR]lost+found\f[R] at the top of the file system. diff --git a/src/share/man/man7/makronix-guide-dtinfo.7 b/src/share/man/man7/makronix-guide-dtinfo.7 new file mode 100644 index 0000000000..dcf491c2f3 --- /dev/null +++ b/src/share/man/man7/makronix-guide-dtinfo.7 @@ -0,0 +1,102 @@ +.TH "MAKRONIX-GUIDE-DTINFO" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH The Information Manager +\f[CR]dtinfo(1)\f[R] is MCDE\(aqs Information Manager. +It reads information libraries: directories of books, each with a table +of contents and a full\-text index. +The help pages of the MCDE programs are books in it, and so is this +guide. +.SS Opening the guide +The Makronix Guide is the default library of the Information Manager, so +\f[CR]dtinfo\f[R] opens it directly. +It is also in the Help menu of the MCDE programs and in the Makronix +menu. +From a terminal, the same: +.IP +.EX +$ dtinfo +$ dtinfo \-l makronix +.EE +.PP +The first command opens the default library; the second names the +library explicitly. +The library is installed as +\f[CR]/etc/dt/infolib/en_US.UTF\-8/makronix.dti\f[R]. +The session script \f[CR]/etc/dt/config/Xsession.d/0000makronix\f[R] +sets \f[CR]DTINFOLIBDEFAULT\f[R] to \f[CR]makronix\f[R], which is why +the plain command works. +.SS Reading and searching +The window has a list of the books in the library and the table of +contents of the selected book. +A click on a chapter opens it; the navigation buttons go back and +forward in the history, and the table of contents stays available while +you read. +The search field searches the whole library, not only the open chapter; +the results are shown with the book and section they come from, and a +click opens the result in place. +.PP +The guide is one book with a chapter for every part of the system. +The chapters are the same text as the manual pages and the PDF; the +Information Manager adds the search and the links between them. +.SS What an information library is +An information library is a directory whose name ends in +\f[CR].dti\f[R]. +It contains a \f[CR]bookcase.map\f[R] that names the library and its +bookcases, one directory per bookcase with the compiled books, and a +\f[CR]dtsearch\f[R] directory with the full\-text index. +The books are written in DocBook, the SGML dialect that CDE\(aqs +documentation uses, and compiled with \f[CR]dtdocbook2infolib\f[R]. +.PP +The Makronix Guide is built from \f[CR]docs/guide/book.xml\f[R] in the +source tree. +The same source produces the manual pages, the PDF, the HTML file and +this library; ??? +explains the build. +If you change the guide, rebuild it with: +.IP +.EX +$ cd /usr/msrc +$ sh docs/guide/build.sh all +$ sh docs/guide/build.sh install +.EE +.PP +The first command builds all four forms in \f[CR]docs/guide/out\f[R]; +the second copies them to the places the system reads: +\f[CR]/usr/share/doc/makronix\f[R], \f[CR]/usr/share/man/man7\f[R] and +\f[CR]/etc/dt/infolib\f[R]. +.SS Adding another library +A library that someone gives you is a directory ending in +\f[CR].dti\f[R]. +Put it under the locale directory of the system library and name it on +the command line: +.IP +.EX +# cp \-R example.dti /etc/dt/infolib/en_US.UTF\-8/ +$ dtinfo \-l example +.EE +.PP +The library\(aqs own \f[CR]bookcase.map\f[R] names its bookcases; +\f[CR]dtinfo\f[R] reads that file, so the directory name and the short +name in the map are what matter. +A library for one user can live in \f[CR]\(ti/.dt/infolib\f[R]; the +search path finds it there as well. +.SS When the Information Manager is empty +If \f[CR]dtinfo\f[R] starts but shows no books, the library was not +found. +Check the three things it depends on: +.IP \(bu 2 +\f[CR]/etc/dt/infolib/en_US.UTF\-8/makronix.dti/bookcase.map\f[R] exists +and is readable. +.IP \(bu 2 +\f[CR]DTINFOLIBDEFAULT\f[R] is \f[CR]makronix\f[R] in the session +(\f[CR]echo $DTINFOLIBDEFAULT\f[R]). +.IP \(bu 2 +\f[CR]DTINFOLIBSEARCHPATH\f[R] contains +\f[CR]/etc/dt/infolib/%L/%I.dti\f[R]. +The command \f[CR]dtsearchpath\f[R] prints the assembled path; run it in +the session that has the problem. +.PP +A library that was copied from another machine can have a stale search +index. +Rebuilding it with \f[CR]dtdocbook2infolib\f[R] is described in the +DocBook chapter of the CDE documentation; for the Makronix Guide, +\f[CR]docs/guide/build.sh infolib\f[R] does it. diff --git a/src/share/man/man7/makronix-guide-firewall.7 b/src/share/man/man7/makronix-guide-firewall.7 new file mode 100644 index 0000000000..236da4de54 --- /dev/null +++ b/src/share/man/man7/makronix-guide-firewall.7 @@ -0,0 +1,101 @@ +.TH "MAKRONIX-GUIDE-FIREWALL" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH The Firewall +Makronix turns on NetBSD\(aqs packet filter, \f[CR]npf(7)\f[R], and +installs a rule set that lets nothing in that the machine did not ask +for. +Outgoing connections work, their replies come back, DHCP and IPv6 +set\-up work, ping works, SSH works and the local network names work. +Everything else is blocked. +.SS The default rule set +\f[CR]/etc/npf.conf\f[R] on a freshly installed machine is the +following. +It is the rule set that the installer writes and that +\f[CR]/usr/src/docs/reference/npf\-default.conf\f[R] records for +validation: +.IP +.EX +alg \(dqicmp\(dq + +group default { + pass final on lo0 all + + # out: everything, with the replies + pass stateful out final all + + # DHCP replies (a broadcast, so no state) and IPv6 set\-up + pass in final proto udp from any port 67 to any port 68 + pass final family inet6 proto ipv6\-icmp all + + # ping + pass stateful in final family inet4 proto icmp all + + # remote login + pass stateful in final proto tcp to any port ssh + + # mDNS and DNS\-SD (mdnsd): the multicast announcements, port 5353 + pass in final proto udp to any port 5353 + + block in final all +} +.EE +.PP +Read it from the bottom up: everything that arrives is blocked unless an +earlier rule lets it in. +The rules above it are the exceptions. +\f[CR]stateful\f[R] means that the reply to a connection the machine +started is allowed without a rule of its own. +.SS Opening one port +A service that should be reachable from the network needs a rule above +the final block. +For a web server on port 80, add this line before +\f[CR]block in final all\f[R]: +.IP +.EX + pass stateful in final proto tcp to any port 80 +.EE +.PP +Then check the file and reload the running rule set. +A rule set with a syntax error must not be loaded; +\f[CR]npfctl validate\f[R] reads the file without touching the running +one: +.IP +.EX +# npfctl validate /etc/npf.conf +# /etc/rc.d/npf reload +# npfctl show +# npfctl stats +.EE +.PP +\f[CR]npfctl show\f[R] prints the rules that are active, after the +variables and groups have been expanded. +If the line you added is not there, the reload did not happen; the +console and \f[CR]/var/log/messages\f[R] say why. +.SS The firewall at boot +The service is enabled in \f[CR]/etc/rc.conf\f[R]: +.IP +.EX +npf=YES +.EE +.PP +At boot, \f[CR]npf\f[R] loads \f[CR]/etc/npf.conf\f[R] before the +network is up. +A machine that boots without a rule set is a machine that is open for +the time it takes to notice. +After a change, reload rather than restart; the existing connections +survive a reload. +.SS NAT and a router +A machine that routes between two networks needs NAT and forwarding. +The rules are in \f[CR]npf.conf(5)\f[R]; the shape is a \f[CR]map\f[R] +line for the outgoing interface and \f[CR]pass\f[R] rules for the two +directions. +Forwarding itself is a \f[CR]sysctl(8)\f[R] setting: +.IP +.EX +# sysctl \-w net.inet.ip.forwarding=1 +# echo \(aqnet.inet.ip.forwarding=1\(aq >> /etc/sysctl.conf +.EE +.PP +A router is a machine with two interfaces and a rule set that describes +both directions. +Do not enable forwarding on a desktop that has one interface; it has +nothing to forward between. diff --git a/src/share/man/man7/makronix-guide-glossary.7 b/src/share/man/man7/makronix-guide-glossary.7 new file mode 100644 index 0000000000..a72173c7f8 --- /dev/null +++ b/src/share/man/man7/makronix-guide-glossary.7 @@ -0,0 +1,83 @@ +.TH "MAKRONIX-GUIDE-GLOSSARY" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Appendix B: Glossary +The words this guide uses in a particular sense. +.TP +base system +What NetBSD\(aqs build produces and Makronix ships in the NetBSD sets: +the kernel, the C library, the userland, the X server and the manual +pages. +It is not in the package database. +.TP +CDE +The Common Desktop Environment, the Motif desktop that Sun, HP, IBM, DEC +and others shipped. +MCDE is its fork. +.TP +cgd +NetBSD\(aqs cryptographic disk driver. +An encrypted installation is a cgd over the root file system. +.TP +cross build +Building for one machine on another. +Makronix\(aqs build cross\-builds when the host is not NetBSD and builds +natively when it is. +.TP +disklabel +The partition table NetBSD keeps on a disk. +A GPT label is the modern form; an MBR label with a NetBSD disklabel +inside it is the older one. +.TP +dtinfo +The MCDE Information Manager: the program that reads information +libraries and displays their books. +.TP +dtlogin +The MCDE login screen. +It starts the X server and the session. +.TP +information library +A directory ending in \f[CR].dti\f[R] that holds a bookcase, its books +and the full\-text index. +The Makronix Guide is one. +.TP +makronix set +The packages that Makronix ships on the medium and unpacks as part of +the system. +MCDE is in it. +It is not registered with \f[CR]pkg_add\f[R]. +.TP +MCDE +The Makronix Common Desktop Environment: the fork of CDE that is +Makronix\(aqs desktop. +.TP +Motif +The widget toolkit CDE and MCDE are written against. +.TP +msrc +The Makronix source set: the tools, the documentation, pkgsrc, the +distfiles and the pins, installed in \f[CR]/usr/msrc\f[R]. +.TP +npf +NetBSD\(aqs packet filter, the firewall Makronix enables by default. +.TP +pkgsrc +The package system that supplies \f[CR]/usr/pkg\f[R]: a tree of recipes, +the package tools, and binary repositories. +.TP +release +Everything a version of Makronix consists of: the sets, the kernels, the +media and the name. +0.99.10 is \(lqCamouflage\(rq. +.TP +set +A group of files that the installer can select: the base sets, the X +sets, the games and the source sets. +The \(lqmakronix\(rq set is the desktop and its programs. +.TP +sysinst +The installer. +Makronix\(aqs fork has a simple way and the full NetBSD way. +.TP +wsrc +The group that may write the source tree, so that a user can rebuild the +system without becoming root. diff --git a/src/share/man/man7/makronix-guide-help.7 b/src/share/man/man7/makronix-guide-help.7 new file mode 100644 index 0000000000..d1a120ae62 --- /dev/null +++ b/src/share/man/man7/makronix-guide-help.7 @@ -0,0 +1,48 @@ +.TH "MAKRONIX-GUIDE-HELP" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Appendix A: Getting Help +A Unix system documents itself. +The order that works is: the manual page for the command, the file in +\f[CR]/usr/share/doc\f[R], the source, then the network. +The network is last because it is the only one that may be wrong about +your version. +.SS The manual pages +\f[CR]man\f[R] is described in ???. +The pages that are worth reading before anything else are: +.IP \(bu 2 +\f[CR]afterboot(8)\f[R] \(em what to do after the first boot; +.IP \(bu 2 +\f[CR]intro(8)\f[R] \(em the system administration commands and how they +fit; +.IP \(bu 2 +\f[CR]hier(7)\f[R] \(em the file system layout; +.IP \(bu 2 +\f[CR]pkgsrc(7)\f[R] \(em pkgsrc and the package tools; +.IP \(bu 2 +\f[CR]rc.conf(5)\f[R] \(em the services; +.IP \(bu 2 +\f[CR]npf.conf(5)\f[R] \(em the firewall. +.SS The web and the source +The NetBSD project\(aqs documentation is the reference for the parts +Makronix inherited: \f[CR]https://www.NetBSD.org/docs/\f[R], the NetBSD +Guide and the manual pages online. +For Makronix itself, the source tree is the last word: +\f[CR]/usr/msrc\f[R] holds the guide, the tools, the build contract and +the records of what was measured. +.PP +When you ask for help, give the version (\f[CR]uname \-a\f[R]), the +command you ran, what you expected and what happened. +The output of \f[CR]dmesg\f[R] and the relevant lines of +\f[CR]/var/log/messages\f[R] are worth more than a description. +.SS This guide in its four forms +.IP \(bu 2 +\f[CR]man makronix\-guide\f[R] lists the chapters; each chapter is a +page in section 7. +.IP \(bu 2 +\f[CR]/usr/share/doc/makronix/makronix\-guide.pdf\f[R] is the printable +form. +.IP \(bu 2 +\f[CR]/usr/share/doc/makronix/makronix\-guide.html\f[R] is one file and +opens in any browser. +.IP \(bu 2 +\f[CR]dtinfo\f[R] opens the same text in the MCDE Information Manager, +with search. diff --git a/src/share/man/man7/makronix-guide-install.7 b/src/share/man/man7/makronix-guide-install.7 new file mode 100644 index 0000000000..632954683c --- /dev/null +++ b/src/share/man/man7/makronix-guide-install.7 @@ -0,0 +1,126 @@ +.TH "MAKRONIX-GUIDE-INSTALL" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Installing Makronix +The installer is \f[CR]sysinst(8)\f[R], Makronix\(aqs fork of +NetBSD\(aqs installer. +It has two ways: the simple way, which decides as much as it can, and +the full way, which is NetBSD\(aqs installation with every question. +Both install the same system. +.SS Starting the installer +Start the machine from the medium. +On a machine with UEFI, choose the stick or the DVD in the firmware\(aqs +boot menu; on a Mac, hold \f[CR]Option\f[R] while it starts. +On a BIOS machine, set the boot order or press the firmware\(aqs +boot\-menu key. +The installer starts from the medium and runs in memory, so the medium +can be removed once the installation has begun. +.PP +The first questions are the language and the keyboard layout. +They apply to the installer only; the installed system gets its keyboard +layout from the desktop settings. +.SS The simple way +.IP "1." 3 +\f[I]Choose the installation type.\f[R] The simple way is the first +choice. +The full way is \(lqInstall NetBSD\(rq and is described in The full way. +.IP "2." 3 +\f[I]Choose the disk.\f[R] The installer lists the disks it found. +Choosing one erases every partition on it. +If the machine has more than one disk, unplug the one you want to keep +before you start; that is safer than reading the list twice. +.IP "3." 3 +\f[I]Decide about encryption.\f[R] If you say yes, the installer +encrypts the root file system with \f[CR]cgd(4)\f[R] and asks for the +passphrase twice. +The passphrase is asked for at every boot. +If you say no, the disk is installed in clear text. +.IP "4." 3 +\f[I]The installer partitions the disk and unpacks the sets.\f[R] It +installs the base system, the \(lqmakronix\(rq set (the desktop and its +programs) and, when the medium carries them, the source sets. +It asks whether to install the games; the default is yes. +.IP "5." 3 +\f[I]Answer the configuration forms.\f[R] The installer asks for the +computer\(aqs name, the network (Ethernet with DHCP, or Wi\-Fi and its +passphrase), the time zone, the administrator\(aqs password and your +account. +These are the answers from ???. +.IP "6." 3 +\f[I]Reboot.\f[R] Remove the medium. +The machine starts into \f[CR]dtlogin(1)\f[R], the MCDE login screen. +.PP +The installer sets up more than the account: SSH is enabled, time +synchronisation is enabled, a firewall (npf) lets in SSH and the replies +to outgoing traffic, and the machine answers to \f[CR].local\f[R] +on the local network. +.PP +\f[I]Note:\f[R] the simple way uses the whole disk. +It does not preserve another operating system. +If the machine must keep one, use the full way and partition by hand. +.SS The full way +The full way is the NetBSD installation. +It asks for the partition table (MBR or GPT), the NetBSD disklabel, the +sets, the network and the time zone, and it writes the boot blocks. +The procedure is the one in The NetBSD Guide, chapter \(lqExample +installation\(rq; the questions and their meanings are NetBSD\(aqs, and +the installer\(aqs manual page is \f[CR]sysinst(8)\f[R]. +.PP +Two Makronix details matter in the full way: +.IP \(bu 2 +Choose the \(lqmakronix\(rq set as well as the base sets. +Without it there is no desktop, no \f[CR]dtlogin\f[R] and no MCDE +programs. +.IP \(bu 2 +The \(lqNext CD\(rq menu asks for the next medium when a set is not on +the current one. +A DVD or a USB image does not need it. +.SS An encrypted system +With encryption, the disk holds one \f[CR]cgd\f[R] partition with the +root file system, and a small unencrypted partition that the boot loader +can read: the kernel, \f[CR]cgdroot.kmod\f[R] and \f[CR]cgd.conf\f[R]. +The loader asks for the passphrase, unlocks the disk and starts the +kernel from the encrypted root. +.PP +The unencrypted partition is mounted as \f[CR]/cgdboot\f[R] (with +\(lqnoauto\(rq in \f[CR]/etc/fstab\f[R]). +A kernel update on an encrypted system is not complete until the new +kernel and the matching \f[CR]cgdroot.kmod\f[R] are copied to it; ??? +gives the commands. +.SS The first boot +The login screen is MCDE\(aqs \f[CR]dtlogin\f[R]. +Log in with the account you created; the desktop starts with the front +panel, the bar at the top and the workspace controls. +??? +explains what you are looking at. +.PP +Open a terminal and check the machine: +.IP +.EX +$ ifconfig \-a +$ netstat \-rn +$ date +$ ps \-ax | grep \-E \(aqdhcpcd|ntpd|dtlogin\(aq +.EE +.PP +If the network is not up, \f[CR]dhcpcd\f[R] can be started by hand; if +the clock is wrong, \f[CR]ntpd\f[R] needs a reachable server. +Both are services in \f[CR]/etc/rc.conf\f[R]; see ???. +.PP +Change the administrator\(aqs password and your own with +\f[CR]passwd(1)\f[R]. +The account is in the wheel group, so \f[CR]su\f[R] works; use it for +administrative commands, as the rest of this guide does. +.SS When the installation does not start +.IP \(bu 2 +\f[I]The firmware does not offer the stick.\f[R] Write the image again +to a different stick and compare its checksum. +On a UEFI machine, disable \(lqSecure Boot\(rq for the installation; on +a Mac, the stick must be formatted by the image, not copied as a file. +.IP \(bu 2 +\f[I]The machine starts, then stops with a mount or unpacking +error.\f[R] The medium is bad or the disk is failing. +Check the medium\(aqs checksum and try another disk. +.IP \(bu 2 +\f[I]The installed machine does not start.\f[R] Start from the medium +again and choose the shell, then inspect the disk with +\f[CR]disklabel\f[R] and mount the root partition by hand. +The boot messages are on the console; \f[CR]dmesg\f[R] repeats them. diff --git a/src/share/man/man7/makronix-guide-license.7 b/src/share/man/man7/makronix-guide-license.7 new file mode 100644 index 0000000000..dad1dee44b --- /dev/null +++ b/src/share/man/man7/makronix-guide-license.7 @@ -0,0 +1,55 @@ +.TH "MAKRONIX-GUIDE-LICENSE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Appendix C: Licence and Sources +A guide is a derived work too. +This one follows the structure of The NetBSD Guide and uses its general +NetBSD procedures; the Makronix text, the MCDE chapter and the four +output forms are Makronix\(aqs. +.SS Makronix +The Makronix text and the tools in this tree are under the CNCL 1.0 +(Could Not Care Less), the licence at the top of the tree in +\f[CR]LICENSE\f[R]. +In short: do what you like with it, and do not blame the authors. +.SS The NetBSD Guide and NetBSD +The structure of this guide and the general NetBSD procedures follow The +NetBSD Guide, Copyright (c) 1998\-2026 The NetBSD Foundation, Inc., +which is distributed under the BSD 2\-clause licence. +NetBSD\(aqs source, which Makronix is built from, keeps its BSD licence +and its copyright notices. +The NetBSD Guide is at \f[CR]https://www.NetBSD.org/docs/guide/en/\f[R]. +.SS CDE and MCDE +MCDE is a fork of CDE, the Common Desktop Environment. +CDE is Copyright (c) 1993\-2012 The Open Group and is distributed under +the GNU Lesser General Public License, version 2 or later. +The MCDE changes keep that licence; the MCDE source is in +\f[CR]ext/src/mcde\f[R] in the source tree. +.PP +The Hack font, which MCDE uses for the terminal and the login screen, is +by Source Foundry and is distributed under the MIT licence. +.SS The book format +The guide\(aqs source is DocBook XML 4.5. +The DocBook DTD is Copyright (c) 1992\-2006 OASIS and is distributed +under the OASIS licence. +The MCDE Information Manager reads the older DocBook SGML dialect that +CDE\(aqs tools define; the guide\(aqs build converts the XML to that +dialect for the library. +.SS The sources of this guide +.IP \(bu 2 +\f[CR]docs/guide/book.xml\f[R] and \f[CR]docs/guide/chapters/\f[R] \(em +the text. +.IP \(bu 2 +\f[CR]docs/guide/build.sh\f[R] \(em the build of the four forms. +.IP \(bu 2 +\f[CR]docs/guide/tools/docbook\-to\-cde.lua\f[R] \(em the DocBook XML to +CDE SGML writer. +.IP \(bu 2 +\f[CR]docs/logo/\f[R] \(em the logo. +.IP \(bu 2 +\f[CR]www/style.css\f[R] \(em the Camouflage palette that the guide\(aqs +colours follow. +.PP +The Makronix Guide is installed as manual pages from +\f[CR]makronix\-guide(7)\f[R], as +\f[CR]/usr/share/doc/makronix/makronix\-guide.pdf\f[R], as +\f[CR]/usr/share/doc/makronix/makronix\-guide.html\f[R] and as an +information library in +\f[CR]/etc/dt/infolib/en_US.UTF\-8/makronix.dti\f[R]. diff --git a/src/share/man/man7/makronix-guide-mailweb.7 b/src/share/man/man7/makronix-guide-mailweb.7 new file mode 100644 index 0000000000..4cac1c6b78 --- /dev/null +++ b/src/share/man/man7/makronix-guide-mailweb.7 @@ -0,0 +1,65 @@ +.TH "MAKRONIX-GUIDE-MAILWEB" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Mail and the Web +Two services that a small machine often provides: a mail transfer agent +that delivers local mail, and a web server that serves a directory. +Both are NetBSD base services; Makronix ships the clients and the +desktop programs that read the results. +.SS Mail +The base system\(aqs mail transfer agent is Postfix. +A desktop that only needs local mail \(em the daily security report, +cron\(aqs output, the messages of the package tools \(em runs it with +the default configuration and reads the mail with \f[CR]mail\f[R] or +MCDE\(aqs \f[CR]dtmail(1)\f[R]: +.IP +.EX +# echo \(aqpostfix=YES\(aq >> /etc/rc.conf +# /etc/rc.d/postfix start +$ mail +.EE +.PP +\f[CR]/etc/postfix/main.cf\f[R] is the configuration. +A machine that should accept mail from the network sets +\f[CR]inet_interfaces\f[R] and a proper \f[CR]myhostname\f[R], and needs +a DNS name with an MX record. +That is a mail server, not a desktop; the NetBSD Guide\(aqs mail chapter +and the Postfix documentation describe the decisions, and the firewall +chapter describes the port that has to be opened. +.PP +Local mail is delivered to \f[CR]/var/mail/\f[R]. +If mail does not arrive, read \f[CR]/var/log/maillog\f[R]; Postfix +writes there, and \f[CR]postfix check\f[R] reports a configuration that +it cannot use. +.SS A web server +The base system\(aqs HTTP server is \f[CR]bozohttpd(8)\f[R], installed +as \f[CR]httpd\f[R]. +It serves one directory, which is enough for a documentation page or a +small site: +.IP +.EX +# echo \(aqhttpd=YES\(aq >> /etc/rc.conf +# echo \(aqhttpd_flags=\(dq\-b /var/www\(dq\(aq >> /etc/rc.conf +# /etc/rc.d/httpd start +$ curl http://localhost/ +.EE +.PP +\f[CR]/var/www\f[R] is the document root; the index file is +\f[CR]index.html\f[R]. +A server that needs CGI, PHP, TLS or virtual hosts should use a package: +nginx or apache, with their own documentation and their own service +scripts. +.PP +TLS needs a certificate. +For a public name, the certificate authority\(aqs client (for example +certbot) obtains and renews it; for a name that only the local network +uses, a self\-signed certificate is enough, and every client has to be +told to trust it. +A certificate that has expired is the most common reason a site that +worked yesterday does not work today. +.SS The desktop clients +Firefox reads the web, Thunderbird reads mail and news, and +\f[CR]dtmail\f[R] reads local mail in the MCDE style. +All three are on the medium as packages; the installer can put them on +the machine, and \f[CR]pkg_add\f[R] installs them later (???). +Their settings belong to the user, not to the system, and live under +\f[CR]\(ti/.mozilla\f[R], \f[CR]\(ti/.thunderbird\f[R] and +\f[CR]\(ti/.dt\f[R]. diff --git a/src/share/man/man7/makronix-guide-mcde.7 b/src/share/man/man7/makronix-guide-mcde.7 new file mode 100644 index 0000000000..2a775d8988 --- /dev/null +++ b/src/share/man/man7/makronix-guide-mcde.7 @@ -0,0 +1,183 @@ +.TH "MAKRONIX-GUIDE-MCDE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH MCDE: The Desktop +MCDE is the Makronix Common Desktop Environment, a fork of CDE 2.5.3. +CDE is the desktop that Sun, HP, IBM, DEC, SCO, Fujitsu and Hitachi +shipped on their workstations, and it has been open source since 2012. +MCDE keeps what made it good \(em Motif, a quick and steady desktop that +does not need a fast machine \(em and makes it one desktop that works as +a whole. +.PP +MCDE is written in C99 against Motif, Xlib and X11. +It uses no other toolkit and no compositor, and it builds and runs on +NetBSD and on Linux through pkgsrc on both. +Everything that differs between the operating systems \(em users, +network, sound \(em is behind one layer, so that no program has to know +which system it runs on. +.SS Logging in +The graphical login is \f[CR]dtlogin(1)\f[R]. +It shows the users of the machine and a field for the password; the +Options menu chooses the session type and the language. +After login, \f[CR]dtsession(1)\f[R] starts the session: the window +manager, the front panel, the bar at the top and the programs that are +set to open at login. +.PP +Lock Screen in the Makronix menu locks the session without ending it; +Log Out ends it and returns to \f[CR]dtlogin\f[R]. +A session can be saved on logout and restored at the next login; the +setting is in System Settings, under Login. +.SS The bar at the top +One bar runs along the top of the screen. +On the left is the Makronix menu: about this computer, software update, +system settings, your favourites and recent items, force quit, sleep, +restart, shut down, lock the screen and log out. +Next to it are the menus of the program you are working with. +They leave the program\(aqs window and stand in the bar, for every MCDE +program, without a change to the program itself. +.PP +On the right are the status items: the volume (a slider in the menu, a +mute switch, and the wheel over the speaker), Bluetooth, the network, +the battery on a machine that has one, and the clock. +.SS The front panel +CDE\(aqs front panel stays as it is: the controls in the middle, the +drawers above them, the workspace switches, and the trash. +Left of the trash the panel shows the programs that are open and have no +place in the panel yet; a click brings the window forward. +The right button keeps one in the panel, or you can drag it to the left; +from then on it is there at every login. +A click starts it, or brings it forward when it is already running. +.PP +The workspaces are in the middle of the panel. +A window can be sent to another workspace from its window menu; the +panel\(aqs workspace buttons switch between them. +The number of workspaces is set in the window manager\(aqs settings. +.SS Windows and the window manager +\f[CR]dtwm(1)\f[R] draws the frames. +The title bar has the window menu on the left and the minimize and +maximize buttons on the right; the window menu moves, resizes, raises, +lowers, sends the window to a workspace, or closes it. +A double click on the title bar maximizes the window. +.PP +The window manager\(aqs configuration is \f[CR]\(ti/.dt/dtwmrc\f[R]; +without it, the system file \f[CR]/usr/pkg/dt/config/C/sys.dtwmrc\f[R] +applies. +The menu that appears on the root window (the desktop) is defined there. +Most people never edit it: the settings that matter are in System +Settings. +.SS The file manager +\f[CR]dtfile(1)\f[R] is the file manager. +A toolbar has Back and Forward \(em every window keeps its own history +\(em and the views. +A sidebar holds the places: the computer, your home, the desktop, +documents and downloads, and the free space of the disk is in the status +line. +.PP +The column view shows one column for each folder down to the one you are +in, and on the right what you selected: its icon, kind, size and date. +Files are copied and moved by dragging them; the trash is on the front +panel. +The file manager also shows network places when the sharing services are +configured (???). +.SS The terminal +\f[CR]dtterm(1)\f[R] is the terminal. +It has tabs: \f[CR]Ctrl+Shift+T\f[R] opens one, \f[CR]Ctrl+Shift+W\f[R] +closes it, and \f[CR]Ctrl+Shift+Left\f[R] and +\f[CR]Ctrl+Shift+Right\f[R] move between them. +A program\(aqs title appears on its tab, and the window title is the +title of the tab in front. +A profile gives a tab its font, its colours and its command (Window, New +Tab with Profile). +\f[CR]Ctrl+Shift+D\f[R] splits a tab and puts another terminal below it. +Started as \f[CR]dtterm \-dropdown\f[R], the terminal waits out of sight +and comes down from the top of the screen at \f[CR]F12\f[R]; the next +press puts it back. +.PP +The terminal draws anti\-aliased UTF\-8 text in the Hack font, and falls +back to another font for characters Hack does not have. +The shell inside it is the login shell of your account; on a fresh +account it is \f[CR]sh(1)\f[R]. +.SS The other programs +.TP +\f[CR]dtpad(1)\f[R] +The text editor. +It edits plain text, has a search and replace, and opens several files +in one window. +.TP +\f[CR]dtcalc(1)\f[R] +The calculator: a normal calculator, a scientific one and a +programmer\(aqs one, in one window. +.TP +\f[CR]dtpaint\f[R] +The paint program: lines, curves, shapes, fill, text and zoom, in the +colours of the release. +It is for pictures drawn by hand; a raster editor for photographs is +being made. +.TP +\f[CR]dtlaunch\f[R] +The launcher, opened with \f[CR]Alt+Space\f[R]. +Type a few letters to find a program; type a keyword to find a text +snippet; leave the field empty to see what you copied last; type +\f[CR]=12*(3+4)\f[R] and it shows 84. +Return starts the program or puts the text on the clipboard. +Snippets live in \f[CR]\(ti/.dt/snippets\f[R]. +.TP +\f[CR]dtinfo(1)\f[R] +The Information Manager: books and help pages, including this guide. +??? +is its chapter. +.SS System Settings +\f[CR]dtsystemsettings\f[R] is one window for every setting of the +computer. +It has four rows of icons \(em personal, hardware, internet and network, +system \(em and a click opens a setting in the same window; Show All +goes back. +.PP +It draws the colours (every palette with its colours), the font of every +window, the backdrop (a picture, or a folder of pictures that change by +themselves) and the screen saver, the keyboard and the mouse, sound, the +network and the Wi\-Fi networks in reach, Bluetooth, the date, time and +time zone, the accounts of the people who use the computer, the software +update and the facts about the computer. +It also decides what happens at login: the session and the programs that +open by themselves. +.PP +Changing an account, the network or the software update asks for the +administrator\(aqs password. +The settings that belong to one user are stored in \f[CR]\(ti/.dt\f[R]; +the ones that belong to the machine are in \f[CR]/etc/dt\f[R] and +\f[CR]/usr/pkg/dt/config\f[R]. +.SS Colours, fonts and the palette +A Makronix release is named after a CDE palette, and the desktop starts +in that palette. +For 0.99.10 it is \(lqCamouflage\(rq: the background is a grey\-green, +the panels are olive and grey\-green, and the title bars are a deep +green. +The palette is a plain file, +\f[CR]/usr/pkg/dt/share/palettes/Camouflage.dp\f[R], and System Settings +shows every installed palette with its colours before you choose it. +.PP +Fonts are set the same way. +MCDE ships Hack, an open source monospace font, and uses it for the +terminal and the login screen; the rest of the desktop uses the system +font, which System Settings can change. +Anti\-aliasing is on by default and can be turned off for a machine that +is too slow for it. +.SS The session and your files +Everything that belongs to your desktop is under \f[CR]\(ti/.dt\f[R]: +the session, the panel layout, the menus, the snippets, the backdrop +choice and the settings of the programs. +Removing a file there resets that part of the desktop at the next login; +removing the whole directory gives you a fresh desktop, without touching +your documents. +.PP +The session manager can save the programs that are open when you log out +and start them again at the next login. +The setting is in System Settings under Login. +A program that should always start belongs in the session, not in a +shell startup file: the session is what the desktop restores. +.SS Help +Every MCDE program has a Help menu; it opens the program\(aqs help page +in the Information Manager. +The Information Manager also holds this guide, which is the place to +start when the question is about the system rather than about one +program. +The next chapter explains how to open it and how to search in it. diff --git a/src/share/man/man7/makronix-guide-network.7 b/src/share/man/man7/makronix-guide-network.7 new file mode 100644 index 0000000000..3283dd6320 --- /dev/null +++ b/src/share/man/man7/makronix-guide-network.7 @@ -0,0 +1,98 @@ +.TH "MAKRONIX-GUIDE-NETWORK" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Networking +NetBSD\(aqs network configuration is small and explicit: an interface is +configured with \f[CR]ifconfig\f[R], an address can come from DHCP, and +the routes and the resolver are plain files. +Makronix\(aqs installer writes the files for the network you chose; this +chapter is for changing them later. +.SS Interfaces and addresses +.IP +.EX +$ ifconfig \-a +$ netstat \-rn +$ cat /etc/resolv.conf +.EE +.PP +The name of an interface is the driver\(aqs: \f[CR]wm0\f[R] for an Intel +Ethernet, \f[CR]re0\f[R] for a Realtek, \f[CR]ath0\f[R] or +\f[CR]urtwn0\f[R] for Wi\-Fi, \f[CR]lo0\f[R] for the loopback. +An address from DHCP is requested by \f[CR]dhcpcd(8)\f[R]: +.IP +.EX +# dhcpcd wm0 +# /etc/rc.d/dhcpcd restart +.EE +.PP +The service reads \f[CR]/etc/rc.conf\f[R]; with \f[CR]dhcpcd=YES\f[R] it +configures every interface that is not configured by a fixed file at +boot. +.SS A fixed address +A machine that should have the same address every time does not need +DHCP. +The address belongs in \f[CR]/etc/ifconfig.\f[R]: +.IP +.EX +inet 192.168.1.20/24 +.EE +.PP +The default route is \f[CR]/etc/mygate\f[R]: +.IP +.EX +192.168.1.1 +.EE +.PP +and the resolver is \f[CR]/etc/resolv.conf\f[R]: +.IP +.EX +nameserver 192.168.1.1 +nameserver 9.9.9.9 +.EE +.PP +Set \f[CR]dhcpcd=NO\f[R] for that interface, or leave the service off +entirely. +The name of the machine is in \f[CR]/etc/myname\f[R]; the local names +are in \f[CR]/etc/hosts\f[R]: +.IP +.EX +127.0.0.1 localhost +192.168.1.20 studio.example studio +.EE +.SS Wi\-Fi +A Wi\-Fi interface needs its network and passphrase before DHCP can run. +\f[CR]wpa_passphrase(8)\f[R] writes the configuration: +.IP +.EX +# wpa_passphrase \(dqnetwork\-name\(dq \(dqthe passphrase\(dq > /etc/wpa_supplicant.conf +# chmod 600 /etc/wpa_supplicant.conf +# ifconfig ath0 up +# wpa_supplicant \-B \-i ath0 \-c /etc/wpa_supplicant.conf +# dhcpcd ath0 +.EE +.PP +The service configuration is: +.IP +.EX +wpa_supplicant=YES +wpa_supplicant_flags=\(dq\-B \-i ath0 \-c /etc/wpa_supplicant.conf\(dq +dhcpcd=YES +.EE +.PP +The MCDE System Settings network pane lists the networks in reach and +asks for the passphrase; it writes the same files. +A USB Wi\-Fi adapter is a second interface with its own name; use that +name in the commands above. +.SS Testing +.IP +.EX +$ ping \-c 3 192.168.1.1 +$ ping \-c 3 www.NetBSD.org +$ route \-n get default +$ netstat \-an | grep LISTEN +.EE +.PP +If the first ping works and the second does not, the address and the +route are fine and the resolver or the uplink is not. +If neither works, the interface is down or the cable is not in the right +port. +\f[CR]dmesg\f[R] names the interface the driver found, and +\f[CR]ifconfig\f[R] shows whether it has an address. diff --git a/src/share/man/man7/makronix-guide-pkgsrc.7 b/src/share/man/man7/makronix-guide-pkgsrc.7 new file mode 100644 index 0000000000..befc8a1d24 --- /dev/null +++ b/src/share/man/man7/makronix-guide-pkgsrc.7 @@ -0,0 +1,97 @@ +.TH "MAKRONIX-GUIDE-PKGSRC" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Packages and pkgsrc +Makronix has two kinds of software: what NetBSD\(aqs build puts in the +base system, and what pkgsrc installs under \f[CR]/usr/pkg\f[R]. +The desktop, Firefox, Thunderbird and the games are pkgsrc packages. +The package tools are NetBSD\(aqs; the packages on the medium are built +for Makronix or taken from the NetBSD project. +.SS The package tools +\f[CR]pkg_add(1)\f[R] installs, \f[CR]pkg_delete(1)\f[R] removes, and +\f[CR]pkg_info(1)\f[R] asks questions. +The package database is \f[CR]/usr/pkg/pkgdb\f[R]. +.IP +.EX +$ pkg_info | less +$ pkg_info \-L firefox | less +$ pkg_info \-D firefox +$ pkg_info \-W /usr/pkg/bin/firefox +.EE +.PP +\f[CR]\-L\f[R] lists the files of a package, \f[CR]\-D\f[R] prints the +message that came with it (where its documentation is, which service to +enable), and \f[CR]\-W\f[R] answers which package owns a file. +.SS Installing a package +\f[CR]/etc/pkg_install.conf\f[R] names the repository in +\f[CR]PKG_PATH\f[R]. +The installer writes it when the machine is installed; it points at the +package repository on the installation medium or at the NetBSD +project\(aqs repository for the release the packages were built for. +With the path set, a package is one command: +.IP +.EX +# pkg_add firefox +# pkg_add \-u firefox +# pkg_delete firefox +.EE +.PP +\f[CR]pkg_add \-u\f[R] updates an installed package to the newest +version the repository has. +Without an argument it updates everything that has a newer version: +.IP +.EX +# pkg_add \-uu +# pkg_admin rebuild +.EE +.PP +An update can replace a library that another program needs. +Read the messages \f[CR]pkg_add\f[R] prints, and keep the previous +package until the new one has started. +.SS The makronix set and the package database +The packages that Makronix itself ships are in the \(lqmakronix\(rq set, +which the installer unpacks as part of the system. +They are not registered in the package database: they change with a +Makronix release, and \f[CR]pkg_add \-u\f[R] does not touch them. +A program that is in the base set or in the \(lqmakronix\(rq set is +therefore updated by installing a new Makronix release, not by a package +update. +The programs that were installed with \f[CR]pkg_add\f[R] (Firefox, +Thunderbird, QEMU, the games) are registered and do update. +.PP +\f[CR]pkg_info\f[R] shows the registered packages. +If it does not list MCDE, that is not a defect: MCDE came with the +release. +.SS Building from source +The source set carries pkgsrc in \f[CR]/usr/pkgsrc\f[R]. +A package is built in its own directory with the NetBSD make: +.IP +.EX +# cd /usr/pkgsrc/www/firefox +# make install clean +.EE +.PP +The build needs the distfiles for the package and its dependencies. +The source set carries the distfiles of the packages Makronix ships, not +the whole pkgsrc archive; a package outside that set fetches what it +needs, which requires a network connection. +The authoritative description of pkgsrc is The pkgsrc Guide, installed +with the tree and available on the NetBSD project\(aqs web site. +.PP +A build on the installed machine writes into \f[CR]/usr/pkg\f[R] and its +work directories under \f[CR]/usr/pkgsrc\f[R]. +It needs free space \(em a browser can take several gigabytes while it +builds \(em and it is the wrong thing to do on a machine with a nearly +full disk. +.SS Security updates +\f[CR]pkg_admin(1)\f[R] can compare the installed packages with the +published vulnerability list: +.IP +.EX +# pkg_admin audit +# pkg_admin fetch\-pkg\-vulnerabilities +.EE +.PP +Makronix enables \f[CR]fetch_pkg_vulnerabilities=YES\f[R] in +\f[CR]/etc/daily.conf\f[R], so the list is fetched daily and +\f[CR]security(8)\f[R] reports what it finds to root\(aqs mail. +The report is only as good as the list; read it, and update the packages +it names. diff --git a/src/share/man/man7/makronix-guide-preface.7 b/src/share/man/man7/makronix-guide-preface.7 new file mode 100644 index 0000000000..ed6360f68e --- /dev/null +++ b/src/share/man/man7/makronix-guide-preface.7 @@ -0,0 +1,54 @@ +.TH "MAKRONIX-GUIDE-PREFACE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Preface +This is the guide to Makronix, a desktop operating system built on +NetBSD. +It is written for the person who installs the system, uses the MCDE +desktop and administers the machine afterwards. +It is not a replacement for the manual pages; it tells you which page to +read and in which order. +.PP +The guide follows the shape of The NetBSD Guide: a tour, installation, +the desktop, administration, networking and building, with the same +assumption that a system is something you understand rather than +something you click through. +It is not a copy. +Makronix decides what NetBSD leaves open \(em the installer, the +desktop, the packages on the medium, the way a release is made \(em and +where NetBSD\(aqs guide has a chapter for a subsystem Makronix does not +change, this guide names the manual pages and the NetBSD text instead of +repeating them. +.SS How to read it +Read ??? +first, then ??? +if the system is new. +The chapters about the desktop (??? +and ???) are for everybody; the administration chapters are reference +material. +The last part is for the person who builds Makronix from its own +sources. +.PP +Commands are shown as they are typed. +A \f[CR]#\f[R] at the beginning means the command runs as root; a +\f[CR]$\f[R] means it runs as your own account. +File names are in \f[CR]this style\f[R], commands in +\f[CR]this style\f[R], and values you replace in . +.SS The guide in four forms +The same text is installed four ways, so that it is readable where you +are: +.IP \(bu 2 +as manual pages, starting at \f[CR]makronix\-guide(7)\f[R]; +.IP \(bu 2 +as a PDF, \f[CR]/usr/share/doc/makronix/makronix\-guide.pdf\f[R]; +.IP \(bu 2 +as one HTML file, +\f[CR]/usr/share/doc/makronix/makronix\-guide.html\f[R]; +.IP \(bu 2 +as a book in the MCDE Information Manager (\f[CR]dtinfo(1)\f[R]). +.SS Conventions +Makronix is based on NetBSD, and much of what this guide describes is +NetBSD\(aqs mechanism, unchanged. +When a chapter says \(lqNetBSD\(rq, it means the mechanism Makronix +inherited; when it says \(lqMakronix\(rq, it means the part Makronix +decides itself. +Where a procedure differs between the two, the chapter gives the +Makronix way first. diff --git a/src/share/man/man7/makronix-guide-printing.7 b/src/share/man/man7/makronix-guide-printing.7 new file mode 100644 index 0000000000..8d136c3202 --- /dev/null +++ b/src/share/man/man7/makronix-guide-printing.7 @@ -0,0 +1,83 @@ +.TH "MAKRONIX-GUIDE-PRINTING" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Printing, Sound and Power +Three things a desktop is expected to get right, and three things NetBSD +leaves to the administrator: a printer, sound, and what happens when the +machine is idle or the battery is low. +.SS Printing with CUPS +Makronix uses the Common UNIX Printing System. +The packages cups and cups\-filters are on the medium; the service is +\f[CR]cupsd\f[R] in \f[CR]/etc/rc.conf\f[R]. +With the service running, a printer is added with \f[CR]lpadmin(8)\f[R]: +.IP +.EX +# echo \(aqcupsd=YES\(aq >> /etc/rc.conf +# /etc/rc.d/cupsd start +# lpadmin \-p office \-E \-v ipp://printer.example/ipp/print \-m everywhere +# lpadmin \-d office +# lpstat \-t +.EE +.PP +\f[CR]\-m everywhere\f[R] asks the printer for its own description, +which is the modern way; a printer that does not answer it needs a +driver package and a PPD file. +The web interface at \f[CR]http://localhost:631\f[R] does the same +through a browser, and \f[CR]lpoptions \-p office \-l\f[R] lists the +options of the printer. +.PP +Printing a file is \f[CR]lpr(1)\f[R]: +.IP +.EX +$ lpr \-P office document.pdf +$ lpq \-P office +.EE +.PP +CUPS keeps its queues and its logs in \f[CR]/var/spool/cups\f[R] and +\f[CR]/var/log/cups\f[R]. +A job that stays in the queue is usually a wrong device address or a +printer that is off; the error log says which. +.SS Sound +NetBSD\(aqs audio device is configured with \f[CR]audioctl(1)\f[R] and +\f[CR]mixerctl(1)\f[R]; \f[CR]audiocfg(1)\f[R] lists the devices and +lets you test them: +.IP +.EX +$ audiocfg list +$ audiocfg test 0 +$ mixerctl \-a +$ mixerctl \-w outputs.master=180 +.EE +.PP +MCDE shows the volume in the bar at the top: a slider in the menu, a +mute switch, and the wheel over the speaker. +The setting is the same mixer that \f[CR]mixerctl\f[R] changes. +.PP +The package pulseaudio and its volume control pavucontrol are on the +medium for programs that expect a PulseAudio server; MCDE itself does +not need one. +\f[CR]audioplay(1)\f[R] plays a WAV file without a server, and +\f[CR]aucat(1)\f[R] records and plays audio and can act as a sound +server. +.SS Power and temperature +\f[CR]envstat(8)\f[R] shows the sensors the machine has: temperatures, +fan speeds, voltages and the battery. +\f[CR]powerd(8)\f[R] adjusts the CPU frequency to the load, which is +what keeps a laptop cool and quiet: +.IP +.EX +# echo \(aqpowerd=YES\(aq >> /etc/rc.conf +# /etc/rc.d/powerd start +$ envstat +$ sysctl \-a | grep \-E \(aqcpu.frequency|machdep.cpu\(aq +.EE +.PP +A desktop machine can run at full speed all the time; a laptop should +not. +The MCDE bar shows the battery when the machine has one, and System +Settings has the screen and sleep settings. +On a machine that supports it, \f[CR]apm(8)\f[R] reports the battery and +the AC state as well. +.PP +A machine that shuts down without warning is usually hot or has a +failing power supply. +Read \f[CR]envstat\f[R] before you blame the software; the temperatures +are the first number to look at. diff --git a/src/share/man/man7/makronix-guide-rc.7 b/src/share/man/man7/makronix-guide-rc.7 new file mode 100644 index 0000000000..8875890916 --- /dev/null +++ b/src/share/man/man7/makronix-guide-rc.7 @@ -0,0 +1,88 @@ +.TH "MAKRONIX-GUIDE-RC" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Services and rc.d +NetBSD starts services through \f[CR]rc.d\f[R]: one script per service, +and one configuration file that decides which of them run. +Makronix uses the mechanism unchanged; the services that a desktop needs +are already configured. +.SS /etc/rc.conf +\f[CR]/etc/rc.conf\f[R] holds one variable per service. +\f[CR]foo=YES\f[R] starts the service at boot, \f[CR]foo=NO\f[R] does +not. +The file is read by \f[CR]rc(8)\f[R]; the variables are documented in +\f[CR]rc.conf(5)\f[R] and in the header of each script. +.IP +.EX +# grep \-v \(aq\(ha#\(aq /etc/rc.conf | grep . +.EE +.PP +A local addition belongs in \f[CR]/etc/rc.conf\f[R], not in a script: it +survives an upgrade, and \f[CR]etcupdate\f[R] knows how to merge it. +A single service can also be configured in +\f[CR]/etc/rc.conf.d/\f[R], which is useful when a package or +an administrator owns one file. +.SS Starting, stopping and checking a service +The scripts are in \f[CR]/etc/rc.d\f[R]. +Each takes the verbs \f[CR]start\f[R], \f[CR]stop\f[R], +\f[CR]restart\f[R], \f[CR]status\f[R] and \f[CR]onestart\f[R] (start it +now without changing \f[CR]rc.conf\f[R]): +.IP +.EX +# /etc/rc.d/dhcpcd status +# /etc/rc.d/dhcpcd restart +# /etc/rc.d/sshd onestart +.EE +.PP +A service that fails at boot writes its reason to the console and to +\f[CR]/var/log/messages\f[R]. +A script that is not executable, or a variable with a typo, is the usual +cause. +The order in which the scripts run is decided by the \f[CR]REQUIRE\f[R] +and \f[CR]PROVIDE\f[R] lines at the top of each script, not by the +alphabetical order; \f[CR]rcorder(8)\f[R] prints the order. +.SS The desktop services +On a Makronix desktop the relevant entries are: +.TP +\f[CR]dhcpcd=YES\f[R] +The DHCP client, when the network is configured by DHCP. +A machine with a fixed address sets \f[CR]dhcpcd=NO\f[R] and configures +the interface in \f[CR]/etc/ifconfig.\f[R]. +.TP +\f[CR]sshd=YES\f[R] +The Secure Shell server. +The installer enables it; the firewall lets it in. +.TP +\f[CR]ntpd=YES\f[R] +Time synchronisation. +The server list is \f[CR]/etc/ntp.conf\f[R]. +.TP +\f[CR]npf=YES\f[R] +The firewall. +Its rules are in \f[CR]/etc/npf.conf\f[R]; ??? +explains them. +.TP +\f[CR]dtlogin=YES\f[R] +The graphical login. +Without it the machine starts with a text console; \f[CR]startx\f[R] is +not the same thing, and the MCDE session is started by +\f[CR]dtlogin\f[R]. +.TP +\f[CR]cupsd=YES\f[R] +The print service, when printing is set up (???). +.SS Adding a service +A service that comes from pkgsrc installs its own script in +\f[CR]/usr/pkg/share/examples/rc.d\f[R] or \f[CR]/etc/rc.d\f[R]. +Copy it into \f[CR]/etc/rc.d\f[R] if it is an example, make it +executable, add the variable to \f[CR]/etc/rc.conf\f[R], and start it +once to see whether it works before the next boot: +.IP +.EX +# cp /usr/pkg/share/examples/rc.d/foo /etc/rc.d/foo +# chmod 755 /etc/rc.d/foo +# echo \(aqfoo=YES\(aq >> /etc/rc.conf +# /etc/rc.d/foo start +# /etc/rc.d/foo status +.EE +.PP +If the service needs a directory or a user, its package documentation +says so; \f[CR]pkg_info \-D foo\f[R] prints the message that came with +the package. diff --git a/src/share/man/man7/makronix-guide-services.7 b/src/share/man/man7/makronix-guide-services.7 new file mode 100644 index 0000000000..678b160736 --- /dev/null +++ b/src/share/man/man7/makronix-guide-services.7 @@ -0,0 +1,90 @@ +.TH "MAKRONIX-GUIDE-SERVICES" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH DNS, DHCP and NTP +Three small services make a network usable: something that answers name +lookups, something that hands out addresses, and something that keeps +the clock right. +A desktop uses all three as a client; a machine that serves a network +runs the first two as a server. +.SS Name resolution +The resolver reads \f[CR]/etc/resolv.conf\f[R]. +It lists the name servers in the order they are tried, and the domain +that short names belong to: +.IP +.EX +search example.lan +nameserver 192.168.1.1 +nameserver 9.9.9.9 +.EE +.PP +\f[CR]/etc/nsswitch.conf\f[R] decides where a lookup goes first. +Makronix\(aqs installer sets \f[CR]hosts: files mdnsd dns\f[R], so the +local file answers first, then the local network names, then DNS. +The local name \f[CR].local\f[R] is answered by +\f[CR]mdnsd(8)\f[R]. +.PP +A machine that should answer DNS for a small network can run +\f[CR]unbound(8)\f[R] as a caching resolver, or \f[CR]nsd(8)\f[R] as an +authoritative server. +Both are packages; both have their own documentation, and both should be +reachable only from the network they serve. +The firewall chapter is the place to decide that. +.SS DHCP +A client runs \f[CR]dhcpcd(8)\f[R] and needs no configuration beyond +\f[CR]dhcpcd=YES\f[R]. +A server runs \f[CR]dhcpd(8)\f[R] with a lease file and a subnet +declaration: +.IP +.EX +# cat /etc/dhcpd.conf +subnet 192.168.1.0 netmask 255.255.255.0 { + range 192.168.1.100 192.168.1.199; + option routers 192.168.1.1; + option domain\-name\-servers 192.168.1.1; + default\-lease\-time 86400; + max\-lease\-time 604800; +} + +# echo \(aqdhcpd=YES\(aq >> /etc/rc.conf +# touch /var/db/dhcpd.leases +# /etc/rc.d/dhcpd start +.EE +.PP +The interface that serves the network must have a fixed address in the +same subnet (???); a DHCP server with an address from DHCP is a machine +that cannot find itself. +A machine that should always get the same address can be pinned by its +Ethernet address: +.IP +.EX +host printer { + hardware ethernet 00:11:22:33:44:55; + fixed\-address 192.168.1.50; +} +.EE +.SS Time +A correct clock matters for TLS, for mail and for the logs of two +machines that are compared. +\f[CR]ntpd(8)\f[R] is the daemon; \f[CR]/etc/ntp.conf\f[R] names the +servers: +.IP +.EX +server 0.pool.ntp.org +server 1.pool.ntp.org +server 2.pool.ntp.org +.EE +.PP +With \f[CR]ntpd=YES\f[R], the clock is corrected continuously and +slowly. +A clock that is wrong by hours is set once by hand before the daemon +starts: +.IP +.EX +# date 202611151200 +# /etc/rc.d/ntpd restart +$ ntpq \-p +.EE +.PP +\f[CR]ntpq \-p\f[R] lists the servers, the stratum and the offset. +A server marked with an asterisk is the one the daemon is following. +If none of them answers, the network or the firewall is the problem, not +the clock. diff --git a/src/share/man/man7/makronix-guide-sharing.7 b/src/share/man/man7/makronix-guide-sharing.7 new file mode 100644 index 0000000000..767dcd772f --- /dev/null +++ b/src/share/man/man7/makronix-guide-sharing.7 @@ -0,0 +1,136 @@ +.TH "MAKRONIX-GUIDE-SHARING" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Remote Access and File Sharing +A Makronix machine is a Unix machine on a network. +It can be reached with SSH, it can serve files with NFS, SMB or AFP, and +it can mount the shares of other machines. +MCDE\(aqs file manager shows the network places that the system has been +told about; System Settings has the sharing controls. +.SS SSH +The installer enables \f[CR]sshd(8)\f[R] and the firewall lets it in. +Log in from another machine with your account: +.IP +.EX +$ ssh name\(atstudio.example +$ ssh name\(atstudio.local +.EE +.PP +A key is better than a password and is the only way to log in without +typing one. +Create it once, then put the public half on the machines you log in to: +.IP +.EX +$ ssh\-keygen \-t ed25519 +$ cat \(ti/.ssh/id_ed25519.pub | ssh name\(atstudio.example \(rs + \(aqmkdir \-p \(ti/.ssh && cat >> \(ti/.ssh/authorized_keys\(aq +$ chmod 700 \(ti/.ssh; chmod 600 \(ti/.ssh/authorized_keys +.EE +.PP +\f[CR]scp\f[R] copies a file, \f[CR]sftp\f[R] is an interactive file +transfer, and a tunnel forwards a port through the connection: +.IP +.EX +$ scp report.pdf name\(atstudio.example:/home/name/ +$ ssh \-L 8080:localhost:80 name\(atstudio.example +.EE +.PP +The server\(aqs configuration is \f[CR]/etc/ssh/sshd_config\f[R]. +Password logins for root are disabled by default; log in as yourself and +use \f[CR]su\f[R]. +After a change, test the configuration and reload the daemon: +.IP +.EX +# sshd \-t +# /etc/rc.d/sshd reload +.EE +.SS NFS +NFS is the native Unix file sharing. +The server exports a directory in \f[CR]/etc/exports\f[R]: +.IP +.EX +/home \-alldirs \-maproot=root \-network 192.168.1.0 \-mask 255.255.255.0 +.EE +.PP +and runs the daemons: +.IP +.EX +# echo \(aqrpcbind=YES\(aq >> /etc/rc.conf +# echo \(aqnfsd=YES\(aq >> /etc/rc.conf +# echo \(aqmountd=YES\(aq >> /etc/rc.conf +# /etc/rc.d/rpcbind start +# /etc/rc.d/mountd start +# /etc/rc.d/nfsd start +# /etc/rc.d/mountd restart +.EE +.PP +The client mounts it with \f[CR]mount_nfs\f[R] or +\f[CR]mount \-t nfs\f[R]: +.IP +.EX +# mount \-t nfs 192.168.1.20:/home /mnt +.EE +.PP +An entry in \f[CR]/etc/fstab\f[R] makes it permanent. +\f[CR]\-maproot=root\f[R] lets root on the client write as root on the +server; without it, root is mapped to nobody. +A share that is open to the whole network should be a decision, not a +default. +.SS SMB and AFP +Windows and macOS machines speak SMB; older Macs speak AFP. +Makronix ships both servers as packages: +.IP +.EX +# pkg_add samba4 netatalk4 +# echo \(aqsmbd=YES\(aq >> /etc/rc.conf +# echo \(aqnmbd=YES\(aq >> /etc/rc.conf +# echo \(aqafpd=YES\(aq >> /etc/rc.conf +.EE +.PP +The Samba configuration is \f[CR]/usr/pkg/etc/samba/smb.conf\f[R]. +A minimal share that is visible to one user: +.IP +.EX +[global] + workgroup = HOME + server string = Makronix + security = user + passdb backend = tdbsam + +[share] + path = /home/share + valid users = name + read only = no + browseable = yes +.EE +.PP +Create the Samba user after the system account exists: +.IP +.EX +# smbpasswd \-a name +# /etc/rc.d/smbd start +# /etc/rc.d/nmbd start +.EE +.PP +AFP is configured in \f[CR]/usr/pkg/etc/netatalk/afp.conf\f[R]; the +package\(aqs documentation has the share syntax for the version that is +installed. +MCDE\(aqs System Settings has the sharing controls for both, and its +file manager shows a share that is mounted or announced on the network. +.SS Mounting a remote directory +When the other machine offers only SSH, SSHFS mounts a directory over +it: +.IP +.EX +# pkg_add fuse\-sshfs +$ sshfs name\(atstudio.example:/home/name /mnt/studio +$ umount /mnt/studio +.EE +.PP +The package afpfs\-ng does the same for an AFP server. +Both need the FUSE device and the user\(aqs permission to mount; the +package message says which group to join. +.SS Before you open a service +Every service that listens on the network is a door. +Open only the ones you use, restrict them to the network they serve, and +read the firewall chapter before you connect the machine to a network +you do not control. +A file share with a weak password is worse than no file share. diff --git a/src/share/man/man7/makronix-guide-shell.7 b/src/share/man/man7/makronix-guide-shell.7 new file mode 100644 index 0000000000..2cd07ba13b --- /dev/null +++ b/src/share/man/man7/makronix-guide-shell.7 @@ -0,0 +1,104 @@ +.TH "MAKRONIX-GUIDE-SHELL" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH The Command Line +The desktop is where the work starts, but the command line is where a +Unix system is understood and repaired. +Makronix uses NetBSD\(aqs shell, NetBSD\(aqs tools and NetBSD\(aqs +manual pages; nothing here is special to Makronix except the paths of +the MCDE programs. +.SS The shell +The login shell of a new account is \f[CR]sh(1)\f[R], NetBSD\(aqs POSIX +shell. +It reads \f[CR]\(ti/.profile\f[R] at login and \f[CR]\(ti/.shrc\f[R] for +interactive shells. +A user who prefers a Korn shell can use \f[CR]/usr/pkg/bin/ksh93\f[R] +(installed for MCDE\(aqs \f[CR]dtksh\f[R]) and change the login shell +with \f[CR]chsh(1)\f[R]. +.PP +The important environment variables are \f[CR]PATH\f[R], +\f[CR]HOME\f[R], \f[CR]SHELL\f[R], \f[CR]TERM\f[R] and \f[CR]LANG\f[R]. +A desktop session gets \f[CR]PATH\f[R] from the session configuration, +not only from \f[CR]\(ti/.profile\f[R]; if a program is found in a +terminal but not from the panel, compare the two: +.IP +.EX +$ echo $PATH +$ env | sort +.EE +.SS Pipes, redirection and jobs +A pipe sends the output of one program to the input of the next; +redirection sends it to a file. +The three that matter every day: +.IP +.EX +$ dmesg | less +$ grep \-i error /var/log/messages > /tmp/errors +$ command 2>&1 | tee log +.EE +.PP +\f[CR]Ctrl\f[R]+\f[CR]C\f[R] stops the program in the foreground, +\f[CR]Ctrl\f[R]+\f[CR]Z\f[R] suspends it, and \f[CR]bg\f[R], +\f[CR]fg\f[R] and \f[CR]jobs\f[R] manage it. +\f[CR]command &\f[R] starts it in the background. +.PP +A file\(aqs permissions are read with \f[CR]ls \-l\f[R] and changed with +\f[CR]chmod(1)\f[R]. +The three digits are the owner, the group and everybody else; the +execute bit is what makes a file a program. +A directory needs the execute bit to be entered, and the write bit to be +changed. +.IP +.EX +$ chmod 644 notes.txt +$ chmod 755 script.sh +$ chown user:wheel script.sh +.EE +.SS Editing files +\f[CR]vi(1)\f[R] is in the base system and is the editor to know when +the desktop is not running. +It has two modes: command mode, where keys are commands, and insert +mode, where they are text. +\f[CR]i\f[R] enters insert mode, \f[CR]Esc\f[R] returns to command mode, +\f[CR]:w\f[R] writes, \f[CR]:q\f[R] quits and \f[CR]:wq\f[R] does both. +\f[CR]dd\f[R] deletes a line, \f[CR]/text\f[R] searches, and +\f[CR]u\f[R] undoes. +.PP +On the desktop, \f[CR]dtpad(1)\f[R] edits plain text with menus and a +search dialog. +Configuration files are plain text either way; keep a copy before a +large change (\f[CR]cp file file.orig\f[R]) and compare afterwards with +\f[CR]diff(1)\f[R]. +.SS Finding the documentation +\f[CR]man(1)\f[R] reads the manual pages. +The sections are 1 (commands), 2 (system calls), 3 (library functions), +4 (devices), 5 (file formats), 7 (conventions) and 8 (administration). +The useful forms: +.IP +.EX +$ man ls +$ man 5 rc.conf +$ man \-k firewall +$ apropos password +.EE +.PP +\f[CR]man \-k\f[R] searches the one\-line descriptions; +\f[CR]apropos\f[R] is the same. +The Makronix Guide is a set of pages in section 7, starting at +\f[CR]makronix\-guide(7)\f[R]. +The HTML and PDF forms are under \f[CR]/usr/share/doc/makronix\f[R]. +.SS Becoming the administrator +Administrative commands run as root. +On a desktop, log in as yourself and use \f[CR]su(1)\f[R]: +.IP +.EX +$ su \- +Password: +# +.EE +.PP +The minus makes it a login shell, with root\(aqs \f[CR]PATH\f[R] and +environment. +Your account is in the wheel group, which is what allows \f[CR]su\f[R]; +a terminal that is left alone returns to your prompt when you type +\f[CR]exit\f[R]. +Log in as yourself rather than as root: the desktop account is the +account for people, and \f[CR]su\f[R] is the door to the system. diff --git a/src/share/man/man7/makronix-guide-tour.7 b/src/share/man/man7/makronix-guide-tour.7 new file mode 100644 index 0000000000..ec75b92b75 --- /dev/null +++ b/src/share/man/man7/makronix-guide-tour.7 @@ -0,0 +1,99 @@ +.TH "MAKRONIX-GUIDE-TOUR" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH A Tour of the System +Before you change anything, know where things are. +Makronix uses NetBSD\(aqs layout; the Makronix parts sit in the places +CDE and pkgsrc already use. +.SS The file system +.TP +\f[CR]/\f[R] +The root file system: the kernel (\f[CR]/netbsd\f[R]), the boot loader +and the base userland. +.TP +\f[CR]/etc\f[R] +The configuration of this machine: \f[CR]rc.conf\f[R], \f[CR]fstab\f[R], +\f[CR]master.passwd\f[R], the network configuration and the +\f[CR]rc.d\f[R] scripts. +Files here belong to the administrator, not to a package. +.TP +\f[CR]/usr\f[R] +The base system\(aqs programs, libraries, headers, manual pages and +shared files. +\f[CR]/usr/src\f[R], \f[CR]/usr/xsrc\f[R] and \f[CR]/usr/msrc\f[R] hold +the sources when the source set is installed. +.TP +\f[CR]/usr/pkg\f[R] +Everything pkgsrc installs. +The programs are in \f[CR]/usr/pkg/bin\f[R] and +\f[CR]/usr/pkg/sbin\f[R]; the MCDE desktop is in \f[CR]/usr/pkg/dt\f[R]. +The package database is \f[CR]/usr/pkg/pkgdb\f[R]. +.TP +\f[CR]/home\f[R] +One directory per user. +A new account gets \f[CR]/home/\f[R] and the files from +\f[CR]/etc/skel\f[R]. +.TP +\f[CR]/var\f[R] +Data that changes: logs in \f[CR]/var/log\f[R], mail spools, databases, +the package cache and the print spool. +.SS Where MCDE lives +MCDE is installed as a package under \f[CR]/usr/pkg/dt\f[R]. +The programs are in \f[CR]/usr/pkg/dt/bin\f[R]; the shared data, the +palettes and the colors are in \f[CR]/usr/pkg/dt/share\f[R]; the session +configuration is in \f[CR]/usr/pkg/dt/config\f[R]. +A user\(aqs own desktop settings live in \f[CR]\(ti/.dt\f[R]. +.PP +The system\-wide CDE configuration directory is \f[CR]/etc/dt\f[R]. +It is the place for settings that apply to every user, and it is where +the Makronix Guide\(aqs information library is installed (see ???). +.SS The files you will edit +.IP \(bu 2 +\f[CR]/etc/rc.conf\f[R] \(em which services start at boot. +The variables are documented in \f[CR]rc.conf(5)\f[R]. +.IP \(bu 2 +\f[CR]/etc/fstab\f[R] \(em which file systems are mounted where. +.IP \(bu 2 +\f[CR]/etc/hosts\f[R], \f[CR]/etc/resolv.conf\f[R] and +\f[CR]/etc/mygate\f[R] \(em the network, as in NetBSD. +.IP \(bu 2 +\f[CR]/etc/npf.conf\f[R] \(em the firewall. +Makronix installs a rule set that lets in SSH and the replies to +outgoing traffic. +.IP \(bu 2 +\f[CR]/etc/makronix/update\f[R] \(em the first line names the source of +software updates. +.IP \(bu 2 +\f[CR]/etc/dt/config/Xsession.d/\f[R] \(em scripts that every MCDE +session runs. +.SS What runs +After boot, \f[CR]init(8)\f[R] starts the services named in +\f[CR]/etc/rc.conf\f[R]. +On a Makronix desktop the important ones are: +.IP \(bu 2 +\f[CR]dtlogin(1)\f[R] \(em the graphical login screen. +It starts the X server and the user\(aqs session. +.IP \(bu 2 +\f[CR]dtwm(1)\f[R] \(em the window manager: window frames, the front +panel and the workspaces. +.IP \(bu 2 +\f[CR]dtsession(1)\f[R] \(em the session manager behind the desktop. +.IP \(bu 2 +\f[CR]dhcpcd(8)\f[R] \(em the DHCP client, when the network is +configured by DHCP. +.IP \(bu 2 +\f[CR]ntpd(8)\f[R] \(em the time synchronisation the installer enables. +.PP +\f[CR]ps(1)\f[R] shows them; \f[CR]top(1)\f[R] shows what they use. +A process that fails at boot leaves its reason in +\f[CR]/var/log/messages\f[R] and, for a service, in the console output +of \f[CR]rc.d\f[R]. +.SS Documentation on the machine +The manual pages are installed in the usual sections. +Start with \f[CR]afterboot(8)\f[R], then read the page for the program +you are using. +The Makronix Guide itself is \f[CR]makronix\-guide(7)\f[R]; each chapter +has its own page, and the guide is also installed as a PDF and as HTML +under \f[CR]/usr/share/doc/makronix\f[R]. +.PP +When a page does not answer the question, the source is the last word. +The source set puts NetBSD\(aqs source in \f[CR]/usr/src\f[R] and +Makronix\(aqs own tools and documentation in \f[CR]/usr/msrc\f[R]. diff --git a/src/share/man/man7/makronix-guide-updating.7 b/src/share/man/man7/makronix-guide-updating.7 new file mode 100644 index 0000000000..a9d82749a1 --- /dev/null +++ b/src/share/man/man7/makronix-guide-updating.7 @@ -0,0 +1,83 @@ +.TH "MAKRONIX-GUIDE-UPDATING" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Updating the Desktop +Makronix is one system: the base, the X server, the desktop and the +packages that came with the release move together. +The package tools update the packages that were installed with them; a +Makronix release updates everything else. +This chapter is the practical order. +.SS From System Settings +Open System Settings and choose Software Update. +The dialog reads the source from the first line of +\f[CR]/etc/makronix/update\f[R], shows what it found, and asks for the +administrator\(aqs password before it changes anything. +It runs \f[CR]sysupgrade\f[R] for the base system and then +\f[CR]pkg_add \-uu\f[R] for the registered packages. +The machine must be rebooted afterwards. +.PP +The source is a directory, a \f[CR]file://\f[R] address or an +\f[CR]https://\f[R] address. +\f[CR]http://\f[R] and \f[CR]ftp://\f[R] are refused: a base system that +is fetched over an unencrypted connection is a base system that can be +changed on the way. +An \f[CR]https://\f[R] source is protected by TLS; a \f[CR]file://\f[R] +source is as trusted as the medium it is on. +This release does not verify a signature on the sets, so use a source +you control and keep the previous medium until the new system has +started. +.SS From the command line +.IP +.EX +# cat /etc/makronix/update +https://example.invalid/makronix/0.99.10/amd64 +# sysupgrade auto \(dq$(cat /etc/makronix/update)\(dq +# postinstall \-s /usr/src/etc fix +# etcupdate \-s /usr/src/etc +# pkg_add \-uu +# reboot +.EE +.PP +The order matters: the base system first, then the configuration merge, +then the packages, then the reboot. +If \f[CR]sysupgrade\f[R] fails, stop there; a half\-updated base with +new packages is harder to repair than either one alone. +.SS MCDE and the makronix set +The desktop is part of the \(lqmakronix\(rq set, which the installer +unpacks as part of the system. +It is not in the package database, so \f[CR]pkg_add \-u\f[R] does not +update it; a new Makronix release does. +The same is true of the base system\(aqs programs (vim, git\-base, +sysupgrade) and of the libraries MCDE needs. +.PP +A person who builds Makronix from source updates the desktop by building +the new tree and installing its release; the next chapter describes the +build. +A person who only uses the desktop updates it with the release\(aqs own +update dialog or medium. +.SS The guide itself +The guide is generated from \f[CR]docs/guide\f[R] and installed with the +release. +After a change to the guide\(aqs source, rebuild it and install the four +forms: +.IP +.EX +$ cd /usr/msrc +$ sh docs/guide/build.sh all +$ sh docs/guide/build.sh install +.EE +.PP +The build needs pandoc, xmllint, mandoc, Chrome or Google Chrome for the +PDF, and a host build of MCDE for the information library. +\f[CR]build.sh check\f[R] verifies that every form was produced; the +details are in \f[CR]docs/guide/AGENTS.md\f[R]. +.SS If an update goes wrong +The old kernel is \f[CR]/netbsd.old\f[R] and the loader\(aqs menu can +start it. +The old configuration is in \f[CR]/etc/rc.conf.old\f[R] after +\f[CR]postinstall\f[R] or \f[CR]etcupdate\f[R] replaced it. +On an encrypted system, the kernel the machine starts is the copy in +\f[CR]/cgdboot\f[R]; ??? +explains how to put the old one back. +.PP +A machine that does not start is not a machine that is lost. +Start the medium, mount the root file system and read the logs; the data +is still there, and the source set can rebuild the system around it. diff --git a/src/share/man/man7/makronix-guide-upgrade.7 b/src/share/man/man7/makronix-guide-upgrade.7 new file mode 100644 index 0000000000..27ce01ff40 --- /dev/null +++ b/src/share/man/man7/makronix-guide-upgrade.7 @@ -0,0 +1,96 @@ +.TH "MAKRONIX-GUIDE-UPGRADE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Upgrading Makronix +An upgrade replaces the base system and keeps your accounts, your files +and the packages you installed. +There are two ways to do it: from a new installation medium, or from a +running system with \f[CR]sysupgrade(8)\f[R]. +Both end with the same steps: the sets are unpacked, the configuration +is merged, and the machine is rebooted. +.SS From the medium +Start the new medium and choose \(lqUpgrade NetBSD on a hard disk\(rq in +\f[CR]sysinst\f[R]. +The installer asks for the disk and the root partition, unpacks the new +sets over the old system and leaves \f[CR]/etc\f[R] and \f[CR]/home\f[R] +alone. +The \(lqmakronix\(rq set is part of the upgrade; choose it when the +installer offers the sets. +.PP +After the reboot, run the two NetBSD tools that bring the configuration +up to date: +.IP +.EX +# postinstall \-s /usr/src/etc fix +# etcupdate \-s /usr/src/etc +.EE +.PP +\f[CR]postinstall(8)\f[R] repairs the files that NetBSD knows how to +merge (the mail configuration, the device files, the fonts); +\f[CR]etcupdate(8)\f[R] merges the rest and leaves its conflicts for you +to resolve. +Read \f[CR]/etc/rc.conf\f[R] afterwards: a new release can add a service +or rename a variable, and the old file is kept as +\f[CR]/etc/rc.conf.old\f[R] when it is replaced. +.SS With sysupgrade +\f[CR]sysupgrade\f[R] does the same work from the running system. +It fetches the sets from a directory, a \f[CR]file://\f[R] address or an +\f[CR]https://\f[R] address, unpacks them and updates the kernel. +The address is the first line of \f[CR]/etc/makronix/update\f[R]: +.IP +.EX +# cat /etc/makronix/update +https://example.invalid/makronix/0.99.10/amd64 +# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64 +.EE +.PP +After \f[CR]sysupgrade\f[R], run \f[CR]postinstall\f[R] and +\f[CR]etcupdate\f[R] as above and reboot. +The MCDE System Settings has the same operation as a dialog: it reads +the source from \f[CR]/etc/makronix/update\f[R], runs +\f[CR]sysupgrade\f[R] for the base system and then +\f[CR]pkg_add \-uu\f[R] for the packages. +.PP +\f[I]Trust:\f[R] an \f[CR]https://\f[R] source is protected by TLS; a +\f[CR]file://\f[R] source is as trusted as the medium it is on. +This release does not verify a signature on the sets. +Use a source you control, and keep a copy of the previous release until +the new one has started. +.SS The packages +Packages from pkgsrc are updated with the package tools, not with the +base system: +.IP +.EX +# pkg_add \-uu +# pkg_admin rebuild +.EE +.PP +The packages of the \(lqmakronix\(rq set are not in the package +database: the installer unpacks them as part of the set. +They change with a Makronix release, which is one reason to upgrade the +whole system rather than a single file. +.SS An encrypted system +On an encrypted system the kernel the machine boots is the copy on the +small unencrypted partition, not \f[CR]/netbsd\f[R] in the encrypted +root. +After an upgrade, copy the new kernel and the matching +\f[CR]cgdroot.kmod\f[R] to that partition: +.IP +.EX +# mount /cgdboot +# cp /netbsd /cgdboot/netbsd +# cp /path/from/the/release/cgdroot.kmod /cgdboot/ +# umount /cgdboot +.EE +.PP +The release notes name the exact path of \f[CR]cgdroot.kmod\f[R]; it is +part of the kernel set of the new release. +Keep the old kernel as \f[CR]/cgdboot/netbsd.old\f[R] so that the loader +can start it if the new one fails. +.SS If the upgrade fails +A failed upgrade is not a lost machine. +Start the old medium, mount the root partition and read +\f[CR]/var/log/messages\f[R]; the installer has left the old +configuration in \f[CR]/etc/rc.conf.old\f[R] and the old kernel in +\f[CR]/netbsd.old\f[R]. +The loader\(aqs menu can start \f[CR]netbsd.old\f[R] when the new kernel +does not boot. +With the source set installed, the system can be rebuilt in place (???). diff --git a/src/share/man/man7/makronix-guide-users.7 b/src/share/man/man7/makronix-guide-users.7 new file mode 100644 index 0000000000..f03ab185b8 --- /dev/null +++ b/src/share/man/man7/makronix-guide-users.7 @@ -0,0 +1,84 @@ +.TH "MAKRONIX-GUIDE-USERS" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH Users and Accounts +Makronix is a machine for people: the installer creates one account for +the person who uses it, and that account is in the groups a desktop +needs. +More accounts are added with NetBSD\(aqs user tools, and the same +accounts appear at the login screen and in System Settings. +.SS Where the accounts live +\f[CR]/etc/master.passwd\f[R] is the real database; +\f[CR]/etc/passwd\f[R] is its public view, without the password hashes. +Both are generated from the master file by \f[CR]pwd_mkdb(8)\f[R]. +The group database is \f[CR]/etc/group\f[R]. +Edit them with \f[CR]vipw(8)\f[R] and \f[CR]vi(1)\f[R] rather than with +a text editor that does not know about the locks. +.PP +Each account has a home directory, a login shell and a list of groups. +A new account gets the files from \f[CR]/etc/skel\f[R], which is where a +site puts its default \f[CR].profile\f[R] and desktop files. +.SS Adding an account +.IP +.EX +# useradd \-m \-G wheel,operator,staff,users,dialer,games,wsrc \(rs + \-c \(dqFull Name\(dq \-s /bin/sh name +# passwd name +.EE +.PP +\f[CR]useradd\f[R] creates the home directory with \f[CR]\-m\f[R], puts +the account in the named groups and sets the shell. +\f[CR]passwd\f[R] then sets the password; without it the account cannot +log in. +The groups are the ones the installer uses: +.TP +wheel +May use \f[CR]su\f[R] to become root. +.TP +operator +May use the operator commands (shutdown, and the disk tools that are +marked for it). +.TP +staff +The usual group for files that a team shares. +.TP +users +The ordinary users of the machine. +.TP +dialer +May use the serial ports and the modems. +.TP +games +May write the games\(aq score files. +.TP +wsrc +May write the source tree under \f[CR]/usr/src\f[R]. +.PP +The same operation is in System Settings under Users; it asks for the +administrator\(aqs password and writes the same files. +.SS Changing and removing an account +.IP +.EX +# usermod \-G wheel,operator,staff,users,dialer,games,wsrc name +# chsh \-s /usr/pkg/bin/ksh93 name +# userdel \-r name +.EE +.PP +\f[CR]usermod\f[R] changes the groups, the shell, the full name or the +home directory; \f[CR]chsh\f[R] changes the shell of the account that +runs it. +\f[CR]userdel \-r\f[R] removes the account and its home directory; +without \f[CR]\-r\f[R] the files stay. +A removed account leaves its files owned by a number; find them with +\f[CR]find / \-nouser \-print\f[R] before you delete anything else. +.SS Passwords +Passwords are stored as hashes in \f[CR]/etc/master.passwd\f[R], which +only root can read. +A user changes their own with \f[CR]passwd\f[R]; root changes another +with \f[CR]passwd name\f[R]. +The password quality is the administrator\(aqs business: a desktop +machine on a home network needs a different policy from a machine that +is reachable from the Internet. +.PP +If a password is lost, root sets a new one from a single\-user boot or +from another account in the wheel group. +The fact that this is possible is the reason a machine left alone in a +public place must be locked, not only logged out. diff --git a/src/share/man/man7/makronix-guide-what.7 b/src/share/man/man7/makronix-guide-what.7 new file mode 100644 index 0000000000..a69f21d178 --- /dev/null +++ b/src/share/man/man7/makronix-guide-what.7 @@ -0,0 +1,76 @@ +.TH "MAKRONIX-GUIDE-WHAT" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH What Makronix Is +Makronix is a complete operating system for the desktop: a kernel, a +userland, a graphical login, a desktop and the programs that make a +machine usable, installed together and updated together. +It is built on NetBSD, uses NetBSD\(aqs conventions and keeps +NetBSD\(aqs manual pages, so a person who knows NetBSD will find the +system familiar. +What Makronix decides is everything NetBSD leaves open. +.SS NetBSD underneath +The kernel, the C library, the userland and the build system are +NetBSD\(aqs. +Makronix tracks NetBSD\(aqs source tree directly; there is no patch +layer between the two. +The boot loader, \f[CR]/etc/rc.conf\f[R], the package tools and the +section 8 manual pages are the ones NetBSD documents. +.PP +The kernel still calls itself \(lqNetBSD\(rq in \f[CR]uname(1)\f[R], on +purpose: pkgsrc, \f[CR]config.guess\f[R] and a great deal of +third\-party software decide from that name which system they are on. +The product name \(lqMakronix 0.99.10\(rq is what the installer, the +login screen, the message of the day and the release notes call the +system. +.SS What Makronix decides +Four decisions turn NetBSD into Makronix: +.IP \(bu 2 +\f[I]The installer.\f[R] Makronix\(aqs \f[CR]sysinst(8)\f[R] has two +ways. +The simple way asks for the disk and whether it is encrypted, then +installs everything, then asks the questions a new computer needs \(em +its name, the network, the time zone, the administrator\(aqs password +and the first account \(em before the first reboot. +The full way is the NetBSD installation, unchanged. +.IP \(bu 2 +\f[I]The desktop.\f[R] MCDE, the Makronix Common Desktop Environment, is +a fork of CDE. +It starts at \f[CR]dtlogin(1)\f[R], uses Motif, and is designed to be +quick on a machine from the 1990s. +It is described in ???. +.IP \(bu 2 +\f[I]The packages on the medium.\f[R] The programs that Makronix ships +are on the installation medium, in the \(lqmakronix\(rq set and in the +repository next to it. +A machine is usable without a network connection. +.IP \(bu 2 +\f[I]The source set.\f[R] The medium also carries the sources \(em +NetBSD\(aqs source sets and the Makronix source set \(em so that the +system can rebuild itself offline. +The procedure is in ???. +.SS The release and its name +This guide describes Makronix 0.99.10, whose release name is +\(lqCamouflage\(rq. +Release names are CDE palette names, and a release looks like its +palette: the logo, the icon set, the installer colours and the desktop +colours come from it. +The palette is installed as +\f[CR]/usr/pkg/dt/share/palettes/Camouflage.dp\f[R]. +.PP +0.99.10 is a snapshot, not a long\-term release. +Install it on a machine whose data you have elsewhere, and read the +release notes on the installation medium before you start. +.SS Platforms +amd64 is the first target and the one the build tests on every change, +in QEMU with BIOS and UEFI and on a 2011 MacBook Pro. +PowerPC Macs (G3, G4 and G5) and 64\-bit ARM machines (Raspberry Pi 4, +ODROID\-N2, ODROID\-M1) are the next targets; a platform counts as +supported only when an installation from its medium reaches a login +prompt. +The measured state of each platform is in +\f[CR]/usr/src/docs/PLATFORMS.md\f[R] in the source set. +.SS Licence +Makronix\(aqs own text and tools are under the CNCL 1.0 (Could Not Care +Less), a licence that asks only that you do not blame the authors. +NetBSD\(aqs source keeps its BSD licence, MCDE keeps the CDE licence +(LGPL 2.0 or later), and pkgsrc packages keep their own licences. +Appendix C lists the details. diff --git a/src/share/man/man7/makronix-guide-x11.7 b/src/share/man/man7/makronix-guide-x11.7 new file mode 100644 index 0000000000..82bedb575e --- /dev/null +++ b/src/share/man/man7/makronix-guide-x11.7 @@ -0,0 +1,76 @@ +.TH "MAKRONIX-GUIDE-X11" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH The Display and X11 +MCDE draws on the X Window System, and X is part of the Makronix base +system. +The server, the drivers, the fonts and the clients are in +\f[CR]/usr/X11R7\f[R]; there is no separate X package to install. +On a normal machine the server needs no configuration at all, and +\f[CR]dtlogin\f[R] starts it. +.SS The server and the session +The login screen starts the X server and, after a login, the MCDE +session. +A text console can start a bare X session with \f[CR]startx(1)\f[R], but +that is not the MCDE session: it starts the user\(aqs +\f[CR]\(ti/.xinitrc\f[R] and nothing else. +Use it to test the server, not as the daily desktop. +.IP +.EX +$ startx +$ xdpyinfo | head +$ xrandr +.EE +.PP +\f[CR]xdpyinfo\f[R] prints the display\(aqs capabilities, and +\f[CR]xrandr\f[R] lists the outputs and the modes. +A second monitor is enabled with \f[CR]xrandr \-\-output\f[R]; the +setting lasts for the session unless it is put in a session script. +.SS When the server needs a configuration +Most hardware is detected. +A machine with an unusual graphics chip, a wrong resolution or a display +that stays black can be given a configuration file: +.IP +.EX +# X \-configure +# cp /root/xorg.conf.new /etc/X11/xorg.conf +# X \-config /etc/X11/xorg.conf +.EE +.PP +The file is a starting point, not a guarantee. +The log is \f[CR]/var/log/Xorg.0.log\f[R]; the lines marked +\f[CR](EE)\f[R] are errors and \f[CR](WW)\f[R] are warnings. +A server that starts from the console but not from \f[CR]dtlogin\f[R] +usually has a permission or a display\-manager problem, not a driver +problem. +.SS Keyboard and fonts +The text console and X have separate keyboard settings. +The console is configured with \f[CR]wsconsctl(8)\f[R]: +.IP +.EX +# wsconsctl \-w keyboard.encoding=de +.EE +.PP +The key map is set in \f[CR]/etc/wscons.conf\f[R]. +In X, MCDE\(aqs System Settings sets the layout for the session; the X +server\(aqs own configuration is in \f[CR]/etc/X11/xorg.conf.d/\f[R]. +A keyboard that types the wrong characters in a terminal but the right +ones on the console (or the other way round) is set in the other place. +.PP +The fonts are installed with the X sets. +\f[CR]fc\-list(1)\f[R] lists them and \f[CR]fc\-cache \-f\f[R] refreshes +the cache after a font is added. +MCDE\(aqs terminal and login screen use Hack; the rest of the desktop +uses the system font, which System Settings changes. +.SS Programs from another machine +An X program can run on one machine and display on another. +SSH forwards the connection, which is the safe way: +.IP +.EX +$ ssh \-X name\(atstudio.example xterm +.EE +.PP +\f[CR]\-X\f[R] asks for trusted forwarding; \f[CR]\-Y\f[R] is the older, +less restricted form. +The remote machine needs an X client and the local one needs the server, +which Makronix has. +A program that refuses to start has usually failed an authorization +check; the SSH connection sets that up for you. diff --git a/src/share/man/man7/makronix-guide.7 b/src/share/man/man7/makronix-guide.7 new file mode 100644 index 0000000000..11f5f3748b --- /dev/null +++ b/src/share/man/man7/makronix-guide.7 @@ -0,0 +1,106 @@ +.TH "MAKRONIX-GUIDE" "7" "November 2026" "Makronix 0.99.10" "Makronix Guide" +.SH NAME +makronix-guide \- the Makronix Guide +.SH DESCRIPTION +This is the guide to Makronix, a desktop operating system built on +NetBSD, and to MCDE, its desktop. The guide has one chapter per +manual page, and the same text is installed as a PDF and as an HTML +file in +.Pa /usr/share/doc/makronix/ . +.PP +The MCDE Information Manager +.Xr dtinfo 1 +opens the same text from its information library. +.SH CHAPTERS +.TP +.B makronix-guide-preface(7) +Preface +.TP +.B makronix-guide-what(7) +What Makronix Is +.TP +.B makronix-guide-tour(7) +A Tour of the System +.TP +.B makronix-guide-before-install(7) +Before You Install +.TP +.B makronix-guide-install(7) +Installing Makronix +.TP +.B makronix-guide-upgrade(7) +Upgrading Makronix +.TP +.B makronix-guide-mcde(7) +MCDE: The Desktop +.TP +.B makronix-guide-x11(7) +The Display and X11 +.TP +.B makronix-guide-dtinfo(7) +The Information Manager +.TP +.B makronix-guide-shell(7) +The Command Line +.TP +.B makronix-guide-rc(7) +Services and rc.d +.TP +.B makronix-guide-users(7) +Users and Accounts +.TP +.B makronix-guide-disks(7) +Disks and Filesystems +.TP +.B makronix-guide-pkgsrc(7) +Packages and pkgsrc +.TP +.B makronix-guide-printing(7) +Printing, Sound and Power +.TP +.B makronix-guide-network(7) +Networking +.TP +.B makronix-guide-services(7) +DNS, DHCP and NTP +.TP +.B makronix-guide-sharing(7) +Remote Access and File Sharing +.TP +.B makronix-guide-firewall(7) +The Firewall +.TP +.B makronix-guide-mailweb(7) +Mail and the Web +.TP +.B makronix-guide-building(7) +Building Makronix +.TP +.B makronix-guide-cross(7) +Cross-Building and the Source Tree +.TP +.B makronix-guide-updating(7) +Updating the Desktop +.TP +.B makronix-guide-help(7) +Appendix A: Getting Help +.TP +.B makronix-guide-glossary(7) +Appendix B: Glossary +.TP +.B makronix-guide-license(7) +Appendix C: Licence and Sources +.SH FILES +.TP +.I /usr/share/doc/makronix/makronix-guide.pdf +The guide as a PDF. +.TP +.I /usr/share/doc/makronix/makronix-guide.html +The guide as one HTML file. +.TP +.I /etc/dt/infolib/en_US.UTF-8/makronix.dti +The guide as an MCDE information library. +.SH SEE ALSO +.BR dtinfo (1), +.BR man (1), +.BR afterboot (8) diff --git a/tools/test-tools.sh b/tools/test-tools.sh index d885744b6f..71800b3aac 100755 --- a/tools/test-tools.sh +++ b/tools/test-tools.sh @@ -311,5 +311,26 @@ else bad "makronix-set broken relative-@cwd falls red" "rc=$brc but progA still listed" fi +# --- docs/guide ----------------------------------------------------------- +# The guide's installed forms: green on the tree as it is, red when one of +# them is missing. check.sh reads only the installed copies; it does not +# need pandoc or Chrome. +G="$TMP/guideroot" +mkdir -p "$G/src/share/doc/makronix" "$G/src/share/man/man7" "$G/src/etc" +cp -R "$R/src/share/doc/makronix/." "$G/src/share/doc/makronix/" +cp "$R/src/share/man/man7"/makronix-guide*.7 "$G/src/share/man/man7/" +cp "$R/src/etc/makronix-xsession" "$R/src/etc/Makefile" "$G/src/etc/" +if sh "$R/docs/guide/check.sh" "$G" >"$TMP/guide.ok" 2>&1; then + pass "guide check green" +else + bad "guide check green" "$(cat "$TMP/guide.ok")" +fi +rm -f "$G/src/share/man/man7/makronix-guide-mcde.7" +if sh "$R/docs/guide/check.sh" "$G" >"$TMP/guide.bad" 2>&1; then + bad "guide check broken man page falls red" "check still passed" +else + pass "guide check broken man page falls red" +fi + printf 'result: %s ok, %s bad\n' "$ok" "$fail" [ "$fail" -eq 0 ]