# Configuring the Session Shell

_Peios / Using Peios / The Desktop Service_

> Choose shell programs and understand their permissions and restart policy.

The machine's shell setting controls which programs Fenestra starts for
every desktop session. Shell programs receive desktop-wide capabilities,
so choose trusted programs and preserve an independent administrative way
to recover a broken configuration.

## Choose shell programs

Before changing the configuration, install the intended programs and
confirm that your account can write the machine's Fenestra settings.
Desktop Settings provides an **Advanced** section when Fenesh is installed.

To change the shell with the Registry Editor:

1. Open `Machine\Software\Fenestra`.
2. Set `Shell` to a `REG_MULTI_SZ` containing the absolute path of each
   shell program. Use a separate entry for each program.
3. Start another desktop session and check that the expected controls
   appear. Existing sessions keep their shell selection.

The list accepts up to 16 programs. Entries are executable paths, not
commands with arguments. One invalid relative path invalidates the whole
value. An absent, unreadable, or mistyped value selects the companion
`fenestra-taskbar` and `fenestra-launcher` beside the compositor executable.

An explicitly empty list starts no shell. It does not restore the default.
Delete the value to restore the fallback programs. A valid path whose
program cannot start is reported; Fenestra does not replace that entry with
a fallback program.

## Understand the authority granted

Configured shell processes receive the surface list and can ask Fenestra
to start programs, close another application's surfaces, or end the
session. Their browser surfaces can control focus, overlays, and global
shortcuts. Shell programs retain the session account's operating-system
permissions; their desktop role does not make them administrators.

Fenestra identifies a shell connection from a tracked child process and
kernel-reported peer identity. A surface title, role, or application name
does not grant that role. Protect write access to the machine's `Shell`
value as carefully as access to the selected executables.

## Restart behavior

Fenestra restarts a shell program after it exits, with a 1-second delay.
It stops retrying after three consecutive runs shorter than 5 seconds.
A run lasting at least 5 seconds resets that consecutive-failure count.
A failure to start the executable stops that program's supervisor without
retrying.

Correct the program or configuration, then start another desktop session
after the supervisor has stopped. Configuration changes are read at
session startup rather than while a supervisor is running.

## Icons and keyboard shortcuts

Fenestra reads the shared icon-theme chain at session startup and serves
icons for desktop pages. Changes to the chain apply to another session.
The base theme remains the final fallback. The detailed icon contract
belongs to the Peios General System Standards, rather than this guide.

Keyboard shortcuts use personal overrides, then machine overrides, then
built-in defaults. An empty value turns off an action's shortcut; removing
the value restores its fallback. Fenestra watches shortcuts while running.
The installed registry reference lists the actions and accepted values.
