Skip to content

ManualDesktop

Standalone terminal, files and editor

A window with no workspace, the chan-term, chan-files and chan-edit commands, and Chan Desktop as a default app.

What you can do

  • Open a shell in a window with no workspace behind it.
  • Browse and edit any file on the machine beside your terminals.
  • Open a directory or a file in Chan Desktop from any shell.
  • Make Chan Desktop your default terminal, file browser or Markdown editor on Linux.
  • Open Markdown files in Chan Desktop from Finder.

What a standalone terminal is

A standalone terminal is a window with no workspace behind it, titled Terminal Window 1, Terminal Window 2 and so on. Its shell starts in your home directory. Open one with New terminal on the Computers screen or New standalone terminal in the command launcher.

Standalone terminalWorkspace window
Terminals, panes, tabs and csYesYes
File browser and editorOver the whole machine, starting at your home directoryOver the workspace
DashboardMetrics and AboutMetrics, Workspace, Search and About
Search, graph and agent teamsNoYes
Details and limits
  • On Windows a standalone terminal has terminals only, with no file browser or editor.
  • The file browser never deletes or moves / or your home directory, deletes only files and empty directories, and lists symlinks without opening, copying, moving or deleting them.
  • cs search, cs graph, cs export, cs terminal team and cs session handover and takeover say they need a workspace window. To open a directory as a workspace, run chan serve PATH.

chan-term, chan-files and chan-edit

Three commands open Chan Desktop windows from a shell. They are names of the one chan binary, which Chan Desktop installs beside chan and cs; on Windows it installs only chan and cs.

With Chan Desktop running, a bare chan-term or one with --dir requests focus for its new terminal window. On macOS this brings Chan forward and makes the new window key; on Linux the window manager decides whether to grant focus.

CommandOpens
chan-termA terminal window: your shell, here or in --dir, or the command after -e in a window of its own. See Default terminal on Linux.
chan-files ~/notesThe directory in a standalone terminal window's file browser.
chan-edit notes.mdThe file in a standalone terminal window's editor. A missing text file is created empty.

Both follow cs open's rule: a directory opens in the file browser, a text file in the editor, and any other file is shown in its directory. With no path they open the current directory.

Run fromThe path opens
A chan terminalWhere cs open sends it: on the desktop for a desktop terminal, on the devserver for a devserver's terminal.
Any other shell, or a desktop entryIn a standalone terminal window of the running Chan Desktop, which Chan Desktop's own copies start when it is not running.
An SSH login, a session with no display, or with CHAN_NO_DESKTOP_HANDOFF setNowhere. The command says why and exits 1.
Details and limits
  • A path that cannot be opened is reported, the rest still open, and the exit status is 1.
  • The running Chan Desktop has five seconds to answer each path. A path it leaves unanswered is reported, and the paths after it are not sent.
  • A file:// URI is read as the path it names.
  • The chan command-line packages carry these names too, but cannot start Chan Desktop: with none running, chan-files and chan-edit say so and exit 1.

Default terminal on Linux

Linux desktops that open terminals through xdg-terminal-exec, such as Omarchy, can open them in Chan Desktop: the terminal key binding, TUIs and installer scripts alike. The Arch, Ubuntu, Fedora and Nix packages install the chan-term.desktop entry this needs.

  1. Put Chan Desktop first

    xdg-terminal-exec runs the first valid entry in ~/.config/xdg-terminals.list. This replaces the list; add other terminals on the lines below it to keep a fallback.

    $echo chan-term.desktop > ~/.config/xdg-terminals.list
  2. Check the choice

    This prints chan-term.desktop:

    $xdg-terminal-exec --print-id
  3. Open a shell, then a program

    A shell in your home directory, then top in a window of its own:

    $xdg-terminal-exec --dir="$HOME"
    $xdg-terminal-exec --app-id=TUI.float -e top
chan-term launchWhat happens
No command, like Omarchy's Super+ReturnYour shell, in --dir or the current directory, in a new terminal window of the running Chan Desktop. The window is not restored at the next launch. With Chan Desktop not running, the launch starts it.
-e CMD ARGS... or -- CMD ARGS...The command in a window and process of its own, apart from a running Chan Desktop. chan-term exits with the command's status, or with 127 and no window when the command is not on your PATH.
--holdKeeps that window open after the command exits, until you close it.
--app-id=IDSets the window's Wayland app id, or its X11 class, for compositor rules; Omarchy floats TUI.float. The launch gets a process of its own.
--title=TITLESets a fixed window title. The launch gets a process of its own.
Details and limits
  • The entry stays out of the application menu.
  • The AppImage carries the entry only inside the image, where xdg-terminal-exec does not look, so the AppImage cannot be chosen.
  • A list named for your desktop, such as ~/.config/hyprland-xdg-terminals.list, takes precedence when it exists.
  • Over SSH, or with CHAN_NO_DESKTOP_HANDOFF set, a launch with no command opens nothing and says why.
  • A --dir that is not a directory falls back to your home directory.
  • The options also work directly: chan-term [--dir=PATH] [--app-id=ID] [--title=TITLE] [--hold] [-e CMD ARGS... | -- CMD ARGS...], and chan-term --help describes them.
  • The chan-term of the chan command-line packages cannot open a window of its own: it opens your shell in the running Chan Desktop, starts none, and refuses a command, --hold, --app-id and --title.

File browser and Markdown editor on Linux

Chan Desktop can be what xdg-open and your file manager's Open With use for a directory, opened in a standalone terminal window's file browser, or a Markdown file, opened in its editor. The Arch, Ubuntu, Fedora and Nix packages install chan-files.desktop and chan-edit.desktop, which set no default by themselves.

  1. Choose Chan Desktop

    As the Markdown editor, the file browser, or both:

    $xdg-mime default chan-edit.desktop text/markdown
    $xdg-mime default chan-files.desktop inode/directory
  2. Check the choice

    This prints chan-edit.desktop. Then xdg-open notes.md opens the note in Chan Desktop, starting it when it is not running.

    $xdg-mime query default text/markdown

To go back, run xdg-mime default with the entry you used before.

Details and limits
  • The entries stay out of the application menu.
  • A desktop that already names an application for the exact type keeps it until you choose another.
  • Where nothing names one, the first registered application is used, and that can be Chan Desktop. GNOME's text editors declare plain text, which Markdown is a kind of, so on a stock GNOME a .md file opens in Chan Desktop once it is installed.
  • A window manager whose xdg-open finds no default for directories can pick Chan Desktop as the file browser.
  • xdg-utils 1.1 reads only ~/.config/mimeapps.list; xdg-utils 1.2 also reads the system defaults lists.

Open Markdown files from Finder

On macOS, Chan Desktop is listed as an editor of Markdown files (.md and .markdown) without becoming the app that opens them.

ToDo
Open one file in Chan DesktopControl-click it in Finder and choose Open With → Chan.
Open every Markdown file in Chan DesktopSelect one in Finder, choose File → Get Info (Cmd+I), pick Chan under Open with, and click Change All....
Open one from Terminalopen notes.md once Chan Desktop is the default; open -a Chan notes.md or chan-edit notes.md whatever the default is.

The file opens as cs open notes.md opens it: in the editor of a standalone terminal window, one already open or a new one, brought to the front.

Details and limits
  • A file opened while Chan Desktop is not running starts it, and opens once the windows of the last session are back, in a window of its own beside them.
  • Several files opened at once open in one window.

Next