Opening a File

Documentation / Contents - File Handlers

Opening a File

Double-click a file in the File Manager and it opens in the application registered for its type. Under that is one command:

cyopen FILE

What Happens When You Open Something

1. The file is matched to a type by the rules. 2. That type's handler command is looked up. 3. The command is run with the file's path substituted into it.

The path is quoted for you. A file called "Bilbo's Notes (draft).txt" is handed to the handler as one argument, not five, and a name containing a space, a quote or a dollar sign does not turn into a shell surprise.

If the type has no handler, or the handler names a program that is not installed, nothing is launched. Set one in the panel; see The File Handlers Panel.

Only One At A Time

cyopen refuses to run a second copy of itself while one is working. A double-click storm on a slow machine used to fork a process per click until the desktop stopped answering; now the second and later ones exit at once. Diagnostic runs, the ones that only print, are exempt.

Opening With a Particular Tool

To override the registered handler for one file, name the tool:

cyopen --with nedit report.txt

This is also what happens when you drop a file onto an executable in the File Manager: the file becomes an argument to that program.

To see what would be run without running it:

cyopen --print report.txt

The First Run

The first time the desktop runs with no handler list at all, cyopen builds one: it scans the applications installed on this machine, fills in the best handler for each type from the ranking tables, writes the result, and puts up a banner saying it has done so.

You can repeat that at any time:

cyopen --autofill --write

See Choosing a Handler for the panel's equivalent and for how "best" is decided.

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.