docs: add The Makronix Guide and its four installed forms

One DocBook source in docs/guide produces the manual pages, one HTML
file, the PDF and an MCDE information library.  The guide follows the
structure of The NetBSD Guide, describes Makronix 0.99.10
(Camouflage), and has its own chapters for MCDE, the Information
Manager and the display.

The forms are installed by the release:

  /usr/share/doc/makronix/makronix-guide.html
  /usr/share/doc/makronix/makronix-guide.pdf
  /usr/share/doc/makronix/infolib/makronix.dti/   (base-sys-share)
  /usr/share/man/man7/makronix-guide*.7           (man-reference-man)
  /etc/dt/config/Xsession.d/0000makronix          (etc-sys-etc)
  /etc/dt/infolib/en_US.UTF-8/makronix.dti        (symlink)

The information library is built with MCDE's dtdocbook2infolib from a
small Lua writer for the CDE DocBook SGML dialect; tools/test-tools.sh
runs docs/guide/check.sh on the installed copies and proves that a
missing manual page falls red.
This commit is contained in:
lotherk committed 2026-11-15 21:21:49 +00:00
1 parent f8211cd379
commit b654bf74a2
94 files changed
+10277 -2

No files matched your search

+4
View File
@@ -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/
+3
View File
@@ -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
+64
View File
@@ -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.
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!--
The Makronix Guide. English is the language of the guide (the tree's
artefacts are English; the chat is German).
License: CNCL 1.0 for the Makronix text, see LICENSE at the top of the
tree. The structure follows The NetBSD Guide; the general NetBSD
procedures are credited in Appendix C.
-->
<book xml:id="makronix-guide" lang="en">
<bookinfo>
<title>The Makronix Guide</title>
<subtitle>A guide to the Makronix operating system and the MCDE desktop</subtitle>
<author>
<orgname>Makronix</orgname>
</author>
<pubdate>November 2026</pubdate>
<releaseinfo>For Makronix 0.99.10 (Camouflage), based on NetBSD</releaseinfo>
<legalnotice>
<para>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.</para>
</legalnotice>
</bookinfo>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/preface.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/what.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/tour.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/before-install.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/install.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/upgrade.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/mcde.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/x11.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/dtinfo.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/shell.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/rc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/users.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/disks.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/pkgsrc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/printing.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/network.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/services.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/sharing.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/firewall.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/mailweb.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/building.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/cross.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/updating.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/help.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/glossary.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapters/license.xml"/>
</book>
+317
View File
@@ -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 '<Book>' "$TMP/cde/book.sgm" ||
die "the CDE writer produced no Book"
# A nested <para> is invalid in the CDE DTD; catch it here, not in dtinfo.
if grep -q '<para>[^<]*<para>' "$TMP/cde/book.sgm"; then
die "the CDE writer produced a nested para"
fi
cat > "$TMP/cde/bookcase.bc" <<EOF
<!DOCTYPE Bookcase PUBLIC "-//Common Desktop Environment//DTD DtInfo Bookcase Description//EN" [
<!ENTITY docsty SYSTEM "$MCDE/doc/common/docbook/docbook.stl">
<!ENTITY guideTOC SYSTEM "./TOC.sgm" SUBDOC>
<!ENTITY guide SYSTEM "./book.sgm" SUBDOC>
]>
<BOOKCASE StyleSheet="cdedoc">
<BOOKCASENAME>MAKRONIX</>
<BOOKCASEDESC>The Makronix Guide</>
&docsty;
<BOOK>
<TITLE>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
+30
View File
@@ -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
+130
View File
@@ -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</title>
<para>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.</para>
<sect1 id="before-hardware">
<title>The machine</title>
<para>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.</para>
<para>The USB image starts on UEFI machines and, through the protective
MBR, on BIOS-only machines. A Mac needs its firmware boot menu: hold
<literal>Option</literal> while the machine starts and choose the stick.
The DVD and the CDs start through the normal firmware boot order.</para>
</sect1>
<sect1 id="before-media">
<title>The media</title>
<para>A Makronix release is more than one image:</para>
<itemizedlist>
<listitem><para>the <emphasis>USB image</emphasis> or the
<emphasis>DVD</emphasis>, which carry the system and the
<quote>makronix</quote> set;</para></listitem>
<listitem><para><emphasis>CD 1</emphasis>, which carries the system
and starts the installer;</para></listitem>
<listitem><para><emphasis>CD 2</emphasis>, which carries the
<quote>makronix</quote> set (the desktop and its programs);</para></listitem>
<listitem><para><emphasis>CD 3</emphasis>, which carries the binary
packages (Firefox, Thunderbird, QEMU, the games).</para></listitem>
</itemizedlist>
<para>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
<command>make sourcesets</command>; the installed system can also fetch
it later.</para>
</sect1>
<sect1 id="before-usb">
<title>Writing a USB stick</title>
<para>Write the image to the whole device, not to a partition. On
NetBSD, find the device with <citerefentry><refentrytitle>dmesg</refentrytitle><manvolnum>8</manvolnum></citerefentry>
after inserting the stick; it is usually
<filename>/dev/rsd0d</filename>.</para>
<screen># dd if=Makronix-0.99.10-amd64-install.img of=/dev/rsd0d bs=1m conv=sync</screen>
<para>On Linux the same operation is:</para>
<screen># dd if=Makronix-0.99.10-amd64-install.img of=/dev/sdX bs=4M conv=fsync status=progress</screen>
<para>Replace <filename>/dev/sdX</filename> with the stick, and check
the device name twice: <command>dd</command> 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.</para>
</sect1>
<sect1 id="before-answers">
<title>The answers the installer needs</title>
<para>The simple installation asks for the following. Write them down
before you start; the installer does not go back once it has begun.</para>
<variablelist>
<varlistentry>
<term>The disk</term>
<listitem><para>The whole disk that will hold Makronix. Every
partition on it is destroyed.</para></listitem>
</varlistentry>
<varlistentry>
<term>Encryption</term>
<listitem><para>Whether the disk is encrypted with
<citerefentry><refentrytitle>cgd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
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.</para></listitem>
</varlistentry>
<varlistentry>
<term>The computer's name</term>
<listitem><para>A short host name, without spaces or dots. The
local network name becomes
<replaceable>name</replaceable><filename>.local</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term>The network</term>
<listitem><para>Ethernet with DHCP, or a Wi-Fi network and its
passphrase. The installer configures the interface and enables
<citerefentry><refentrytitle>dhcpcd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem>
</varlistentry>
<varlistentry>
<term>The time zone</term>
<listitem><para>The zone of the place the machine is in, for
example <filename>Europe/Berlin</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term>The administrator's password</term>
<listitem><para>The password of <username>root</username>. It is
used with <command>su</command>.</para></listitem>
</varlistentry>
<varlistentry>
<term>Your account</term>
<listitem><para>A user name, a full name and a password. The
account is put in the groups that a desktop user needs: wheel (for
<command>su</command>), operator, staff, users, dialer (serial
ports), games and wsrc (the source tree).</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="before-backup">
<title>Back up, then begin</title>
<para>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.</para>
</sect1>
</chapter>
+143
View File
@@ -0,0 +1,143 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="building">
<title>Building Makronix</title>
<para>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.</para>
<sect1 id="building-layout">
<title>The source tree</title>
<variablelist>
<varlistentry>
<term><filename>src/</filename></term>
<listitem><para>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
<filename>refs/netbsd/src</filename>, for reading.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>xsrc/</filename></term>
<listitem><para>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.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>pkgsrc/</filename></term>
<listitem><para>The pkgsrc checkout, pinned. It is not edited; a
change is a moved pin or a package in <filename>ext/</filename> or
the local <filename>wip</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>ext/</filename></term>
<listitem><para>The third-party trees Makronix ships and changes:
MCDE, its Motif build, afpfs-ng and glibc. Each has its own recipe
and its own <filename>IMPORT</filename> note.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>tools/</filename></term>
<listitem><para>Makronix's own POSIX shell tools: the build stamp,
the package list reader, the set generator, the test harnesses and
the MCDE helpers.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>docs/</filename> and <filename>www/</filename></term>
<listitem><para>The contracts and the guide, and the web site. The
guide's source is <filename>docs/guide/book.xml</filename>.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="building-entry">
<title>One entry point</title>
<para>Everything is built from the top-level <filename>Makefile</filename>.
The interface is deliberately small:</para>
<screen>$ 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</screen>
<para><command>make release</command> builds the sets and the kernels;
<command>make iso</command> packages what the release built; it refuses
to run if a source changed since, because the medium would not match its
sets. <command>make usb</command> needs the source sets under
<filename>source/sets</filename>; <command>make sourcesets</command>
writes them.</para>
<para><command>ARCH</command> is the name a person types: amd64, i386,
macppc, evbarm. On a NetBSD host without <command>ARCH</command>, the
host decides; on a cross host it is amd64 unless named. <command>JOBS</command>
sets the parallelism.</para>
</sect1>
<sect1 id="building-cross">
<title>Cross and native are one build</title>
<para>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
<command>build.sh</command> 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.</para>
<para>The pkgsrc packages are built for the target with the same
toolchain; <filename>tools/pkgsrc-cross.mk.conf</filename> is the whole
configuration, and <filename>pkgsrc/</filename> itself is not patched.
The workarounds in that file are measured; <xref linkend="cross"/>
explains them and when they can go.</para>
</sect1>
<sect1 id="building-output">
<title>Where the results land</title>
<para>The build writes to <filename>build/obj</filename>: the object
tree, <filename>destdir.</filename><replaceable>arch</replaceable> and
the release directory <filename>releasedir</filename>. The logs are in
<filename>build/logs</filename>. A medium is in
<filename>releasedir/images</filename>; the sets are in
<filename>releasedir/</filename><replaceable>arch</replaceable><filename>/binary/sets</filename>.</para>
<para>The gate is <command>checkflist</command>, 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
<command>checkflist</command> reports neither.</para>
</sect1>
<sect1 id="building-device">
<title>Building on the installed system</title>
<para>The source set installs to <filename>/usr/src</filename>,
<filename>/usr/xsrc</filename> and <filename>/usr/msrc</filename>.
Build from <filename>/usr/msrc</filename> as a user in the wsrc group:</para>
<screen>$ cd /usr/msrc
$ export MAKRONIX_TOP=/usr/msrc
$ make release ARCH=amd64</screen>
<para>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 <filename>PINS</filename> names the revisions they
came from.</para>
</sect1>
<sect1 id="building-tests">
<title>Tests</title>
<para><command>make test</command> 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
<filename>tools/</filename> and each can be run alone.</para>
</sect1>
</chapter>
+117
View File
@@ -0,0 +1,117 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="cross">
<title>Cross-Building and the Source Tree</title>
<para>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 <command>build.sh</command> builds first. This chapter is
for the person who works on that build, not for the person who installs
the result.</para>
<sect1 id="cross-detect">
<title>What the build detects</title>
<para><filename>tools/userland.sh</filename> looks at
<command>uname -s</command>. On NetBSD it builds natively with the
host's pkgsrc and installs into the host's <filename>/usr/pkg</filename>;
on anything else it cross-builds with the toolchain and the sysroot in
<filename>build/obj</filename>. The packages are the same either way;
<filename>tools/pkgsrc-cross.mk.conf</filename> is the only
configuration that is specific to the cross case, and
<filename>pkgsrc/</filename> is not patched.</para>
<para>The build's paths come from <filename>MAKRONIX_TOP</filename>.
On a development machine that is the repository root; on an installed
system with the source set it is <filename>/usr/msrc</filename>.</para>
</sect1>
<sect1 id="cross-workarounds">
<title>The cross workarounds, and why they exist</title>
<para>Four settings in <filename>tools/pkgsrc-cross.mk.conf</filename>
were each added after a measured failure. They are documented in
<filename>docs/CROSS.md</filename> in the source set; in short:</para>
<itemizedlist>
<listitem><para><application>fonts/Xft2</application> runs a C++
probe it does not declare. The cross configuration adds
<literal>USE_LANGUAGES+= c c++</literal>, which gives it a real
compiler instead of pkgsrc's fail wrapper.</para></listitem>
<listitem><para><application>fonts/Xft2</application> calls
<function>FT_GlyphSlot_Embolden</function> without the header that
declares it after FreeType moved it. The build adds
<literal>-include freetype/ftsynth.h</literal>. This is a GCC-14
strictness issue, not a cross issue; the native build may need it
too.</para></listitem>
<listitem><para><application>pkgtools/x11-links</application> probes
<filename>/usr</filename> for X headers. In a cross build that is the
host's X, not the target's; the configuration points it at
<filename>${CROSS_DESTDIR}/usr/X11R7</filename>.</para></listitem>
<listitem><para>X's configure passes absolute
<filename>/usr/X11R7/include</filename> and
<filename>/usr/X11R7/lib</filename>, which do not resolve inside the
sysroot. The build adds the sysroot-relative GCC form
<literal>-I=/usr/X11R7/include</literal> and
<literal>-L=/usr/X11R7/lib</literal>.</para></listitem>
</itemizedlist>
<para>Each setting has a removal criterion in
<filename>docs/CROSS.md</filename>: when the package builds without it
in both modes, it goes. A workaround that outlives its cause is a bug
with a comment.</para>
</sect1>
<sect1 id="cross-forks">
<title>Forks and imported trees</title>
<para>What Makronix changes is a fork in <filename>ext/</filename>; what
it does not change is imported and left alone. The NetBSD tree is
<filename>src/</filename> with its base commit in
<filename>src/BASE</filename>; the X tree is <filename>xsrc/</filename>
with <filename>xsrc/BASE</filename>; upstream for reading is
<filename>refs/netbsd</filename> and <filename>refs/linux</filename>.
The import of a fork is one commit of the upstream archive, and every
change after it is a visible diff.</para>
<para>MCDE is the largest fork. Its build for the host is
<command>make mcde-host</command>; its Linux build is
<command>make mcde-linux</command>. The host build is what produces
<command>dtdocbook2infolib</command> and <command>dtinfo</command> for
the documentation and for testing without a target machine; the cross
build for the release is part of <command>make userland</command>.</para>
</sect1>
<sect1 id="cross-rules">
<title>The rules that keep it buildable</title>
<itemizedlist>
<listitem><para>A package that builds only on one host is broken. Fix
the recipe, the configuration in <filename>tools/</filename>, or the
source in <filename>ext/</filename>; do not build it in a virtual
machine.</para></listitem>
<listitem><para><filename>pkgsrc/</filename> and <filename>refs/</filename>
are not edited. A change is a moved pin, recorded in
<filename>PINS</filename>, or a package of our own.</para></listitem>
<listitem><para><filename>tools/</filename> is POSIX shell: no bash,
no Python, no transient units. A tool that only runs on the author's
machine is not a tool.</para></listitem>
<listitem><para>The set list is generated, not written:
<filename>tools/makronix-set.sh</filename> reads the installed tree
back and writes <filename>src/distrib/sets/lists/makronix/mi</filename>.
A file that is installed but not in the list fails
<command>checkflist</command>.</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="cross-platforms">
<title>Other platforms</title>
<para><command>make release ARCH=macppc</command> 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 <filename>docs/PLATFORMS.md</filename>. 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.</para>
</sect1>
</chapter>
+157
View File
@@ -0,0 +1,157 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="disks">
<title>Disks and Filesystems</title>
<para>NetBSD names disks by driver and number: <filename>sd0</filename>
is the first SCSI or SATA disk, <filename>wd0</filename> the first IDE
disk, <filename>ld0</filename> a logical disk, <filename>cd0</filename> a
CD or DVD drive. A partition is a letter after the disk:
<filename>sd0a</filename> is the first partition of the first disk. The
raw device has an <literal>r</literal> in front
(<filename>rsd0a</filename>); the block device is the one you mount.</para>
<sect1 id="disks-see">
<title>Seeing what is there</title>
<screen>$ dmesg | grep -E 'sd|wd|cd'
$ disklabel sd0
$ df -h
$ du -sh /home/*</screen>
<para><citerefentry><refentrytitle>disklabel</refentrytitle><manvolnum>8</manvolnum></citerefentry>
prints the partition table of a disk;
<citerefentry><refentrytitle>df</refentrytitle><manvolnum>1</manvolnum></citerefentry>
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.</para>
</sect1>
<sect1 id="disks-add">
<title>Adding a disk</title>
<para>A new disk has no label until one is written. The interactive
editor is the safe way to look first:</para>
<screen># disklabel -i sd1
disklabel&gt; p
disklabel&gt; a
partition&gt; a
offset&gt; [Enter]
size&gt; [Enter]
fstype&gt; 4.2BSD
disklabel&gt; w
disklabel&gt; q</screen>
<para>The partition table is written by <literal>w</literal>; nothing
happens before it. A GPT disk can be edited with
<citerefentry><refentrytitle>gpt</refentrytitle><manvolnum>8</manvolnum></citerefentry>
instead. After the label, make a file system and mount it:</para>
<screen># newfs /dev/rsd1e
# mkdir -p /data
# mount /dev/sd1e /data</screen>
<para>The raw device is the one for <command>newfs</command>. A file
system that should come back after a reboot belongs in
<filename>/etc/fstab</filename>:</para>
<screen>/dev/sd1e /data ffs rw 1 2</screen>
<para><citerefentry><refentrytitle>newfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
destroys what was on the partition. Check the device name with
<command>disklabel</command> before you type it.</para>
</sect1>
<sect1 id="disks-backup">
<title>Backing up a file system</title>
<para><citerefentry><refentrytitle>dump</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and <citerefentry><refentrytitle>restore</refentrytitle><manvolnum>8</manvolnum></citerefentry>
are the NetBSD pair for a whole file system. They preserve owners,
modes and hard links, which <command>cp</command> does not:</para>
<screen># dump -0 -f /backup/root.dump /
# restore -i -f /backup/root.dump</screen>
<para>For a directory, <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is enough, and a compressed archive is easier to keep:</para>
<screen>$ tar -czf /backup/home.tar.gz /home
$ tar -xzf /backup/home.tar.gz -C /</screen>
<para>A backup that has never been restored is a hope. Restore one file
from the archive before you trust it.</para>
</sect1>
<sect1 id="disks-encryption">
<title>Encrypted disks</title>
<para>An installation with encryption uses
<citerefentry><refentrytitle>cgd</refentrytitle><manvolnum>4</manvolnum></citerefentry>.
The key is derived from a passphrase and stored in
<filename>/etc/cgd/</filename><replaceable>disk</replaceable>. 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 <filename>/cgdboot</filename>.</para>
<para>To encrypt another disk by hand, create the configuration, then
the cgd device, then a file system on it:</para>
<screen># 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</screen>
<para>The exact partition letters and the choice of algorithm are the
administrator's; <citerefentry><refentrytitle>cgdconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry>
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.</para>
</sect1>
<sect1 id="disks-raid-lvm">
<title>RAID, LVM and concatenation</title>
<para>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:</para>
<itemizedlist>
<listitem><para><citerefentry><refentrytitle>raidctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; 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.</para></listitem>
<listitem><para><citerefentry><refentrytitle>lvm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; logical volumes: physical volumes, a volume group, logical
volumes that can grow. It is the flexible choice for a data
disk.</para></listitem>
<listitem><para><citerefentry><refentrytitle>ccdconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; concatenation and striping without RAIDframe. Simple, and
with no redundancy.</para></listitem>
</itemizedlist>
<para>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.</para>
</sect1>
<sect1 id="disks-check">
<title>Checking a file system</title>
<para><citerefentry><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>
runs at boot on an unclean file system. A file system that needs it by
hand must be unmounted first:</para>
<screen># umount /data
# fsck -f /dev/rsd1e
# mount /data</screen>
<para><command>fsck -n</command> only reports; it changes nothing. The
output names every repaired inode, and a file that was open during a
crash can end up in <filename>lost+found</filename> at the top of the
file system.</para>
</sect1>
</chapter>
+116
View File
@@ -0,0 +1,116 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="dtinfo">
<title>The Information Manager</title>
<para><citerefentry><refentrytitle>dtinfo</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is MCDE's Information Manager. It reads <firstterm>information
libraries</firstterm>: 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.</para>
<sect1 id="dtinfo-open">
<title>Opening the guide</title>
<para>The Makronix Guide is the default library of the Information
Manager, so <command>dtinfo</command> opens it directly. It is also in
the <guimenu>Help</guimenu> menu of the MCDE programs and in the
Makronix menu. From a terminal, the same:</para>
<screen>$ dtinfo
$ dtinfo -l makronix</screen>
<para>The first command opens the default library; the second names the
library explicitly. The library is installed as
<filename>/etc/dt/infolib/en_US.UTF-8/makronix.dti</filename>. The
session script
<filename>/etc/dt/config/Xsession.d/0000makronix</filename> sets
<envar>DTINFOLIBDEFAULT</envar> to <literal>makronix</literal>, which is
why the plain command works.</para>
</sect1>
<sect1 id="dtinfo-use">
<title>Reading and searching</title>
<para>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.</para>
<para>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.</para>
</sect1>
<sect1 id="dtinfo-format">
<title>What an information library is</title>
<para>An information library is a directory whose name ends in
<filename>.dti</filename>. It contains a
<filename>bookcase.map</filename> that names the library and its
bookcases, one directory per bookcase with the compiled books, and a
<filename>dtsearch</filename> directory with the full-text index. The
books are written in DocBook, the SGML dialect that CDE's documentation
uses, and compiled with <command>dtdocbook2infolib</command>.</para>
<para>The Makronix Guide is built from
<filename>docs/guide/book.xml</filename> in the source tree. The same
source produces the manual pages, the PDF, the HTML file and this
library; <xref linkend="building"/> explains the build. If you change
the guide, rebuild it with:</para>
<screen>$ cd /usr/msrc
$ sh docs/guide/build.sh all
$ sh docs/guide/build.sh install</screen>
<para>The first command builds all four forms in
<filename>docs/guide/out</filename>; the second copies them to the
places the system reads: <filename>/usr/share/doc/makronix</filename>,
<filename>/usr/share/man/man7</filename> and
<filename>/etc/dt/infolib</filename>.</para>
</sect1>
<sect1 id="dtinfo-add">
<title>Adding another library</title>
<para>A library that someone gives you is a directory ending in
<filename>.dti</filename>. Put it under the locale directory of the
system library and name it on the command line:</para>
<screen># cp -R example.dti /etc/dt/infolib/en_US.UTF-8/
$ dtinfo -l example</screen>
<para>The library's own <filename>bookcase.map</filename> names its
bookcases; <command>dtinfo</command> 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 <filename>~/.dt/infolib</filename>; the search path
finds it there as well.</para>
</sect1>
<sect1 id="dtinfo-trouble">
<title>When the Information Manager is empty</title>
<para>If <command>dtinfo</command> starts but shows no books, the
library was not found. Check the three things it depends on:</para>
<itemizedlist>
<listitem><para><filename>/etc/dt/infolib/en_US.UTF-8/makronix.dti/bookcase.map</filename>
exists and is readable.</para></listitem>
<listitem><para><envar>DTINFOLIBDEFAULT</envar> is
<literal>makronix</literal> in the session
(<command>echo $DTINFOLIBDEFAULT</command>).</para></listitem>
<listitem><para><envar>DTINFOLIBSEARCHPATH</envar> contains
<filename>/etc/dt/infolib/%L/%I.dti</filename>. The command
<command>dtsearchpath</command> prints the assembled path; run it in
the session that has the problem.</para></listitem>
</itemizedlist>
<para>A library that was copied from another machine can have a stale
search index. Rebuilding it with <command>dtdocbook2infolib</command>
is described in the DocBook chapter of the CDE documentation; for the
Makronix Guide, <command>docs/guide/build.sh infolib</command> does
it.</para>
</sect1>
</chapter>
+106
View File
@@ -0,0 +1,106 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="firewall">
<title>The Firewall</title>
<para>Makronix turns on NetBSD's packet filter,
<citerefentry><refentrytitle>npf</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
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.</para>
<sect1 id="firewall-default">
<title>The default rule set</title>
<para><filename>/etc/npf.conf</filename> on a freshly installed machine
is the following. It is the rule set that the installer writes and that
<filename>/usr/src/docs/reference/npf-default.conf</filename> records
for validation:</para>
<screen>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
}</screen>
<para>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. <literal>stateful</literal> means that the reply to a
connection the machine started is allowed without a rule of its
own.</para>
</sect1>
<sect1 id="firewall-open">
<title>Opening one port</title>
<para>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 <literal>block in final all</literal>:</para>
<screen> pass stateful in final proto tcp to any port 80</screen>
<para>Then check the file and reload the running rule set. A rule set
with a syntax error must not be loaded; <command>npfctl validate</command>
reads the file without touching the running one:</para>
<screen># npfctl validate /etc/npf.conf
# /etc/rc.d/npf reload
# npfctl show
# npfctl stats</screen>
<para><command>npfctl show</command> 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
<filename>/var/log/messages</filename> say why.</para>
</sect1>
<sect1 id="firewall-service">
<title>The firewall at boot</title>
<para>The service is enabled in <filename>/etc/rc.conf</filename>:</para>
<screen>npf=YES</screen>
<para>At boot, <command>npf</command> loads <filename>/etc/npf.conf</filename>
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.</para>
</sect1>
<sect1 id="firewall-more">
<title>NAT and a router</title>
<para>A machine that routes between two networks needs NAT and forwarding.
The rules are in <citerefentry><refentrytitle>npf.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>;
the shape is a <literal>map</literal> line for the outgoing interface
and <literal>pass</literal> rules for the two directions. Forwarding
itself is a <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
setting:</para>
<screen># sysctl -w net.inet.ip.forwarding=1
# echo 'net.inet.ip.forwarding=1' &gt;&gt; /etc/sysctl.conf</screen>
<para>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.</para>
</sect1>
</chapter>
+110
View File
@@ -0,0 +1,110 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="glossary">
<title>Appendix B: Glossary</title>
<para>The words this guide uses in a particular sense.</para>
<variablelist>
<varlistentry>
<term>base system</term>
<listitem><para>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.</para></listitem>
</varlistentry>
<varlistentry>
<term>CDE</term>
<listitem><para>The Common Desktop Environment, the Motif desktop
that Sun, HP, IBM, DEC and others shipped. MCDE is its
fork.</para></listitem>
</varlistentry>
<varlistentry>
<term>cgd</term>
<listitem><para>NetBSD's cryptographic disk driver. An encrypted
installation is a cgd over the root file system.</para></listitem>
</varlistentry>
<varlistentry>
<term>cross build</term>
<listitem><para>Building for one machine on another. Makronix's build
cross-builds when the host is not NetBSD and builds natively when it
is.</para></listitem>
</varlistentry>
<varlistentry>
<term>disklabel</term>
<listitem><para>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.</para></listitem>
</varlistentry>
<varlistentry>
<term>dtinfo</term>
<listitem><para>The MCDE Information Manager: the program that reads
information libraries and displays their books.</para></listitem>
</varlistentry>
<varlistentry>
<term>dtlogin</term>
<listitem><para>The MCDE login screen. It starts the X server and the
session.</para></listitem>
</varlistentry>
<varlistentry>
<term>information library</term>
<listitem><para>A directory ending in <filename>.dti</filename> that
holds a bookcase, its books and the full-text index. The Makronix
Guide is one.</para></listitem>
</varlistentry>
<varlistentry>
<term>makronix set</term>
<listitem><para>The packages that Makronix ships on the medium and
unpacks as part of the system. MCDE is in it. It is not registered
with <command>pkg_add</command>.</para></listitem>
</varlistentry>
<varlistentry>
<term>MCDE</term>
<listitem><para>The Makronix Common Desktop Environment: the fork of
CDE that is Makronix's desktop.</para></listitem>
</varlistentry>
<varlistentry>
<term>Motif</term>
<listitem><para>The widget toolkit CDE and MCDE are written
against.</para></listitem>
</varlistentry>
<varlistentry>
<term>msrc</term>
<listitem><para>The Makronix source set: the tools, the documentation,
pkgsrc, the distfiles and the pins, installed in
<filename>/usr/msrc</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term>npf</term>
<listitem><para>NetBSD's packet filter, the firewall Makronix enables
by default.</para></listitem>
</varlistentry>
<varlistentry>
<term>pkgsrc</term>
<listitem><para>The package system that supplies
<filename>/usr/pkg</filename>: a tree of recipes, the package tools,
and binary repositories.</para></listitem>
</varlistentry>
<varlistentry>
<term>release</term>
<listitem><para>Everything a version of Makronix consists of: the sets,
the kernels, the media and the name. 0.99.10 is
<quote>Camouflage</quote>.</para></listitem>
</varlistentry>
<varlistentry>
<term>set</term>
<listitem><para>A group of files that the installer can select: the
base sets, the X sets, the games and the source sets. The
<quote>makronix</quote> set is the desktop and its
programs.</para></listitem>
</varlistentry>
<varlistentry>
<term>sysinst</term>
<listitem><para>The installer. Makronix's fork has a simple way and
the full NetBSD way.</para></listitem>
</varlistentry>
<varlistentry>
<term>wsrc</term>
<listitem><para>The group that may write the source tree, so that a
user can rebuild the system without becoming root.</para></listitem>
</varlistentry>
</variablelist>
</chapter>
+64
View File
@@ -0,0 +1,64 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="help">
<title>Appendix A: Getting Help</title>
<para>A Unix system documents itself. The order that works is: the manual
page for the command, the file in <filename>/usr/share/doc</filename>, the
source, then the network. The network is last because it is the only one
that may be wrong about your version.</para>
<sect1 id="help-man">
<title>The manual pages</title>
<para><command>man</command> is described in
<xref linkend="shell-man"/>. The pages that are worth reading before
anything else are:</para>
<itemizedlist>
<listitem><para><citerefentry><refentrytitle>afterboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; what to do after the first boot;</para></listitem>
<listitem><para><citerefentry><refentrytitle>intro</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; the system administration commands and how they fit;</para></listitem>
<listitem><para><citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>
&#x2014; the file system layout;</para></listitem>
<listitem><para><citerefentry><refentrytitle>pkgsrc</refentrytitle><manvolnum>7</manvolnum></citerefentry>
&#x2014; pkgsrc and the package tools;</para></listitem>
<listitem><para><citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
&#x2014; the services;</para></listitem>
<listitem><para><citerefentry><refentrytitle>npf.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
&#x2014; the firewall.</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="help-online">
<title>The web and the source</title>
<para>The NetBSD project's documentation is the reference for the parts
Makronix inherited: <filename>https://www.NetBSD.org/docs/</filename>,
the NetBSD Guide and the manual pages online. For Makronix itself, the
source tree is the last word: <filename>/usr/msrc</filename> holds the
guide, the tools, the build contract and the records of what was
measured.</para>
<para>When you ask for help, give the version
(<command>uname -a</command>), the command you ran, what you expected
and what happened. The output of <command>dmesg</command> and the
relevant lines of <filename>/var/log/messages</filename> are worth more
than a description.</para>
</sect1>
<sect1 id="help-guide">
<title>This guide in its four forms</title>
<itemizedlist>
<listitem><para><command>man makronix-guide</command> lists the
chapters; each chapter is a page in section 7.</para></listitem>
<listitem><para><filename>/usr/share/doc/makronix/makronix-guide.pdf</filename>
is the printable form.</para></listitem>
<listitem><para><filename>/usr/share/doc/makronix/makronix-guide.html</filename>
is one file and opens in any browser.</para></listitem>
<listitem><para><command>dtinfo</command> opens the same text in the
MCDE Information Manager, with search.</para></listitem>
</itemizedlist>
</sect1>
</chapter>
+164
View File
@@ -0,0 +1,164 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="install">
<title>Installing Makronix</title>
<para>The installer is <citerefentry><refentrytitle>sysinst</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
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.</para>
<sect1 id="install-boot">
<title>Starting the installer</title>
<para>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
<literal>Option</literal> 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.</para>
<para>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.</para>
</sect1>
<sect1 id="install-simple">
<title>The simple way</title>
<orderedlist>
<listitem>
<para><emphasis>Choose the installation type.</emphasis> The simple
way is the first choice. The full way is
<quote>Install NetBSD</quote> and is described in
<xref linkend="install-full"/>.</para>
</listitem>
<listitem>
<para><emphasis>Choose the disk.</emphasis> 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.</para>
</listitem>
<listitem>
<para><emphasis>Decide about encryption.</emphasis> If you say yes,
the installer encrypts the root file system with
<citerefentry><refentrytitle>cgd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
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.</para>
</listitem>
<listitem>
<para><emphasis>The installer partitions the disk and unpacks the
sets.</emphasis> It installs the base system, the
<quote>makronix</quote> 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.</para>
</listitem>
<listitem>
<para><emphasis>Answer the configuration forms.</emphasis> 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 <xref linkend="before-answers"/>.</para>
</listitem>
<listitem>
<para><emphasis>Reboot.</emphasis> Remove the medium. The machine
starts into <citerefentry><refentrytitle>dtlogin</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
the MCDE login screen.</para>
</listitem>
</orderedlist>
<para>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
<replaceable>name</replaceable><filename>.local</filename> on the local
network.</para>
<para><emphasis>Note:</emphasis> 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.</para>
</sect1>
<sect1 id="install-full">
<title>The full way</title>
<para>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 <citetitle>The NetBSD Guide</citetitle>, chapter
<quote>Example installation</quote>; the questions and their meanings
are NetBSD's, and the installer's manual page is
<citerefentry><refentrytitle>sysinst</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<para>Two Makronix details matter in the full way:</para>
<itemizedlist>
<listitem><para>Choose the <quote>makronix</quote> set as well as the
base sets. Without it there is no desktop, no
<command>dtlogin</command> and no MCDE programs.</para></listitem>
<listitem><para>The <quote>Next CD</quote> 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.</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="install-encrypted">
<title>An encrypted system</title>
<para>With encryption, the disk holds one <command>cgd</command>
partition with the root file system, and a small unencrypted partition
that the boot loader can read: the kernel, <filename>cgdroot.kmod</filename>
and <filename>cgd.conf</filename>. The loader asks for the passphrase,
unlocks the disk and starts the kernel from the encrypted root.</para>
<para>The unencrypted partition is mounted as <filename>/cgdboot</filename>
(with <quote>noauto</quote> in <filename>/etc/fstab</filename>). A
kernel update on an encrypted system is not complete until the new
kernel and the matching <filename>cgdroot.kmod</filename> are copied to
it; <xref linkend="upgrade-encrypted"/> gives the commands.</para>
</sect1>
<sect1 id="install-first-boot">
<title>The first boot</title>
<para>The login screen is MCDE's <command>dtlogin</command>. Log in with
the account you created; the desktop starts with the front panel, the
bar at the top and the workspace controls. <xref linkend="mcde"/>
explains what you are looking at.</para>
<para>Open a terminal and check the machine:</para>
<screen>$ ifconfig -a
$ netstat -rn
$ date
$ ps -ax | grep -E 'dhcpcd|ntpd|dtlogin'</screen>
<para>If the network is not up, <command>dhcpcd</command> can be started
by hand; if the clock is wrong, <command>ntpd</command> needs a reachable
server. Both are services in <filename>/etc/rc.conf</filename>; see
<xref linkend="rc"/>.</para>
<para>Change the administrator's password and your own with
<citerefentry><refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
The account is in the wheel group, so <command>su</command> works; use
it for administrative commands, as the rest of this guide does.</para>
</sect1>
<sect1 id="install-trouble">
<title>When the installation does not start</title>
<itemizedlist>
<listitem><para><emphasis>The firmware does not offer the stick.</emphasis>
Write the image again to a different stick and compare its checksum.
On a UEFI machine, disable <quote>Secure Boot</quote> for the
installation; on a Mac, the stick must be formatted by the image, not
copied as a file.</para></listitem>
<listitem><para><emphasis>The machine starts, then stops with a mount
or unpacking error.</emphasis> The medium is bad or the disk is
failing. Check the medium's checksum and try another disk.</para></listitem>
<listitem><para><emphasis>The installed machine does not start.</emphasis>
Start from the medium again and choose the shell, then inspect the
disk with <command>disklabel</command> and mount the root partition by
hand. The boot messages are on the console; <command>dmesg</command>
repeats them.</para></listitem>
</itemizedlist>
</sect1>
</chapter>
+77
View File
@@ -0,0 +1,77 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="license">
<title>Appendix C: Licence and Sources</title>
<para>A guide is a derived work too. This one follows the structure of
<citetitle>The NetBSD Guide</citetitle> and uses its general NetBSD
procedures; the Makronix text, the MCDE chapter and the four output forms
are Makronix's.</para>
<sect1 id="license-makronix">
<title>Makronix</title>
<para>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
<filename>LICENSE</filename>. In short: do what you like with it, and
do not blame the authors.</para>
</sect1>
<sect1 id="license-netbsd">
<title>The NetBSD Guide and NetBSD</title>
<para>The structure of this guide and the general NetBSD procedures
follow <citetitle>The NetBSD Guide</citetitle>, 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
<filename>https://www.NetBSD.org/docs/guide/en/</filename>.</para>
</sect1>
<sect1 id="license-cde">
<title>CDE and MCDE</title>
<para>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 <filename>ext/src/mcde</filename>
in the source tree.</para>
<para>The Hack font, which MCDE uses for the terminal and the login
screen, is by Source Foundry and is distributed under the MIT
licence.</para>
</sect1>
<sect1 id="license-docbook">
<title>The book format</title>
<para>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.</para>
</sect1>
<sect1 id="license-sources">
<title>The sources of this guide</title>
<itemizedlist>
<listitem><para><filename>docs/guide/book.xml</filename> and
<filename>docs/guide/chapters/</filename> &#x2014; the text.</para></listitem>
<listitem><para><filename>docs/guide/build.sh</filename> &#x2014; the
build of the four forms.</para></listitem>
<listitem><para><filename>docs/guide/tools/docbook-to-cde.lua</filename>
&#x2014; the DocBook XML to CDE SGML writer.</para></listitem>
<listitem><para><filename>docs/logo/</filename> &#x2014; the
logo.</para></listitem>
<listitem><para><filename>www/style.css</filename> &#x2014; the
Camouflage palette that the guide's colours follow.</para></listitem>
</itemizedlist>
<para>The Makronix Guide is installed as manual pages from
<citerefentry><refentrytitle>makronix-guide</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
as <filename>/usr/share/doc/makronix/makronix-guide.pdf</filename>, as
<filename>/usr/share/doc/makronix/makronix-guide.html</filename> and as
an information library in
<filename>/etc/dt/infolib/en_US.UTF-8/makronix.dti</filename>.</para>
</sect1>
</chapter>
+76
View File
@@ -0,0 +1,76 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="mailweb">
<title>Mail and the Web</title>
<para>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.</para>
<sect1 id="mailweb-mail">
<title>Mail</title>
<para>The base system's mail transfer agent is
<application>Postfix</application>. A desktop that only needs local
mail &#x2014; the daily security report, cron's output, the messages of
the package tools &#x2014; runs it with the default configuration and
reads the mail with <command>mail</command> or MCDE's
<citerefentry><refentrytitle>dtmail</refentrytitle><manvolnum>1</manvolnum></citerefentry>:</para>
<screen># echo 'postfix=YES' &gt;&gt; /etc/rc.conf
# /etc/rc.d/postfix start
$ mail</screen>
<para><filename>/etc/postfix/main.cf</filename> is the configuration. A
machine that should accept mail from the network sets
<literal>inet_interfaces</literal> and a proper
<literal>myhostname</literal>, 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.</para>
<para>Local mail is delivered to <filename>/var/mail/</filename><replaceable>name</replaceable>.
If mail does not arrive, read <filename>/var/log/maillog</filename>;
Postfix writes there, and <command>postfix check</command> reports a
configuration that it cannot use.</para>
</sect1>
<sect1 id="mailweb-web">
<title>A web server</title>
<para>The base system's HTTP server is
<citerefentry><refentrytitle>bozohttpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
installed as <command>httpd</command>. It serves one directory, which
is enough for a documentation page or a small site:</para>
<screen># echo 'httpd=YES' &gt;&gt; /etc/rc.conf
# echo 'httpd_flags="-b /var/www"' &gt;&gt; /etc/rc.conf
# /etc/rc.d/httpd start
$ curl http://localhost/</screen>
<para><filename>/var/www</filename> is the document root; the index file
is <filename>index.html</filename>. A server that needs CGI, PHP, TLS
or virtual hosts should use a package: <application>nginx</application>
or <application>apache</application>, with their own documentation and
their own service scripts.</para>
<para>TLS needs a certificate. For a public name, the certificate
authority's client (for example <application>certbot</application>)
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.</para>
</sect1>
<sect1 id="mailweb-clients">
<title>The desktop clients</title>
<para>Firefox reads the web, Thunderbird reads mail and news, and
<command>dtmail</command> reads local mail in the MCDE style. All three
are on the medium as packages; the installer can put them on the
machine, and <command>pkg_add</command> installs them later
(<xref linkend="pkgsrc"/>). Their settings belong to the user, not to
the system, and live under <filename>~/.mozilla</filename>,
<filename>~/.thunderbird</filename> and <filename>~/.dt</filename>.</para>
</sect1>
</chapter>
+231
View File
@@ -0,0 +1,231 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="mcde">
<title>MCDE: The Desktop</title>
<para>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 &#x2014; Motif, a quick and steady desktop
that does not need a fast machine &#x2014; and makes it one desktop that
works as a whole.</para>
<para>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 &#x2014; users, network, sound &#x2014; is behind one
layer, so that no program has to know which system it runs on.</para>
<sect1 id="mcde-login">
<title>Logging in</title>
<para>The graphical login is <citerefentry><refentrytitle>dtlogin</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
It shows the users of the machine and a field for the password; the
<guimenu>Options</guimenu> menu chooses the session type and the
language. After login, <citerefentry><refentrytitle>dtsession</refentrytitle><manvolnum>1</manvolnum></citerefentry>
starts the session: the window manager, the front panel, the bar at the
top and the programs that are set to open at login.</para>
<para><guimenuitem>Lock Screen</guimenuitem> in the Makronix menu locks
the session without ending it; <guimenuitem>Log Out</guimenuitem> ends
it and returns to <command>dtlogin</command>. A session can be saved on
logout and restored at the next login; the setting is in System
Settings, under <guilabel>Login</guilabel>.</para>
</sect1>
<sect1 id="mcde-bar">
<title>The bar at the top</title>
<para>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.</para>
<para>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.</para>
</sect1>
<sect1 id="mcde-panel">
<title>The front panel</title>
<para>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.</para>
<para>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.</para>
</sect1>
<sect1 id="mcde-windows">
<title>Windows and the window manager</title>
<para><citerefentry><refentrytitle>dtwm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
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.</para>
<para>The window manager's configuration is
<filename>~/.dt/dtwmrc</filename>; without it, the system file
<filename>/usr/pkg/dt/config/C/sys.dtwmrc</filename> 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.</para>
</sect1>
<sect1 id="mcde-dtfile">
<title>The file manager</title>
<para><citerefentry><refentrytitle>dtfile</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is the file manager. A toolbar has Back and Forward &#x2014; every
window keeps its own history &#x2014; 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.</para>
<para>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 (<xref linkend="sharing"/>).</para>
</sect1>
<sect1 id="mcde-dtterm">
<title>The terminal</title>
<para><citerefentry><refentrytitle>dtterm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is the terminal. It has tabs: <literal>Ctrl+Shift+T</literal>
opens one, <literal>Ctrl+Shift+W</literal>
closes it, and <literal>Ctrl+Shift+Left</literal>
and <literal>Ctrl+Shift+Right</literal>
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
(<guimenu>Window</guimenu>, <guimenuitem>New Tab with Profile</guimenuitem>).
<literal>Ctrl+Shift+D</literal>
splits a tab and puts another terminal below it. Started as
<command>dtterm -dropdown</command>, the terminal waits out of sight and
comes down from the top of the screen at <literal>F12</literal>; the next
press puts it back.</para>
<para>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 <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
</sect1>
<sect1 id="mcde-programs">
<title>The other programs</title>
<variablelist>
<varlistentry>
<term><citerefentry><refentrytitle>dtpad</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
<listitem><para>The text editor. It edits plain text, has a
search and replace, and opens several files in one window.</para></listitem>
</varlistentry>
<varlistentry>
<term><citerefentry><refentrytitle>dtcalc</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
<listitem><para>The calculator: a normal calculator, a scientific
one and a programmer's one, in one window.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>dtpaint</command></term>
<listitem><para>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.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>dtlaunch</command></term>
<listitem><para>The launcher, opened with
<literal>Alt+Space</literal>.
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
<literal>=12*(3+4)</literal> and it shows 84. Return starts the
program or puts the text on the clipboard. Snippets live in
<filename>~/.dt/snippets</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><citerefentry><refentrytitle>dtinfo</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
<listitem><para>The Information Manager: books and help pages,
including this guide. <xref linkend="dtinfo"/> is its
chapter.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="mcde-settings">
<title>System Settings</title>
<para><command>dtsystemsettings</command> is one window for every
setting of the computer. It has four rows of icons &#x2014; personal,
hardware, internet and network, system &#x2014; and a click opens a
setting in the same window; <guilabel>Show All</guilabel> goes back.</para>
<para>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.</para>
<para>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 <filename>~/.dt</filename>; the ones that belong to the
machine are in <filename>/etc/dt</filename> and
<filename>/usr/pkg/dt/config</filename>.</para>
</sect1>
<sect1 id="mcde-colours">
<title>Colours, fonts and the palette</title>
<para>A Makronix release is named after a CDE palette, and the desktop
starts in that palette. For 0.99.10 it is <quote>Camouflage</quote>:
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,
<filename>/usr/pkg/dt/share/palettes/Camouflage.dp</filename>, and
System Settings shows every installed palette with its colours before
you choose it.</para>
<para>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.</para>
</sect1>
<sect1 id="mcde-session">
<title>The session and your files</title>
<para>Everything that belongs to your desktop is under
<filename>~/.dt</filename>: 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.</para>
<para>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 <guilabel>Login</guilabel>. A program that should
always start belongs in the session, not in a shell startup file: the
session is what the desktop restores.</para>
</sect1>
<sect1 id="mcde-help">
<title>Help</title>
<para>Every MCDE program has a <guimenu>Help</guimenu> 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.</para>
</sect1>
</chapter>
+98
View File
@@ -0,0 +1,98 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="network">
<title>Networking</title>
<para>NetBSD's network configuration is small and explicit: an interface
is configured with <command>ifconfig</command>, 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.</para>
<sect1 id="network-interfaces">
<title>Interfaces and addresses</title>
<screen>$ ifconfig -a
$ netstat -rn
$ cat /etc/resolv.conf</screen>
<para>The name of an interface is the driver's: <filename>wm0</filename>
for an Intel Ethernet, <filename>re0</filename> for a Realtek,
<filename>ath0</filename> or <filename>urtwn0</filename> for Wi-Fi,
<filename>lo0</filename> for the loopback. An address from DHCP is
requested by <citerefentry><refentrytitle>dhcpcd</refentrytitle><manvolnum>8</manvolnum></citerefentry>:</para>
<screen># dhcpcd wm0
# /etc/rc.d/dhcpcd restart</screen>
<para>The service reads <filename>/etc/rc.conf</filename>; with
<literal>dhcpcd=YES</literal> it configures every interface that is not
configured by a fixed file at boot.</para>
</sect1>
<sect1 id="network-fixed">
<title>A fixed address</title>
<para>A machine that should have the same address every time does not
need DHCP. The address belongs in
<filename>/etc/ifconfig.</filename><replaceable>interface</replaceable>:</para>
<screen>inet 192.168.1.20/24</screen>
<para>The default route is <filename>/etc/mygate</filename>:</para>
<screen>192.168.1.1</screen>
<para>and the resolver is <filename>/etc/resolv.conf</filename>:</para>
<screen>nameserver 192.168.1.1
nameserver 9.9.9.9</screen>
<para>Set <literal>dhcpcd=NO</literal> for that interface, or leave the
service off entirely. The name of the machine is in
<filename>/etc/myname</filename>; the local names are in
<filename>/etc/hosts</filename>:</para>
<screen>127.0.0.1 localhost
192.168.1.20 studio.example studio</screen>
</sect1>
<sect1 id="network-wifi">
<title>Wi-Fi</title>
<para>A Wi-Fi interface needs its network and passphrase before DHCP can
run. <citerefentry><refentrytitle>wpa_passphrase</refentrytitle><manvolnum>8</manvolnum></citerefentry>
writes the configuration:</para>
<screen># wpa_passphrase "network-name" "the passphrase" &gt; /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</screen>
<para>The service configuration is:</para>
<screen>wpa_supplicant=YES
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
dhcpcd=YES</screen>
<para>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.</para>
</sect1>
<sect1 id="network-test">
<title>Testing</title>
<screen>$ ping -c 3 192.168.1.1
$ ping -c 3 www.NetBSD.org
$ route -n get default
$ netstat -an | grep LISTEN</screen>
<para>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.
<command>dmesg</command> names the interface the driver found, and
<command>ifconfig</command> shows whether it has an address.</para>
</sect1>
</chapter>
+113
View File
@@ -0,0 +1,113 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="pkgsrc">
<title>Packages and pkgsrc</title>
<para>Makronix has two kinds of software: what NetBSD's build puts in the
base system, and what pkgsrc installs under <filename>/usr/pkg</filename>.
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.</para>
<sect1 id="pkgsrc-tools">
<title>The package tools</title>
<para><citerefentry><refentrytitle>pkg_add</refentrytitle><manvolnum>1</manvolnum></citerefentry>
installs, <citerefentry><refentrytitle>pkg_delete</refentrytitle><manvolnum>1</manvolnum></citerefentry>
removes, and <citerefentry><refentrytitle>pkg_info</refentrytitle><manvolnum>1</manvolnum></citerefentry>
asks questions. The package database is
<filename>/usr/pkg/pkgdb</filename>.</para>
<screen>$ pkg_info | less
$ pkg_info -L firefox | less
$ pkg_info -D firefox
$ pkg_info -W /usr/pkg/bin/firefox</screen>
<para><option>-L</option> lists the files of a package,
<option>-D</option> prints the message that came with it (where its
documentation is, which service to enable), and <option>-W</option>
answers which package owns a file.</para>
</sect1>
<sect1 id="pkgsrc-install">
<title>Installing a package</title>
<para><filename>/etc/pkg_install.conf</filename> names the repository in
<envar>PKG_PATH</envar>. 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:</para>
<screen># pkg_add firefox
# pkg_add -u firefox
# pkg_delete firefox</screen>
<para><command>pkg_add -u</command> updates an installed package to the
newest version the repository has. Without an argument it updates
everything that has a newer version:</para>
<screen># pkg_add -uu
# pkg_admin rebuild</screen>
<para>An update can replace a library that another program needs. Read
the messages <command>pkg_add</command> prints, and keep the previous
package until the new one has started.</para>
</sect1>
<sect1 id="pkgsrc-set">
<title>The makronix set and the package database</title>
<para>The packages that Makronix itself ships are in the
<quote>makronix</quote> 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 <command>pkg_add -u</command> does not
touch them. A program that is in the base set or in the
<quote>makronix</quote> set is therefore updated by installing a new
Makronix release, not by a package update. The programs that were
installed with <command>pkg_add</command> (Firefox, Thunderbird, QEMU,
the games) are registered and do update.</para>
<para><command>pkg_info</command> shows the registered packages. If it
does not list MCDE, that is not a defect: MCDE came with the release.</para>
</sect1>
<sect1 id="pkgsrc-build">
<title>Building from source</title>
<para>The source set carries pkgsrc in <filename>/usr/pkgsrc</filename>.
A package is built in its own directory with the NetBSD make:</para>
<screen># cd /usr/pkgsrc/www/firefox
# make install clean</screen>
<para>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 <citetitle>The pkgsrc
Guide</citetitle>, installed with the tree and available on the NetBSD
project's web site.</para>
<para>A build on the installed machine writes into
<filename>/usr/pkg</filename> and its work directories under
<filename>/usr/pkgsrc</filename>. It needs free space &#x2014; a browser
can take several gigabytes while it builds &#x2014; and it is the wrong
thing to do on a machine with a nearly full disk.</para>
</sect1>
<sect1 id="pkgsrc-security">
<title>Security updates</title>
<para><citerefentry><refentrytitle>pkg_admin</refentrytitle><manvolnum>1</manvolnum></citerefentry>
can compare the installed packages with the published vulnerability
list:</para>
<screen># pkg_admin audit
# pkg_admin fetch-pkg-vulnerabilities</screen>
<para>Makronix enables <literal>fetch_pkg_vulnerabilities=YES</literal>
in <filename>/etc/daily.conf</filename>, so the list is fetched daily
and <citerefentry><refentrytitle>security</refentrytitle><manvolnum>8</manvolnum></citerefentry>
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.</para>
</sect1>
</chapter>
+62
View File
@@ -0,0 +1,62 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="preface">
<title>Preface</title>
<para>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.</para>
<para>The guide follows the shape of <citetitle>The NetBSD Guide</citetitle>:
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 &#x2014; the installer, the desktop, the packages on the
medium, the way a release is made &#x2014; 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.</para>
<sect1 id="preface-how-to-read">
<title>How to read it</title>
<para>Read <xref linkend="what"/> first, then <xref linkend="install"/> if
the system is new. The chapters about the desktop
(<xref linkend="mcde"/> and <xref linkend="dtinfo"/>) are for everybody;
the administration chapters are reference material. The last part is for
the person who builds Makronix from its own sources.</para>
<para>Commands are shown as they are typed. A <literal>#</literal> at the
beginning means the command runs as root; a <literal>$</literal> means it
runs as your own account. File names are in <filename>this
style</filename>, commands in <command>this style</command>, and values
you replace in <replaceable>this style</replaceable>.</para>
</sect1>
<sect1 id="preface-forms">
<title>The guide in four forms</title>
<para>The same text is installed four ways, so that it is readable where
you are:</para>
<itemizedlist>
<listitem><para>as manual pages, starting at
<citerefentry><refentrytitle>makronix-guide</refentrytitle><manvolnum>7</manvolnum></citerefentry>;</para></listitem>
<listitem><para>as a PDF, <filename>/usr/share/doc/makronix/makronix-guide.pdf</filename>;</para></listitem>
<listitem><para>as one HTML file, <filename>/usr/share/doc/makronix/makronix-guide.html</filename>;</para></listitem>
<listitem><para>as a book in the MCDE Information Manager
(<citerefentry><refentrytitle>dtinfo</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="preface-conventions">
<title>Conventions</title>
<para>Makronix is based on NetBSD, and much of what this guide describes
is NetBSD's mechanism, unchanged. When a chapter says
<quote>NetBSD</quote>, it means the mechanism Makronix inherited; when it
says <quote>Makronix</quote>, it means the part Makronix decides itself.
Where a procedure differs between the two, the chapter gives the Makronix
way first.</para>
</sect1>
</chapter>
+94
View File
@@ -0,0 +1,94 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="printing">
<title>Printing, Sound and Power</title>
<para>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.</para>
<sect1 id="printing-cups">
<title>Printing with CUPS</title>
<para>Makronix uses the Common UNIX Printing System. The packages
<application>cups</application> and <application>cups-filters</application>
are on the medium; the service is <literal>cupsd</literal> in
<filename>/etc/rc.conf</filename>. With the service running, a printer
is added with <citerefentry><refentrytitle>lpadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>:</para>
<screen># echo 'cupsd=YES' &gt;&gt; /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</screen>
<para><option>-m everywhere</option> 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
<filename>http://localhost:631</filename> does the same through a
browser, and <command>lpoptions -p office -l</command> lists the
options of the printer.</para>
<para>Printing a file is <citerefentry><refentrytitle>lpr</refentrytitle><manvolnum>1</manvolnum></citerefentry>:</para>
<screen>$ lpr -P office document.pdf
$ lpq -P office</screen>
<para>CUPS keeps its queues and its logs in
<filename>/var/spool/cups</filename> and
<filename>/var/log/cups</filename>. A job that stays in the queue is
usually a wrong device address or a printer that is off; the error log
says which.</para>
</sect1>
<sect1 id="printing-sound">
<title>Sound</title>
<para>NetBSD's audio device is configured with
<citerefentry><refentrytitle>audioctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
and <citerefentry><refentrytitle>mixerctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>;
<citerefentry><refentrytitle>audiocfg</refentrytitle><manvolnum>1</manvolnum></citerefentry>
lists the devices and lets you test them:</para>
<screen>$ audiocfg list
$ audiocfg test 0
$ mixerctl -a
$ mixerctl -w outputs.master=180</screen>
<para>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 <command>mixerctl</command> changes.</para>
<para>The package <application>pulseaudio</application> and its volume
control <application>pavucontrol</application> are on the medium for
programs that expect a PulseAudio server; MCDE itself does not need one.
<citerefentry><refentrytitle>audioplay</refentrytitle><manvolnum>1</manvolnum></citerefentry>
plays a WAV file without a server, and
<citerefentry><refentrytitle>aucat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
records and plays audio and can act as a sound server.</para>
</sect1>
<sect1 id="printing-power">
<title>Power and temperature</title>
<para><citerefentry><refentrytitle>envstat</refentrytitle><manvolnum>8</manvolnum></citerefentry>
shows the sensors the machine has: temperatures, fan speeds, voltages
and the battery. <citerefentry><refentrytitle>powerd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
adjusts the CPU frequency to the load, which is what keeps a laptop
cool and quiet:</para>
<screen># echo 'powerd=YES' &gt;&gt; /etc/rc.conf
# /etc/rc.d/powerd start
$ envstat
$ sysctl -a | grep -E 'cpu.frequency|machdep.cpu'</screen>
<para>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, <citerefentry><refentrytitle>apm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
reports the battery and the AC state as well.</para>
<para>A machine that shuts down without warning is usually hot or has a
failing power supply. Read <command>envstat</command> before you blame
the software; the temperatures are the first number to look at.</para>
</sect1>
</chapter>
+116
View File
@@ -0,0 +1,116 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="rc">
<title>Services and rc.d</title>
<para>NetBSD starts services through <command>rc.d</command>: 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.</para>
<sect1 id="rc-conf">
<title>/etc/rc.conf</title>
<para><filename>/etc/rc.conf</filename> holds one variable per service.
<literal>foo=YES</literal> starts the service at boot,
<literal>foo=NO</literal> does not. The file is read by
<citerefentry><refentrytitle>rc</refentrytitle><manvolnum>8</manvolnum></citerefentry>;
the variables are documented in
<citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and in the header of each script.</para>
<screen># grep -v '^#' /etc/rc.conf | grep .</screen>
<para>A local addition belongs in <filename>/etc/rc.conf</filename>, not
in a script: it survives an upgrade, and <command>etcupdate</command>
knows how to merge it. A single service can also be configured in
<filename>/etc/rc.conf.d/</filename><replaceable>service</replaceable>,
which is useful when a package or an administrator owns one file.</para>
</sect1>
<sect1 id="rc-scripts">
<title>Starting, stopping and checking a service</title>
<para>The scripts are in <filename>/etc/rc.d</filename>. Each takes the
verbs <command>start</command>, <command>stop</command>,
<command>restart</command>, <command>status</command> and
<command>onestart</command> (start it now without changing
<filename>rc.conf</filename>):</para>
<screen># /etc/rc.d/dhcpcd status
# /etc/rc.d/dhcpcd restart
# /etc/rc.d/sshd onestart</screen>
<para>A service that fails at boot writes its reason to the console and
to <filename>/var/log/messages</filename>. 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 <literal>REQUIRE</literal> and
<literal>PROVIDE</literal> lines at the top of each script, not by the
alphabetical order; <citerefentry><refentrytitle>rcorder</refentrytitle><manvolnum>8</manvolnum></citerefentry>
prints the order.</para>
</sect1>
<sect1 id="rc-desktop">
<title>The desktop services</title>
<para>On a Makronix desktop the relevant entries are:</para>
<variablelist>
<varlistentry>
<term><literal>dhcpcd=YES</literal></term>
<listitem><para>The DHCP client, when the network is configured by
DHCP. A machine with a fixed address sets
<literal>dhcpcd=NO</literal> and configures the interface in
<filename>/etc/ifconfig.</filename><replaceable>if</replaceable>.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>sshd=YES</literal></term>
<listitem><para>The Secure Shell server. The installer enables it;
the firewall lets it in.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>ntpd=YES</literal></term>
<listitem><para>Time synchronisation. The server list is
<filename>/etc/ntp.conf</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>npf=YES</literal></term>
<listitem><para>The firewall. Its rules are in
<filename>/etc/npf.conf</filename>; <xref linkend="firewall"/>
explains them.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>dtlogin=YES</literal></term>
<listitem><para>The graphical login. Without it the machine starts
with a text console; <command>startx</command> is not the same
thing, and the MCDE session is started by
<command>dtlogin</command>.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>cupsd=YES</literal></term>
<listitem><para>The print service, when printing is set up
(<xref linkend="printing"/>).</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="rc-add">
<title>Adding a service</title>
<para>A service that comes from pkgsrc installs its own script in
<filename>/usr/pkg/share/examples/rc.d</filename> or
<filename>/etc/rc.d</filename>. Copy it into
<filename>/etc/rc.d</filename> if it is an example, make it executable,
add the variable to <filename>/etc/rc.conf</filename>, and start it once
to see whether it works before the next boot:</para>
<screen># cp /usr/pkg/share/examples/rc.d/foo /etc/rc.d/foo
# chmod 755 /etc/rc.d/foo
# echo 'foo=YES' &gt;&gt; /etc/rc.conf
# /etc/rc.d/foo start
# /etc/rc.d/foo status</screen>
<para>If the service needs a directory or a user, its package
documentation says so; <command>pkg_info -D foo</command> prints the
message that came with the package.</para>
</sect1>
</chapter>
+94
View File
@@ -0,0 +1,94 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="services">
<title>DNS, DHCP and NTP</title>
<para>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.</para>
<sect1 id="services-dns">
<title>Name resolution</title>
<para>The resolver reads <filename>/etc/resolv.conf</filename>. It lists
the name servers in the order they are tried, and the domain that
short names belong to:</para>
<screen>search example.lan
nameserver 192.168.1.1
nameserver 9.9.9.9</screen>
<para><filename>/etc/nsswitch.conf</filename> decides where a lookup
goes first. Makronix's installer sets <literal>hosts: files mdnsd
dns</literal>, so the local file answers first, then the local network
names, then DNS. The local name
<replaceable>name</replaceable><filename>.local</filename> is answered
by <citerefentry><refentrytitle>mdnsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<para>A machine that should answer DNS for a small network can run
<citerefentry><refentrytitle>unbound</refentrytitle><manvolnum>8</manvolnum></citerefentry>
as a caching resolver, or <citerefentry><refentrytitle>nsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
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.</para>
</sect1>
<sect1 id="services-dhcp">
<title>DHCP</title>
<para>A client runs <citerefentry><refentrytitle>dhcpcd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and needs no configuration beyond <literal>dhcpcd=YES</literal>. A
server runs <citerefentry><refentrytitle>dhcpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
with a lease file and a subnet declaration:</para>
<screen># 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' &gt;&gt; /etc/rc.conf
# touch /var/db/dhcpd.leases
# /etc/rc.d/dhcpd start</screen>
<para>The interface that serves the network must have a fixed address in
the same subnet (<xref linkend="network-fixed"/>); 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:</para>
<screen>host printer {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.1.50;
}</screen>
</sect1>
<sect1 id="services-ntp">
<title>Time</title>
<para>A correct clock matters for TLS, for mail and for the logs of two
machines that are compared. <citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
is the daemon; <filename>/etc/ntp.conf</filename> names the servers:</para>
<screen>server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
</screen>
<para>With <literal>ntpd=YES</literal>, the clock is corrected
continuously and slowly. A clock that is wrong by hours is set once by
hand before the daemon starts:</para>
<screen># date 202611151200
# /etc/rc.d/ntpd restart
$ ntpq -p</screen>
<para><command>ntpq -p</command> 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.</para>
</sect1>
</chapter>
+139
View File
@@ -0,0 +1,139 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="sharing">
<title>Remote Access and File Sharing</title>
<para>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.</para>
<sect1 id="sharing-ssh">
<title>SSH</title>
<para>The installer enables <citerefentry><refentrytitle>sshd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and the firewall lets it in. Log in from another machine with your
account:</para>
<screen>$ ssh name@studio.example
$ ssh name@studio.local</screen>
<para>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:</para>
<screen>$ ssh-keygen -t ed25519
$ cat ~/.ssh/id_ed25519.pub | ssh name@studio.example \
'mkdir -p ~/.ssh &amp;&amp; cat &gt;&gt; ~/.ssh/authorized_keys'
$ chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys</screen>
<para><command>scp</command> copies a file, <command>sftp</command> is
an interactive file transfer, and a tunnel forwards a port through the
connection:</para>
<screen>$ scp report.pdf name@studio.example:/home/name/
$ ssh -L 8080:localhost:80 name@studio.example</screen>
<para>The server's configuration is
<filename>/etc/ssh/sshd_config</filename>. Password logins for root are
disabled by default; log in as yourself and use <command>su</command>.
After a change, test the configuration and reload the daemon:</para>
<screen># sshd -t
# /etc/rc.d/sshd reload</screen>
</sect1>
<sect1 id="sharing-nfs">
<title>NFS</title>
<para>NFS is the native Unix file sharing. The server exports a
directory in <filename>/etc/exports</filename>:</para>
<screen>/home -alldirs -maproot=root -network 192.168.1.0 -mask 255.255.255.0</screen>
<para>and runs the daemons:</para>
<screen># echo 'rpcbind=YES' &gt;&gt; /etc/rc.conf
# echo 'nfsd=YES' &gt;&gt; /etc/rc.conf
# echo 'mountd=YES' &gt;&gt; /etc/rc.conf
# /etc/rc.d/rpcbind start
# /etc/rc.d/mountd start
# /etc/rc.d/nfsd start
# /etc/rc.d/mountd restart</screen>
<para>The client mounts it with <command>mount_nfs</command> or
<command>mount -t nfs</command>:</para>
<screen># mount -t nfs 192.168.1.20:/home /mnt</screen>
<para>An entry in <filename>/etc/fstab</filename> makes it permanent.
<option>-maproot=root</option> 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.</para>
</sect1>
<sect1 id="sharing-smb">
<title>SMB and AFP</title>
<para>Windows and macOS machines speak SMB; older Macs speak AFP.
Makronix ships both servers as packages:</para>
<screen># pkg_add samba4 netatalk4
# echo 'smbd=YES' &gt;&gt; /etc/rc.conf
# echo 'nmbd=YES' &gt;&gt; /etc/rc.conf
# echo 'afpd=YES' &gt;&gt; /etc/rc.conf</screen>
<para>The Samba configuration is
<filename>/usr/pkg/etc/samba/smb.conf</filename>. A minimal share that
is visible to one user:</para>
<screen>[global]
workgroup = HOME
server string = Makronix
security = user
passdb backend = tdbsam
[share]
path = /home/share
valid users = name
read only = no
browseable = yes</screen>
<para>Create the Samba user after the system account exists:</para>
<screen># smbpasswd -a name
# /etc/rc.d/smbd start
# /etc/rc.d/nmbd start</screen>
<para>AFP is configured in <filename>/usr/pkg/etc/netatalk/afp.conf</filename>;
the package's documentation has the share syntax for the version that is
installed. MCDE's <application>System Settings</application> has the
sharing controls for both, and its file manager shows a share that is
mounted or announced on the network.</para>
</sect1>
<sect1 id="sharing-sshfs">
<title>Mounting a remote directory</title>
<para>When the other machine offers only SSH, SSHFS mounts a directory
over it:</para>
<screen># pkg_add fuse-sshfs
$ sshfs name@studio.example:/home/name /mnt/studio
$ umount /mnt/studio</screen>
<para>The package <application>afpfs-ng</application> 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.</para>
</sect1>
<sect1 id="sharing-security">
<title>Before you open a service</title>
<para>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.</para>
</sect1>
</chapter>
+118
View File
@@ -0,0 +1,118 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="shell">
<title>The Command Line</title>
<para>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.</para>
<sect1 id="shell-shell">
<title>The shell</title>
<para>The login shell of a new account is
<citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
NetBSD's POSIX shell. It reads <filename>~/.profile</filename> at login
and <filename>~/.shrc</filename> for interactive shells. A user who
prefers a Korn shell can use <filename>/usr/pkg/bin/ksh93</filename>
(installed for MCDE's <command>dtksh</command>) and change the login
shell with <citerefentry><refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
<para>The important environment variables are <envar>PATH</envar>,
<envar>HOME</envar>, <envar>SHELL</envar>, <envar>TERM</envar> and
<envar>LANG</envar>. A desktop session gets <envar>PATH</envar> from
the session configuration, not only from
<filename>~/.profile</filename>; if a program is found in a terminal but
not from the panel, compare the two:</para>
<screen>$ echo $PATH
$ env | sort</screen>
</sect1>
<sect1 id="shell-basics">
<title>Pipes, redirection and jobs</title>
<para>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:</para>
<screen>$ dmesg | less
$ grep -i error /var/log/messages &gt; /tmp/errors
$ command 2&gt;&amp;1 | tee log</screen>
<para><literal>Ctrl</literal>+<literal>C</literal> stops the program in the
foreground, <literal>Ctrl</literal>+<literal>Z</literal> suspends it, and
<command>bg</command>, <command>fg</command> and
<command>jobs</command> manage it. <command>command &amp;</command>
starts it in the background.</para>
<para>A file's permissions are read with <command>ls -l</command> and
changed with <citerefentry><refentrytitle>chmod</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
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.</para>
<screen>$ chmod 644 notes.txt
$ chmod 755 script.sh
$ chown user:wheel script.sh</screen>
</sect1>
<sect1 id="shell-editing">
<title>Editing files</title>
<para><citerefentry><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>
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. <literal>i</literal> enters insert
mode, <literal>Esc</literal> returns to command mode,
<literal>:w</literal> writes, <literal>:q</literal> quits and
<literal>:wq</literal> does both. <literal>dd</literal> deletes a line,
<literal>/text</literal> searches, and <literal>u</literal> undoes.</para>
<para>On the desktop, <citerefentry><refentrytitle>dtpad</refentrytitle><manvolnum>1</manvolnum></citerefentry>
edits plain text with menus and a search dialog. Configuration files
are plain text either way; keep a copy before a large change
(<command>cp file file.orig</command>) and compare afterwards with
<citerefentry><refentrytitle>diff</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
</sect1>
<sect1 id="shell-man">
<title>Finding the documentation</title>
<para><citerefentry><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry>
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:</para>
<screen>$ man ls
$ man 5 rc.conf
$ man -k firewall
$ apropos password</screen>
<para><command>man -k</command> searches the one-line descriptions;
<command>apropos</command> is the same. The Makronix Guide is a set of
pages in section 7, starting at
<citerefentry><refentrytitle>makronix-guide</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
The HTML and PDF forms are under
<filename>/usr/share/doc/makronix</filename>.</para>
</sect1>
<sect1 id="shell-root">
<title>Becoming the administrator</title>
<para>Administrative commands run as <username>root</username>. On a
desktop, log in as yourself and use
<citerefentry><refentrytitle>su</refentrytitle><manvolnum>1</manvolnum></citerefentry>:</para>
<screen>$ su -
Password:
# </screen>
<para>The minus makes it a login shell, with root's
<envar>PATH</envar> and environment. Your account is in the wheel
group, which is what allows <command>su</command>; a terminal that is
left alone returns to your prompt when you type <command>exit</command>.
Log in as yourself rather than as root: the desktop account is the
account for people, and <command>su</command> is the door to the
system.</para>
</sect1>
</chapter>
+139
View File
@@ -0,0 +1,139 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="tour">
<title>A Tour of the System</title>
<para>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.</para>
<sect1 id="tour-filesystem">
<title>The file system</title>
<variablelist>
<varlistentry>
<term><filename>/</filename></term>
<listitem><para>The root file system: the kernel
(<filename>/netbsd</filename>), the boot loader and the base
userland.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>/etc</filename></term>
<listitem><para>The configuration of this machine:
<filename>rc.conf</filename>, <filename>fstab</filename>,
<filename>master.passwd</filename>, the network configuration and
the <filename>rc.d</filename> scripts. Files here belong to the
administrator, not to a package.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>/usr</filename></term>
<listitem><para>The base system's programs, libraries, headers,
manual pages and shared files. <filename>/usr/src</filename>,
<filename>/usr/xsrc</filename> and <filename>/usr/msrc</filename>
hold the sources when the source set is installed.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>/usr/pkg</filename></term>
<listitem><para>Everything pkgsrc installs. The programs are in
<filename>/usr/pkg/bin</filename> and
<filename>/usr/pkg/sbin</filename>; the MCDE desktop is in
<filename>/usr/pkg/dt</filename>. The package database is
<filename>/usr/pkg/pkgdb</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>/home</filename></term>
<listitem><para>One directory per user. A new account gets
<filename>/home/</filename><replaceable>name</replaceable> and the
files from <filename>/etc/skel</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>/var</filename></term>
<listitem><para>Data that changes: logs in
<filename>/var/log</filename>, mail spools, databases, the package
cache and the print spool.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="tour-mcde">
<title>Where MCDE lives</title>
<para>MCDE is installed as a package under
<filename>/usr/pkg/dt</filename>. The programs are in
<filename>/usr/pkg/dt/bin</filename>; the shared data, the palettes and
the colors are in <filename>/usr/pkg/dt/share</filename>; the session
configuration is in <filename>/usr/pkg/dt/config</filename>. A user's
own desktop settings live in <filename>~/.dt</filename>.</para>
<para>The system-wide CDE configuration directory is
<filename>/etc/dt</filename>. It is the place for settings that apply
to every user, and it is where the Makronix Guide's information library
is installed (see <xref linkend="dtinfo"/>).</para>
</sect1>
<sect1 id="tour-config">
<title>The files you will edit</title>
<itemizedlist>
<listitem><para><filename>/etc/rc.conf</filename> &#x2014; which
services start at boot. The variables are documented in
<citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem>
<listitem><para><filename>/etc/fstab</filename> &#x2014; which file
systems are mounted where.</para></listitem>
<listitem><para><filename>/etc/hosts</filename>,
<filename>/etc/resolv.conf</filename> and
<filename>/etc/mygate</filename> &#x2014; the network, as in NetBSD.</para></listitem>
<listitem><para><filename>/etc/npf.conf</filename> &#x2014; the
firewall. Makronix installs a rule set that lets in SSH and the
replies to outgoing traffic.</para></listitem>
<listitem><para><filename>/etc/makronix/update</filename> &#x2014; the
first line names the source of software updates.</para></listitem>
<listitem><para><filename>/etc/dt/config/Xsession.d/</filename> &#x2014;
scripts that every MCDE session runs.</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="tour-processes">
<title>What runs</title>
<para>After boot, <citerefentry><refentrytitle>init</refentrytitle><manvolnum>8</manvolnum></citerefentry>
starts the services named in <filename>/etc/rc.conf</filename>. On a
Makronix desktop the important ones are:</para>
<itemizedlist>
<listitem><para><citerefentry><refentrytitle>dtlogin</refentrytitle><manvolnum>1</manvolnum></citerefentry>
&#x2014; the graphical login screen. It starts the X server and the
user's session.</para></listitem>
<listitem><para><citerefentry><refentrytitle>dtwm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
&#x2014; the window manager: window frames, the front panel and the
workspaces.</para></listitem>
<listitem><para><citerefentry><refentrytitle>dtsession</refentrytitle><manvolnum>1</manvolnum></citerefentry>
&#x2014; the session manager behind the desktop.</para></listitem>
<listitem><para><citerefentry><refentrytitle>dhcpcd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; the DHCP client, when the network is configured by DHCP.</para></listitem>
<listitem><para><citerefentry><refentrytitle>ntpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
&#x2014; the time synchronisation the installer enables.</para></listitem>
</itemizedlist>
<para><citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
shows them; <citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
shows what they use. A process that fails at boot leaves its reason in
<filename>/var/log/messages</filename> and, for a service, in the
console output of <command>rc.d</command>.</para>
</sect1>
<sect1 id="tour-documentation">
<title>Documentation on the machine</title>
<para>The manual pages are installed in the usual sections. Start with
<citerefentry><refentrytitle>afterboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
then read the page for the program you are using. The Makronix Guide
itself is <citerefentry><refentrytitle>makronix-guide</refentrytitle><manvolnum>7</manvolnum></citerefentry>;
each chapter has its own page, and the guide is also installed as a PDF
and as HTML under <filename>/usr/share/doc/makronix</filename>.</para>
<para>When a page does not answer the question, the source is the last
word. The source set puts NetBSD's source in <filename>/usr/src</filename>
and Makronix's own tools and documentation in
<filename>/usr/msrc</filename>.</para>
</sect1>
</chapter>
+98
View File
@@ -0,0 +1,98 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="updating">
<title>Updating the Desktop</title>
<para>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.</para>
<sect1 id="updating-settings">
<title>From System Settings</title>
<para>Open <application>System Settings</application> and choose
<guilabel>Software Update</guilabel>. The dialog reads the source from
the first line of <filename>/etc/makronix/update</filename>, shows what
it found, and asks for the administrator's password before it changes
anything. It runs <command>sysupgrade</command> for the base system and
then <command>pkg_add -uu</command> for the registered packages. The
machine must be rebooted afterwards.</para>
<para>The source is a directory, a <filename>file://</filename> address
or an <filename>https://</filename> address. <filename>http://</filename>
and <filename>ftp://</filename> are refused: a base system that is
fetched over an unencrypted connection is a base system that can be
changed on the way. An <filename>https://</filename> source is protected
by TLS; a <filename>file://</filename> 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.</para>
</sect1>
<sect1 id="updating-command">
<title>From the command line</title>
<screen># 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</screen>
<para>The order matters: the base system first, then the configuration
merge, then the packages, then the reboot. If <command>sysupgrade</command>
fails, stop there; a half-updated base with new packages is harder to
repair than either one alone.</para>
</sect1>
<sect1 id="updating-mcde">
<title>MCDE and the makronix set</title>
<para>The desktop is part of the <quote>makronix</quote> set, which the
installer unpacks as part of the system. It is not in the package
database, so <command>pkg_add -u</command> 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.</para>
<para>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.</para>
</sect1>
<sect1 id="updating-guide">
<title>The guide itself</title>
<para>The guide is generated from <filename>docs/guide</filename> and
installed with the release. After a change to the guide's source, rebuild
it and install the four forms:</para>
<screen>$ cd /usr/msrc
$ sh docs/guide/build.sh all
$ sh docs/guide/build.sh install</screen>
<para>The build needs <application>pandoc</application>,
<application>xmllint</application>, <application>mandoc</application>,
Chrome or Google Chrome for the PDF, and a host build of MCDE for the
information library. <command>build.sh check</command> verifies that
every form was produced; the details are in
<filename>docs/guide/AGENTS.md</filename>.</para>
</sect1>
<sect1 id="updating-rollback">
<title>If an update goes wrong</title>
<para>The old kernel is <filename>/netbsd.old</filename> and the loader's
menu can start it. The old configuration is in
<filename>/etc/rc.conf.old</filename> after <command>postinstall</command>
or <command>etcupdate</command> replaced it. On an encrypted system, the
kernel the machine starts is the copy in <filename>/cgdboot</filename>;
<xref linkend="upgrade-encrypted"/> explains how to put the old one
back.</para>
<para>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.</para>
</sect1>
</chapter>
+111
View File
@@ -0,0 +1,111 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="upgrade">
<title>Upgrading Makronix</title>
<para>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
<citerefentry><refentrytitle>sysupgrade</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
Both end with the same steps: the sets are unpacked, the configuration is
merged, and the machine is rebooted.</para>
<sect1 id="upgrade-medium">
<title>From the medium</title>
<para>Start the new medium and choose <quote>Upgrade NetBSD on a hard
disk</quote> in <command>sysinst</command>. The installer asks for the
disk and the root partition, unpacks the new sets over the old system
and leaves <filename>/etc</filename> and <filename>/home</filename>
alone. The <quote>makronix</quote> set is part of the upgrade; choose it
when the installer offers the sets.</para>
<para>After the reboot, run the two NetBSD tools that bring the
configuration up to date:</para>
<screen># postinstall -s /usr/src/etc fix
# etcupdate -s /usr/src/etc</screen>
<para><citerefentry><refentrytitle>postinstall</refentrytitle><manvolnum>8</manvolnum></citerefentry>
repairs the files that NetBSD knows how to merge (the mail
configuration, the device files, the fonts); <citerefentry><refentrytitle>etcupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry>
merges the rest and leaves its conflicts for you to resolve. Read
<filename>/etc/rc.conf</filename> afterwards: a new release can add a
service or rename a variable, and the old file is kept as
<filename>/etc/rc.conf.old</filename> when it is replaced.</para>
</sect1>
<sect1 id="upgrade-sysupgrade">
<title>With sysupgrade</title>
<para><command>sysupgrade</command> does the same work from the running
system. It fetches the sets from a directory, a <filename>file://</filename>
address or an <filename>https://</filename> address, unpacks them and
updates the kernel. The address is the first line of
<filename>/etc/makronix/update</filename>:</para>
<screen># cat /etc/makronix/update
https://example.invalid/makronix/0.99.10/amd64
# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64</screen>
<para>After <command>sysupgrade</command>, run <command>postinstall</command>
and <command>etcupdate</command> as above and reboot. The MCDE
<application>System Settings</application> has the same operation as a
dialog: it reads the source from <filename>/etc/makronix/update</filename>,
runs <command>sysupgrade</command> for the base system and then
<command>pkg_add -uu</command> for the packages.</para>
<para><emphasis>Trust:</emphasis> an <filename>https://</filename>
source is protected by TLS; a <filename>file://</filename> 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.</para>
</sect1>
<sect1 id="upgrade-packages">
<title>The packages</title>
<para>Packages from pkgsrc are updated with the package tools, not with
the base system:</para>
<screen># pkg_add -uu
# pkg_admin rebuild</screen>
<para>The packages of the <quote>makronix</quote> 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.</para>
</sect1>
<sect1 id="upgrade-encrypted">
<title>An encrypted system</title>
<para>On an encrypted system the kernel the machine boots is the copy on
the small unencrypted partition, not <filename>/netbsd</filename> in the
encrypted root. After an upgrade, copy the new kernel and the matching
<filename>cgdroot.kmod</filename> to that partition:</para>
<screen># mount /cgdboot
# cp /netbsd /cgdboot/netbsd
# cp /path/from/the/release/cgdroot.kmod /cgdboot/
# umount /cgdboot</screen>
<para>The release notes name the exact path of
<filename>cgdroot.kmod</filename>; it is part of the kernel set of the
new release. Keep the old kernel as
<filename>/cgdboot/netbsd.old</filename> so that the loader can start it
if the new one fails.</para>
</sect1>
<sect1 id="upgrade-recovery">
<title>If the upgrade fails</title>
<para>A failed upgrade is not a lost machine. Start the old medium,
mount the root partition and read <filename>/var/log/messages</filename>;
the installer has left the old configuration in
<filename>/etc/rc.conf.old</filename> and the old kernel in
<filename>/netbsd.old</filename>. The loader's menu can start
<filename>netbsd.old</filename> when the new kernel does not boot. With
the source set installed, the system can be rebuilt in place
(<xref linkend="building"/>).</para>
</sect1>
</chapter>
+95
View File
@@ -0,0 +1,95 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="users">
<title>Users and Accounts</title>
<para>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.</para>
<sect1 id="users-database">
<title>Where the accounts live</title>
<para><filename>/etc/master.passwd</filename> is the real database;
<filename>/etc/passwd</filename> is its public view, without the
password hashes. Both are generated from the master file by
<citerefentry><refentrytitle>pwd_mkdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
The group database is <filename>/etc/group</filename>. Edit them with
<citerefentry><refentrytitle>vipw</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and <citerefentry><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>
rather than with a text editor that does not know about the locks.</para>
<para>Each account has a home directory, a login shell and a list of
groups. A new account gets the files from
<filename>/etc/skel</filename>, which is where a site puts its default
<filename>.profile</filename> and desktop files.</para>
</sect1>
<sect1 id="users-add">
<title>Adding an account</title>
<screen># useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \
-c "Full Name" -s /bin/sh name
# passwd name</screen>
<para><command>useradd</command> creates the home directory with
<option>-m</option>, puts the account in the named groups and sets the
shell. <command>passwd</command> then sets the password; without it the
account cannot log in. The groups are the ones the installer uses:</para>
<variablelist>
<varlistentry><term>wheel</term><listitem><para>May use
<command>su</command> to become root.</para></listitem></varlistentry>
<varlistentry><term>operator</term><listitem><para>May use the
operator commands (shutdown, and the disk tools that are marked for
it).</para></listitem></varlistentry>
<varlistentry><term>staff</term><listitem><para>The usual group for
files that a team shares.</para></listitem></varlistentry>
<varlistentry><term>users</term><listitem><para>The ordinary users of
the machine.</para></listitem></varlistentry>
<varlistentry><term>dialer</term><listitem><para>May use the serial
ports and the modems.</para></listitem></varlistentry>
<varlistentry><term>games</term><listitem><para>May write the games'
score files.</para></listitem></varlistentry>
<varlistentry><term>wsrc</term><listitem><para>May write the source
tree under <filename>/usr/src</filename>.</para></listitem></varlistentry>
</variablelist>
<para>The same operation is in System Settings under
<guilabel>Users</guilabel>; it asks for the administrator's password and
writes the same files.</para>
</sect1>
<sect1 id="users-change">
<title>Changing and removing an account</title>
<screen># usermod -G wheel,operator,staff,users,dialer,games,wsrc name
# chsh -s /usr/pkg/bin/ksh93 name
# userdel -r name</screen>
<para><command>usermod</command> changes the groups, the shell, the full
name or the home directory; <command>chsh</command> changes the shell of
the account that runs it. <command>userdel -r</command> removes the
account and its home directory; without <option>-r</option> the files
stay. A removed account leaves its files owned by a number; find them
with <command>find / -nouser -print</command> before you delete anything
else.</para>
</sect1>
<sect1 id="users-password">
<title>Passwords</title>
<para>Passwords are stored as hashes in
<filename>/etc/master.passwd</filename>, which only root can read. A
user changes their own with <command>passwd</command>; root changes
another with <command>passwd name</command>. 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.</para>
<para>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.</para>
</sect1>
</chapter>
+102
View File
@@ -0,0 +1,102 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="what">
<title>What Makronix Is</title>
<para>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.</para>
<sect1 id="what-netbsd">
<title>NetBSD underneath</title>
<para>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, <filename>/etc/rc.conf</filename>,
the package tools and the section 8 manual pages are the ones NetBSD
documents.</para>
<para>The kernel still calls itself <quote>NetBSD</quote> in
<citerefentry><refentrytitle>uname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
on purpose: pkgsrc, <filename>config.guess</filename> and a great deal of
third-party software decide from that name which system they are on. The
product name <quote>Makronix 0.99.10</quote> is what the installer, the
login screen, the message of the day and the release notes call the
system.</para>
</sect1>
<sect1 id="what-decided">
<title>What Makronix decides</title>
<para>Four decisions turn NetBSD into Makronix:</para>
<itemizedlist>
<listitem>
<para><emphasis>The installer.</emphasis> Makronix's
<citerefentry><refentrytitle>sysinst</refentrytitle><manvolnum>8</manvolnum></citerefentry>
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 &#x2014; its name, the network, the time zone, the
administrator's password and the first account &#x2014; before the
first reboot. The full way is the NetBSD installation, unchanged.</para>
</listitem>
<listitem>
<para><emphasis>The desktop.</emphasis> MCDE, the Makronix Common
Desktop Environment, is a fork of CDE. It starts at
<citerefentry><refentrytitle>dtlogin</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
uses Motif, and is designed to be quick on a machine from the
1990s. It is described in <xref linkend="mcde"/>.</para>
</listitem>
<listitem>
<para><emphasis>The packages on the medium.</emphasis> The programs
that Makronix ships are on the installation medium, in the
<quote>makronix</quote> set and in the repository next to it. A
machine is usable without a network connection.</para>
</listitem>
<listitem>
<para><emphasis>The source set.</emphasis> The medium also carries
the sources &#x2014; NetBSD's source sets and the Makronix source set
&#x2014; so that the system can rebuild itself offline. The
procedure is in <xref linkend="building"/>.</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="what-release">
<title>The release and its name</title>
<para>This guide describes Makronix 0.99.10, whose release name is
<quote>Camouflage</quote>. 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 <filename>/usr/pkg/dt/share/palettes/Camouflage.dp</filename>.</para>
<para>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.</para>
</sect1>
<sect1 id="what-platforms">
<title>Platforms</title>
<para>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
<filename>/usr/src/docs/PLATFORMS.md</filename> in the source set.</para>
</sect1>
<sect1 id="what-license">
<title>Licence</title>
<para>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.</para>
</sect1>
</chapter>
+87
View File
@@ -0,0 +1,87 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="x11">
<title>The Display and X11</title>
<para>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
<filename>/usr/X11R7</filename>; there is no separate X package to
install. On a normal machine the server needs no configuration at all,
and <command>dtlogin</command> starts it.</para>
<sect1 id="x11-server">
<title>The server and the session</title>
<para>The login screen starts the X server and, after a login, the MCDE
session. A text console can start a bare X session with
<citerefentry><refentrytitle>startx</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
but that is not the MCDE session: it starts the user's
<filename>~/.xinitrc</filename> and nothing else. Use it to test the
server, not as the daily desktop.</para>
<screen>$ startx
$ xdpyinfo | head
$ xrandr</screen>
<para><command>xdpyinfo</command> prints the display's capabilities, and
<command>xrandr</command> lists the outputs and the modes. A second
monitor is enabled with <command>xrandr --output</command>; the setting
lasts for the session unless it is put in a session script.</para>
</sect1>
<sect1 id="x11-config">
<title>When the server needs a configuration</title>
<para>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:</para>
<screen># X -configure
# cp /root/xorg.conf.new /etc/X11/xorg.conf
# X -config /etc/X11/xorg.conf</screen>
<para>The file is a starting point, not a guarantee. The log is
<filename>/var/log/Xorg.0.log</filename>; the lines marked
<literal>(EE)</literal> are errors and <literal>(WW)</literal> are
warnings. A server that starts from the console but not from
<command>dtlogin</command> usually has a permission or a display-manager
problem, not a driver problem.</para>
</sect1>
<sect1 id="x11-keyboard">
<title>Keyboard and fonts</title>
<para>The text console and X have separate keyboard settings. The
console is configured with
<citerefentry><refentrytitle>wsconsctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>:</para>
<screen># wsconsctl -w keyboard.encoding=de</screen>
<para>The key map is set in <filename>/etc/wscons.conf</filename>. In X,
MCDE's System Settings sets the layout for the session; the
X server's own configuration is in
<filename>/etc/X11/xorg.conf.d/</filename>. 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.</para>
<para>The fonts are installed with the X sets.
<citerefentry><refentrytitle>fc-list</refentrytitle><manvolnum>1</manvolnum></citerefentry>
lists them and <command>fc-cache -f</command> 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.</para>
</sect1>
<sect1 id="x11-remote">
<title>Programs from another machine</title>
<para>An X program can run on one machine and display on another. SSH
forwards the connection, which is the safe way:</para>
<screen>$ ssh -X name@studio.example xterm</screen>
<para><option>-X</option> asks for trusted forwarding;
<option>-Y</option> 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.</para>
</sect1>
</chapter>
+73
View File
@@ -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 '<title>The Makronix Guide</title>' "$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)"
+355
View File
@@ -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; }
}
+41
View File
@@ -0,0 +1,41 @@
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="pandoc and docs/guide/build.sh">
<title>$title$</title>
<style>
@CSS@
</style>
</head>
<body>
<div class="cover">
<img class="logo" src="@LOGO@" alt="Makronix">
<div class="cover-rule"></div>
<h1 class="covertitle">$title$</h1>
<p class="subtitle">$subtitle$</p>
<p class="edition">$edition$</p>
<div class="palette" aria-hidden="true">
<span class="p1"></span><span class="p2"></span><span class="p3"></span><span class="p4"></span><span class="p5"></span>
</div>
<p class="based">BASED ON NETBSD</p>
</div>
$if(toc)$
<div class="tocpage">
<h2 class="tochead">Contents</h2>
$toc$
</div>
$endif$
<main class="content">
$body$
</main>
<div class="printfooter">The Makronix Guide &middot; Makronix 0.99.10 &middot; based on NetBSD</div>
</body>
</html>
+206
View File
@@ -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("&", "&amp;")
s = s:gsub("<", "&lt;")
s = s:gsub(">", "&gt;")
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("</" .. top.tag .. ">")
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("<emphasis>")
render_inlines(x.content)
emit("</emphasis>")
elseif t == "Strong" then
emit("<emphasis>")
render_inlines(x.content)
emit("</emphasis>")
elseif t == "Code" then
emit("<literal>" .. esc(x.text) .. "</literal>")
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("<xref linkend=\"" .. slug(x.target:sub(2), "ref") .. "\"/>")
else
emit("<ulink url=\"" .. esc(x.target) .. "\">")
render_inlines(x.content)
emit("</ulink>")
end
elseif t == "Math" then
emit(esc(x.text))
elseif t == "Note" then
emit("<footnote>")
render_blocks(x.content)
emit("</footnote>")
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("<title>")
render_inlines(b.content)
emit("</title>")
open[#open + 1] = { level = level, tag = tag }
elseif t == "Para" or t == "Plain" then
emit("<para>")
render_inlines(b.content)
emit("</para>")
elseif t == "CodeBlock" then
emit("<screen>" .. esc(b.text) .. "</screen>")
elseif t == "BlockQuote" then
emit("<blockquote>")
render_blocks(b.content)
emit("</blockquote>")
elseif t == "BulletList" then
emit("<itemizedlist>")
for _, item in ipairs(b.content) do
emit("<listitem>")
render_blocks(item)
emit("</listitem>")
end
emit("</itemizedlist>")
elseif t == "OrderedList" then
emit("<orderedlist>")
for _, item in ipairs(b.content) do
emit("<listitem>")
render_blocks(item)
emit("</listitem>")
end
emit("</orderedlist>")
elseif t == "DefinitionList" then
emit("<variablelist>")
for _, item in ipairs(b.content) do
emit("<varlistentry><term>")
render_inlines(item[1])
emit("</term><listitem>")
for _, def in ipairs(item[2]) do
render_blocks(def)
end
emit("</listitem></varlistentry>")
end
emit("</variablelist>")
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("<para><emphasis>Note:</emphasis> " ..
esc(pandoc.utils.stringify(b.content)) .. "</para>")
else
render_blocks(b.content)
end
elseif t == "LineBlock" then
emit("<para>")
for i, line in ipairs(b.content) do
if i > 1 then emit("<literallayout></literallayout>") end
render_inlines(line)
end
emit("</para>")
elseif t == "Table" then
emit("<para>" .. esc(pandoc.utils.stringify(b)) .. "</para>")
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("<para>" .. esc(pandoc.utils.stringify(b)) .. "</para>")
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("</" .. top.tag .. ">")
end
return "<!DOCTYPE Book PUBLIC \"-//HaL and O'Reilly//DTD DocBook//EN\">\n" ..
"<Book>\n<Title>" .. esc(title) .. "</Title>\n" ..
table.concat(out, "\n") .. "\n</Book>\n"
end
+26
View File
@@ -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
+8
View File
@@ -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
+27
View File
@@ -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
+10 -1
View File
@@ -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 --
+5
View File
@@ -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
+9
View File
@@ -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
+47 -1
View File
@@ -5,8 +5,54 @@ NOOBJ= # defined
.include <bsd.own.mk>
.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 <bsd.prog.mk>
@@ -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
@@ -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 $
@@ -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
@@ -0,0 +1 @@
keytypes MAKRONIX = Default Head Graphics Example Index Table
@@ -0,0 +1,2 @@
The Makronix Guide 6AoRelQMzI01y70
MAKRONIX The Makronix Guide 5AoRelQMzI01y70 en_US.UTF-8 2 3
@@ -0,0 +1 @@
$XConsortium: dtinfogen_worker.c /main/24 1996/11/26 12:35:07 cde-hal $
File diff suppressed because it is too large. Load diff
Binary file not shown.
+29
View File
@@ -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 <bsd.man.mk>
@@ -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 <name>\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.
@@ -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]<arch> 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]<arch>\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.
+91
View File
@@ -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.
+141
View File
@@ -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]<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 \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.
+102
View File
@@ -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.
@@ -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.
@@ -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.
+48
View File
@@ -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.
+126
View File
@@ -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 <name>\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.
@@ -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].
@@ -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]<name>.
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].
+183
View File
@@ -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.
@@ -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]<interface>:
.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.
@@ -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.
@@ -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 <this style>.
.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.
@@ -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.
+88
View File
@@ -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]<service>, 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]<if>.
.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.
@@ -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 <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.
+136
View File
@@ -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.
+104
View File
@@ -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.
+99
View File
@@ -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]<name> 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].
@@ -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.
@@ -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 (???).
+84
View File
@@ -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.
+76
View File
@@ -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.
+76
View File
@@ -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.
+106
View File
@@ -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)
+21
View File
@@ -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 ]