Cocon Manual

The SliTaz desktop

Cocon is the desktop of SliTaz: a light GTK3 desktop built on Openbox, with its own session, login manager, panel, dock, application menu, quick settings, file manager and preferences, plus a few everyday applications (text editor, image viewer, media player, system monitor, screenshot, remote connection). It runs as the Cocon Desktop session, next to the classic LXDE Desktop, which stays untouched. Cocon was named LXTaz until the end of 2026.

Every tool is a small C program, one package each, named like its binary: cocon-<tool>. The cocon meta package brings them all and adds the session:

# spk-add cocon

This manual is for users and administrators. Cocon bugs belong to SliTaz (bugs.slitaz.org, forum.slitaz.org), not to LXDE.

The programs

ProgramPackageWhat it does
cocon-session, cocon-setupcocon Session leader (environment, settings, window manager, autostart); check and repair of the desktop setup
cocon-dmcocon-dm Login manager, replaces slim (in test)
cocon-panelcocon-panel Top bar: windows, clock, status, notifications, tray
cocon-dashcocon-dash Fullscreen application menu, Super key
cocon-dockcocon-dock Bottom dock with favorite launchers
cocon-ctrlcocon-ctrl Quick settings dropdown, Ctrl+Super
cocon-filescocon-files File manager, desktop icons and wallpaper
cocon-prefscocon-prefs Desktop preferences, one window
cocon-lock, cocon-lock-watchcocon-lock Screen lock, idle screen off and lock
cocon-logoutcocon-logout Lock, suspend, log out, restart, shut down
cocon-sucocon-su Password dialog to run a command as root
cocon-editcocon-edit Text and code editor, Markdown viewer
cocon-imagecocon-image Image viewer and light editor
cocon-playercocon-player Video and music player
cocon-moncocon-mon System monitor and process list
cocon-shotcocon-shot Screenshot of the screen, a window or an area
cocon-remotecocon-remote SSH terminal and file copy
cocon-welcomecocon-welcome First-login welcome window
—cocon-icons, cocon-wallpapers Shared cocon-* icon tiles; the slitaz-dark.jpg and slitaz-light.jpg wallpapers in /usr/share/cocon/wallpapers

The desktop tools (panel, dash, dock, ctrl daemon, files desktop, lock watcher) start from /etc/xdg/autostart with OnlyShowIn=Cocon: they run in the Cocon session only.

Configuration files

Each tool keeps its own file in ~/.config/cocon/, plain text, editable by hand; most tools reload it at once. cocon-prefs writes them for you. A system default may sit in /etc/xdg/cocon/ (flavor or administrator).

FileUsed by
session.confcocon-session (window manager)
panel.confcocon-panel
favoritescocon-dash, cocon-dock, cocon-prefs
dock.confcocon-dock
ctrl.confcocon-ctrl (sound control, accent color)
files.confcocon-files (view, desktop wallpaper)
desktop.confcocon-prefs (touchpad)
lock.confcocon-lock-watch, cocon-logout
edit.conf, edit/syntax/, edit/tools/cocon-edit
image.conf, image/plugins/cocon-image
player.conf, player.m3ucocon-player
remote.confcocon-remote
welcome-hidecocon-welcome

Appearance (theme, icons, font, cursor) lives in the GTK file ~/.config/gtk-3.0/settings.ini; the default applications in ~/.config/slitaz/applications.conf.

cocon-session and cocon-setup

cocon-session is started by the login manager (session Cocon Desktop, /usr/share/xsessions/Cocon.desktop) or by startx. It replaces lxsession in the Cocon session.

cocon-session            start the session
cocon-session --reload   publish settings.ini again
cocon-session --logout   end the running session
cocon-session --version

At start it:

  1. loads /etc/profile.d/*.sh, starts a D-Bus session bus when none runs, sets XDG_CURRENT_DESKTOP=Cocon, DESKTOP_SESSION=Cocon, XDG_MENU_PREFIX=lxde- and COCON_SESSION_PID;
  2. runs cocon-setup --migrate and --fix-openbox on the home;
  3. publishes /etc/xdg/gtk-3.0/settings.ini then the user settings.ini as XSETTINGS, and follows the user file: a theme change reaches the running applications at once;
  4. starts the window manager, wm= of ~/.config/cocon/session.conf, else of /etc/cocon/session.conf (default openbox, none when another program starts it);
  5. runs the XDG autostart entries once the window manager is up (3 s at most): ~/.config/autostart hides a system entry of the same name; Hidden, OnlyShowIn/NotShowIn, TryExec and X-GNOME-Autostart-enabled=false are honoured.

An entry with X-Cocon-Respawn=true (panel, dock, dash, ctrl, files desktop, lock watcher) and the window manager are started again when they crash, 3 times a minute at most. A program that exits with status 0 or is killed with TERM, KILL, INT or HUP is left alone. A clean window manager exit (Openbox Exit) ends the session. The lxsession autostart file (@command lines) is not read: use ~/.config/autostart.

cocon-setup

$ cocon-setup            check, one ok / fail / note line per item
$ cocon-setup --fix      repair
# cocon-setup --fix      also the system part
WhoChecked
userWINDOW_MANAGER="cocon-session" in ~/.config/slitaz/applications.conf (slim, startx)
userold copies of the cocon, lxpanel and pcmanfm entries in ~/.config/autostart: renamed *.desktop.old
userOpenbox keybinds of a user rc.xml: Super+E files, Alt+F2 run, Ctrl+Alt+T terminal, Ctrl+Alt+Delete logout, Super+L lock (old file kept as rc.xml.old)
rootLOGIN_MANAGER="cocon-dm" in /etc/rcS.conf when cocon-dm is installed (old file kept as /etc/rcS.conf.<old>)
rootdefault-session=cocon in /etc/cocon/dm.conf (another explicit choice is kept)
rootthe system and skel applications.conf

cocon-setup --migrate renames what an LXTaz system left (~/.config/lxtaz, caches, autostart copies, names in mimeapps.list, rc.xml, applications.conf; as root /etc/lxtaz/dm.conf, /etc/xdg/lxtaz, the dm state and LOGIN_MANAGER).

cocon-dm: login manager

A login manager replacing slim, in test. The greeter takes its colors from the GTK theme: clock, date, a card with the user's initial, user and password, and a bottom bar with the host name, the session list, Restart and Shut down. Escape clears the password. On a live system the card tells the live user and password while they are still the default. Passwords are checked against /etc/shadow (no PAM); an account with an empty password logs in without one.

# sed -i 's/^LOGIN_MANAGER=.*/LOGIN_MANAGER="cocon-dm"/' /etc/rcS.conf
# /etc/init.d/cocon-dm start|stop|restart
$ cocon-dm --test        greeter only, prints the choice, no login

The daemon takes -d (background) and --config FILE. Its configuration is /etc/cocon/dm.conf, group [dm]:

xserver, xserver-args, display, vtX server (/usr/bin/Xorg, -nolisten tcp, :0, 7; vt=0 gives no vtN argument)
autologin-user, autologin-sessionlog a user in once per boot without the greeter; empty session = the last one used
default-sessionpreselected when no login is remembered (cocon); an id like x11/openbox, wayland/labwc or a bare name
session-startroot command at each login (/usr/bin/reprise --mark-good)
poweroff, rebootcommands of the power buttons
xsessions, wayland-sessionssession directories

X11 sessions run through ~/.xinitrc when it exists, else sh -l -c. For a Wayland session X is stopped, seatd is started when none runs, and the session runs under dbus-run-session when available. Files: last user and session in /var/lib/cocon-dm/state, daemon log /var/log/cocon-dm.log, session output ~/.cache/cocon-dm-session.log. The automatic login of cocon-prefs (Login page) writes this file.

cocon-panel: top panel

The top bar of the Cocon session, one per monitor; it replaces lxpanel there (started by hand in a running Cocon session it stops lxpanel). Maximized windows stop under it.

$ cocon-panel &
$ cocon-panel --reload   re-read panel.conf (also automatic)
$ cocon-panel --quit
ZoneUse
SliTaz buttonopens cocon-dash
Desktop dotsclick to switch; scroll anywhere on the left zone to switch; hidden with one desktop
Window buttonsclick: activate, or minimize the active one; middle click: close; right click: Minimize/Restore, Maximize, Move to desktop, Close
Clockclick: calendar with the notification history and a Do Not Disturb switch. In the calendar: Page Up/Left and Page Down/Right change month, Home or a click on the title goes back to today, Escape closes. A muted bell shows Do Not Disturb, a dot unseen notifications
TrayXEmbed and StatusNotifierItem icons, on the primary monitor
Statusnetwork, Bluetooth, sound, battery; click opens cocon-ctrl, scroll changes the volume by 5 %, middle click mutes

The panel is the notification server: up to 3 popups top right, hover pauses the timeout, critical ones stay until closed, the last 20 go to the history (memory only). Right click on an empty part of the panel gives Panel Preferences (cocon-prefs). Configuration ~/.config/cocon/panel.conf, else /etc/xdg/cocon/panel.conf; defaults:

[panel]
height=30          # 24 to 48
[clock]
date=true
seconds=false
format=            # strftime override, empty = locale
weeks=false        # week numbers in the calendar
right=false        # clock at the right end instead of the center
[windows]
titles=true
all-desktops=false
[notify]
enabled=true
timeout=5

GKeyFile has no trailing comments: in the real file put each comment on its own line.

cocon-dash: application menu

A fullscreen menu: search field, categories, application grid. In the session the daemon (cocon-dash --daemon, autostart) opens it on a lone press of Super; Super with another key or with Ctrl, Alt or Shift is left to Openbox and cocon-ctrl.

cocon-dash --toggle | --show | --hide | --daemon | --quit

Favorites are shared with the dock: ~/.config/cocon/favorites, else /etc/xdg/cocon/favorites, else /usr/share/cocon/favorites, one desktop id per line.

cocon-dock: dock

A centered bar of favorite launchers at the bottom of the primary monitor. In daemon mode it shows on an empty desktop, hides when a window is open and comes back when the pointer touches the bottom edge; it stays off over a fullscreen window.

cocon-dock --daemon       autohide (autostart)
cocon-dock --toggle | --show | --hide | --quit
cocon-dock --size 64      icon size for this run
cocon-dock --prefs        runs cocon-prefs dock

cocon-ctrl: quick settings

A dropdown panel top right, opened by Ctrl+Super (the daemon cocon-ctrl --daemon, autostart) or the status block of the panel. It closes on Escape, Ctrl+Super or when it loses focus.

cocon-ctrl --toggle | --show | --hide | --daemon | --quit
cocon-ctrl --theme dark|light
cocon-ctrl --accent '#3584e4'     # or default
RowAction
Wi-Fiswitch; Networks… opens trame-gui on its Wi-Fi page as root. Hidden without Wi-Fi hardware
Bluetoothswitch (needs trame); Devices… opens trame-gui Bluetooth. Hidden without a chip
Dark modeswitches GTK2/3, icons, Openbox, panel colors, TazTerm and sakura themes, and the wallpaper (one per mode)
Soundslider (unmutes); speaker icon opens alsamixer in a terminal, right click mutes; without PulseAudio a selector picks the ALSA control
Brightnessbacklight slider, 5 % floor, users of group video; hidden without backlight
Battery, Network, Memorydisplay only
Gear, Packages, System, Monitorcocon-prefs, spk-gui, trame-gui, cocon-mon (shown when installed)
Lock, Log Out, Restart, Shut Downcocon-lock, cocon-logout

The daemon alerts at 15 % and 5 % of battery, and at 3 % runs cocon-logout halt (5 s dialog, Escape cancels). ~/.config/cocon/ctrl.conf keeps [sound] control= and [theme] accent=; another accent than orange is a copy of the theme in ~/.themes/SliTaz-Dark-<rrggbb> (or Light). Privileged actions run /usr/libexec/cocon-ctrl-helper through cocon-su (wifi on|off IFACE, bt on|off, suspend, can-suspend, mount DEV [USER], umount DEV).

cocon-files: files and desktop

$ cocon-files [FOLDER|FILE...]
$ cocon-files --desktop      wallpaper and ~/Desktop icons (autostart)

One window per folder: back/forward, path bar, search, grid or list, places sidebar (home, bookmarks, drives, trash, servers). Copy, move, link, trash and delete run in the background with a progress row and a conflict dialog (Skip, Keep Both, Replace/Merge, Apply to all). Right click gives Open, Open With, Extract Here, Compress…, Cut, Copy, Paste, Rename, Move to Trash, Properties; on the background New Folder, New Empty File, Paste, Show Hidden Files, Open Terminal Here, Open as Root (with cocon-su).

KeyAction
Ctrl+L, /, ~type a location or server address
Ctrl+Dadd the folder to the bookmarks
typing, Ctrl+Ffilter the folder
Backspace, Alt+Upparent folder
Alt+Left / Alt+Right / Alt+Homeback / forward / home
Ctrl+C / Ctrl+X / Ctrl+Vcopy / cut / paste
Delete / Shift+Deletetrash / delete permanently
F2, Ctrl+Shift+Nrename, new folder
Ctrl+Hhidden files
Ctrl+1 / Ctrl+2, Ctrl+= / Ctrl+- / Ctrl+0grid / list, zoom
F4, Alt+Enter, F5terminal, properties, reload
Ctrl+N, Ctrl+W, Ctrl+Qnew window, close, quit all

Drag and drop: same filesystem moves, another copies; Ctrl copies, Shift moves, Ctrl+Shift links; onto the trash trashes.

Archives: tar (gz, bz2, xz, lzma), zip (a password is asked when needed), cpio, tazpkg, deb, rpm and single compressed files are unpacked with the base tools; one item lands beside the archive, several in a folder named after it, nothing is replaced. Compress… makes tar.gz or tar, and tar.xz, tar.bz2, zip when xz, bzip2, zip are installed.

USB drives without gvfs: the USB partitions show under the places; a click mounts through the cocon-ctrl helper in /media/USER/LABEL, the eject button unmounts. Servers: Connect to Server… takes sftp://user@host/folder, user@host or ftp://host/ (gvfs package); with dropbear an unknown host key is shown for confirmation first.

Desktop (--desktop): wallpaper on every monitor, ~/Desktop icons on the primary one. Right click: New Folder, New Empty File, Paste, Select All, Open Terminal Here, Add / Remove a Desktop (Openbox), Desktop Background (cocon-prefs), Take a Screenshot.

~/.config/cocon/files.conf: [files] view, icon-size, show-hidden, sort, sort-reversed, width, height, sidebar, archive, terminal (default terminal); [desktop] wallpaper, wallpaper-mode (fill, fit, center, tile, stretch, color), background.

cocon-prefs: desktop preferences

One window with a sidebar, every change applied at once into the tool's own file. A page shows only when its tool is installed. Also opened by the gear of cocon-ctrl.

$ cocon-prefs [PAGE]
$ cocon-prefs --apply     mouse, keyboard, touchpad (login autostart)
PageSettings
appearancelight/dark, accent, a wallpaper per mode, font, hinting, cursor
panelpanel.conf
dockon/off, icon size, favorites (order, add, remove)
appsweb browser, terminal, text editor (applications.conf)
inputpointer speed, left-handed, touchpad tap and natural scrolling, key repeat
lockscreen off delay, lock delay, lock before suspend
windowsOpenbox: rounded corners, focus follows mouse, number of desktops, obconf
startupswitch each autostart entry, add an application
memorymemory used by each running Cocon tool (read only)
logincocon-dm automatic login user and session; Save asks the administrator password
shortcutsthe most used keyboard shortcuts (read only)

The keyboard layout is a system setting of trame. Turning a startup entry off writes a user copy with Hidden=true.

cocon-lock and cocon-lock-watch

A black screen and a password field; the session and its windows stay open. Super+L, the Lock buttons of cocon-ctrl and cocon-logout, or:

$ cocon-lock
$ cocon-lock trame power suspend     lock, then run the command

Enter checks the password, Backspace deletes, Escape or Ctrl+U clears. After a wrong password keys wait 1 s, then 2, 4… up to 30 s. The prompt hides after 30 s, a key or mouse move brings it back. Exit status 0 when unlocked, 1 when the screen could not be locked. cocon-lock is setuid root only to read the user's own hash, and refuses an account with a locked password. Like any X screen locker, VT switching stays open.

cocon-lock-watch (autostart) reads ~/.config/cocon/lock.conf, else /etc/xdg/cocon/lock.conf, and follows it:

[screen]
off=10       # minutes before the screen turns off, 0 = never
[lock]
idle=10      # minutes before the session locks, 0 = never
suspend=true # lock before suspend (cocon-logout)

cocon-logout

cocon-logout                     choice dialog
cocon-logout lock                cocon-lock, no confirmation
cocon-logout suspend             locked first (lock.conf), no confirmation
cocon-logout exit|reboot|halt    5 s confirmation
cocon-logout halt --force        no confirmation
cocon-logout exit --dry-run      dialogs only, nothing done

Aliases: logout = exit, shutdown and poweroff = halt. Escape cancels. Suspend is offered only when doas -n /usr/libexec/cocon-ctrl-helper can-suspend passes (admins of group wheel, a kernel that can suspend).

cocon-su: root rights

$ cocon-su spk-gui

A fullscreen password dialog in front of doas: members of group wheel type their own password, nopass rules need none. When doas refuses or is missing, busybox su asks the root password. Three tries; Escape cancels. Nothing is stored, and cocon-su is not setuid. The Cocon tools run their tazbox su entries through it when installed.

cocon-edit: text editor

$ cocon-edit notes.txt main.c:120:8
$ cocon-edit -r /etc/fstab        read only
$ cocon-edit -v README.md         Markdown in the view

One window with tabs; a second call opens its files there. F1 shows the full user guide. Features: syntax colors, Markdown view with outline (F9) and clickable task boxes, find and replace with regex, comment toggle, UTF-8 or ISO-8859-1 and LF or CRLF kept, Edit as Root for files you cannot write. A file changed by another program reloads in place (changed lines in amber, one Ctrl+Z gives the old text back); with unsaved changes a bar asks Reload or Keep Mine.

KeyAction
Ctrl+N, Ctrl+T / Ctrl+O / Ctrl+S / Ctrl+Shift+Snew tab / open / save / save as
Ctrl+W, Ctrl+Qclose tab, quit
Ctrl+Z, Ctrl+Shift+Z or Ctrl+Yundo, redo
Ctrl+F, Ctrl+H, Ctrl+Lfind, replace, go to line
Ctrl+G, F3 / Ctrl+Shift+G, Shift+F3next / previous match
Ctrl+/comment / uncomment
Ctrl+E, F9Markdown view / source, outline
F7, Shift+F7, F8check, format, output panel
Ctrl+Shift+Dinsert the date
Ctrl+Tab, Alt+1…9, F1change tab, help

Syntaxes are nanorc files: ~/.config/cocon/edit/syntax/, then /usr/share/cocon-edit/syntax/, then nano's own when nano is installed. Tools (menu Tools) are executables in ~/.config/cocon/edit/tools/ or /usr/share/cocon-edit/tools/ with a header:

#!/bin/sh
# Name: Trim Trailing Spaces
# Input: selection          (selection | document | none)
# Output: replace           (replace | insert | panel | message | none)
# Key: <Ctrl><Alt>t         (optional)
# Syntax: sh c              (optional)
sed 's/[[:blank:]]*$//'

They get COCON_EDIT_FILE, COCON_EDIT_LINE, COCON_EDIT_COLUMN, COCON_EDIT_SYNTAX; Stop or 30 s ends them. Settings (Preferences…) are kept in ~/.config/cocon/edit.conf: [edit] font, tab-width, spaces, wrap, line-numbers, outline, markdown-view, session (reopen the last files), window size, recent files.

cocon-image: image viewer

$ cocon-image photo.jpg        this image, then the others of its folder
$ cocon-image ~/Images         the images of a folder
$ cocon-image -f photo.jpg     fullscreen
$ cocon-image -s ~/Images      slideshow
$ cocon-image --convert resize:50% in.jpg out.jpg
Key, mouseAction
Right, Space, Page Down, N / Left, BackSpace, Page Up, P next / previous image (arrows move a zoomed image)
Home / Endfirst / last
+ / -, wheel; 0; 1zoom; best fit; 100 %
F, F11, double click; S, F5; Escapefullscreen; slideshow; leave
Deletemove to the trash
R / Shift+R, H / Vrotate right / left, flip
E; M, D, I; [ ]edit mode; selection, pencil, color picker; pencil width
Enter, Ctrl+N, Ctrl+C, Ctrl+Zcrop, selection as new image, copy, undo
Ctrl+S, Ctrl+Shift+Ssave, save as (PNG, JPEG...)
F1, Qshortcuts, quit

Plugins are executables in ~/.config/cocon/image/plugins/ or /usr/share/cocon-image/plugins/, called with IN.png OUT.png and an answer (header comments Name, Ask, Default, Key); shipped: Grayscale, Invert Colors, Pixelate, Resize. --convert takes gray, invert, pixelate:SIZE, resize:WIDTH or resize:PERCENT%. Slideshow delay and pencil color and width are kept in ~/.config/cocon/image.conf.

cocon-player: media player

$ cocon-player movie.mkv
$ cocon-player ~/Music/Album mix.m3u
$ cocon-player               last list, ready to play
$ cocon-player --audio       music view on the last list

Decodes with ffmpeg-lite and plays through ALSA. A video shows in the window, the playlist on its right; a sound file shows cover, title, artist and album over the list (P folds it to a mini player).

KeyAction
Space, K, click on the videoplay / pause
Left / Right, Home-10 s / +10 s, start
Up / Down, wheel, Mvolume, mute
F, F11, double click; Escapefullscreen; leave it
Page Up / Page Downprevious / next file
Lloop: off, all files, this file
P, Deleteplaylist, remove the selected file
Ctrl+O, Ctrl+S, F1, Qopen (adds), save the playlist, shortcuts, quit

Playlists are saved as .m3u in ~/Music/Playlists when it exists, else ~/Music. Volume, loop mode and current file go to ~/.config/cocon/player.conf, the last list to ~/.config/cocon/player.m3u. COCON_PLAYER_DEVICE picks another ALSA device.

cocon-mon: system monitor

Four cards with 60 s graphs (processor, memory, network, disks) and a Processes page: applications with their menu name and icon, their helpers on the same row. Tick All processes for other users and kernel threads. End Process or Delete sends SIGTERM after a confirmation. Ctrl+F searches, Escape clears the search then goes back, Alt+Left goes back, Ctrl+Q quits.

cocon-shot: screenshot

cocon-shot                 options window: delay, Screen / Window / Area
cocon-shot -f | -w | -a    screen, active window, area (Escape cancels)
cocon-shot -a -d 5         wait 5 seconds
cocon-shot -o shot.png     save, no preview (.png or .jpg)
cocon-shot -w -c           copy to the clipboard, no preview

The preview saves to ~/Images/Screenshot-DATE.png (editable name and folder; .jpg gives JPEG), copies, opens with an application or retakes. Openbox keys: Print, Alt+Print, Shift+Print. Exit status 1 when cancelled. X11 only.

cocon-remote: remote connection

$ cocon-remote [user@]host[:port]

Saved servers on the left; host, user, port, SSH key, extra options and remote path on the right. Open Terminal (or Enter) runs ssh; Send Files, Send Folder and Download run scp -r, in the terminal of Cocon Files. Works with dropbear and openssh. The password is asked by ssh in the terminal and never saved. Servers go to ~/.config/cocon/remote.conf (30 kept).

cocon-welcome

First-login window with buttons to install software, settings, Install SliTaz (live only), terminal, report a problem, files, and links to the forum, the documentation (the local handbook when slitaz-handbook is installed) and the release notes. Unticking Show at startup creates ~/.config/cocon/welcome-hide; cocon-welcome --autostart then shows nothing.

Debug variables

Each tool prints details on stderr with COCON_<TOOL>_DEBUG=1: COCON_DASH_DEBUG, COCON_CTRL_DEBUG, COCON_DOCK_DEBUG, COCON_FILES_DEBUG, COCON_PANEL_DEBUG, COCON_LOCK_DEBUG (cocon-lock-watch), COCON_LOGOUT_DEBUG, COCON_SU_DEBUG, COCON_EDIT_DEBUG, COCON_IMAGE_DEBUG, COCON_PLAYER_DEBUG, COCON_MON_DEBUG, COCON_SHOT_DEBUG, COCON_REMOTE_DEBUG, COCON_WELCOME_DEBUG. LC_ALL=C shows the English strings.

About

Cocon is free software under the BSD license. Sources: hg.slitaz.org/cocon, one directory per tool; package receipts live in the SliTaz wok.