Setting Up the Daemon

Documentation / Contents - Removable Media

Setting Up the Daemon

The useful long-running form of CyMount is:

cymount --daemon

It sits in your user session, polls for media about every two seconds, and keeps the volume ledger up to date. CyDrive and the desktop icons only work as furniture when that ledger is honest.

This page is the setup path. Details of each poll are in How the Daemon Works.

What You Need

You do NOT need polkit, D-Bus, or udisks. Blueprint does not use them.

Build and Install

From a Blueprint tree that already configures and builds:

./configure.sh
make src/cymount/cymount src/cydrive/cydrive
tools/link-bins.sh

link-bins.sh is optional; it puts the binaries where a normal PATH finds them. Package install and cyanotype.inst do the same job on a shipped system.

Confirm:

cymount --version
which cymount

Privilege Hop

cymount always runs as the desktop user. Only cymount-helper escalates, and only with a short allowlist of arguments (mount, umount, mkdir-p-media).

Full passwordless admin (typical builder account)

If doas -n true or sudo -n true already works for you:

cymount setup-privilege

Run that as yourself. It installs the helper. You do not need a special cymount-only rule if full admin -n already works.

Locked-down desktop account

If the user cannot escalate generally, an administrator installs a least-privilege rule for that username (project helper cymount-setup-privilege / package docs). Then that user can run cymount without becoming root for the whole process.

Check privilege

cymount status

Look for:

privilege=ok
privilege_mode=...   (sudo-full, doas-full, or helper-rule)
helper=...            a real path, not MISSING

If privilege=MISSING, the daemon will still start but automount stays off until you fix the hop. status also prints privilege_probe=mkdir-p-media: that check is a mkdir canary, not a full guarantee of every mount.

Media Directories

Volumes land under /media/$USER/<label>. The parents must exist (or be creatable):

/media
/media/$USER

If status shows media_dir=MISSING or user_media=MISSING:

cymount ensure-media-root

That may use the helper. Failure is a hard error with a message, not a silent skip.

Start the Daemon

With the full desktop (usual)

startcyanotype.sh starts cymount --daemon when the binary is present, alongside cywm, cysoundd, and the rest. Starting the desktop is enough once privilege and media roots are good.

By hand (debug or minimal session)

cymount --daemon

It prints a line with the pid, poll interval, and whether privilege is ok. Leave that terminal open, or background it under your session supervisor. A second --daemon refuses to start if the pidfile already names a live cymount.

One-shot without the daemon

For scripts or a quick plug test without a poller:

cymount scan

Same discover+automount work as one daemon cycle. The daemon is what keeps doing that while you work.

Check That It Works

cymount status
cymount list
cymount discover

Plug a USB stick (allowlisted filesystem) or insert a disc, wait a couple of seconds with the daemon up, then:

cymount list
cydrive

You should see the volume in the ledger and in CyDrive. Open opens cyfiler on the mount path. Eject uses the same cymount path the Toolchest uses.

Smoke script when present:

tools/cymount-smoke.sh

Common Mistakes

See Also

Cyanotype Project. Blueprint Desktop. BSD 2-clause. Not affiliated with Silicon Graphics. SGI, IRIX, and Indigo Magic belong to their owners. 1.0 is aimed at 31 October 2026.