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 terminal | Workspace window | |
|---|---|---|
Terminals, panes, tabs and cs | Yes | Yes |
| File browser and editor | Over the whole machine, starting at your home directory | Over the workspace |
| Dashboard | Metrics and About | Metrics, Workspace, Search and About |
| Search, graph and agent teams | No | Yes |
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 teamandcs sessionhandover and takeover say they need a workspace window. To open a directory as a workspace, runchan 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.
| Command | Opens |
|---|---|
chan-term | A 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 ~/notes | The directory in a standalone terminal window's file browser. |
chan-edit notes.md | The 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 from | The path opens |
|---|---|
| A chan terminal | Where 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 entry | In 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 set | Nowhere. 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
chancommand-line packages carry these names too, but cannot start Chan Desktop: with none running,chan-filesandchan-editsay 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.
-
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 -
Check the choice
This prints
chan-term.desktop:$xdg-terminal-exec --print-id -
Open a shell, then a program
A shell in your home directory, then
topin a window of its own:$xdg-terminal-exec --dir="$HOME"$xdg-terminal-exec --app-id=TUI.float -e top
chan-term launch | What happens |
|---|---|
| No command, like Omarchy's Super+Return | Your 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. |
--hold | Keeps that window open after the command exits, until you close it. |
--app-id=ID | Sets 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=TITLE | Sets 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_HANDOFFset, a launch with no command opens nothing and says why. - A
--dirthat 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...], andchan-term --helpdescribes them. - The
chan-termof thechancommand-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-idand--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.
-
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 -
Check the choice
This prints
chan-edit.desktop. Thenxdg-open notes.mdopens 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
.mdfile opens in Chan Desktop once it is installed. - A window manager whose
xdg-openfinds 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.
| To | Do |
|---|---|
| Open one file in Chan Desktop | Control-click it in Finder and choose Open With → Chan. |
| Open every Markdown file in Chan Desktop | Select one in Finder, choose File → Get Info (Cmd+I), pick Chan under Open with, and click Change All.... |
| Open one from Terminal | open 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.