# Desktop Basics

---

# The Desktop

_Peios / Using Peios / Desktop Basics_

> The three programs behind a Peios desktop session, which state a session shares between devices, and where to start with windows, the dock, and settings.

The Peios desktop runs in a web browser. You sign in to the machine from a
browser page, and the machine shows your desktop session there: application
windows, a dock, a launcher, and a top bar. The applications themselves run
on the Peios machine, with the authority of the account you signed in with.
Knowing which program provides each part tells you where to look when
something is missing or doesn't apply.

## The parts of a session

Three programs work together in every desktop session:

- **GXWI** serves the session. It presents the sign-in page, asks the
  machine's authentication service to check your credentials, and carries
  the session's traffic between your browser and the machine.
- **Fenestra** is the compositor. It tracks the applications in the session
  and arranges their windows into tiles and workspaces.
- **Fenesh** is the shell. It provides the background, top bar, dock,
  launcher, and power menu, and the Desktop Settings and Get started
  applications.

Fenestra and Fenesh run as your account, so they can do only what your
account can do. Fenestra starts whichever shell the machine is configured to
use. If none is configured, Fenestra shows its own minimal taskbar and
launcher instead. [The Desktop Shell](/peios/using-peios/desktop-basics/the-shell.md) and
[The Desktop Compositor](/peios/using-peios/desktop-basics/the-compositor.md) describe each
program in more detail.

## One session on several devices

You can open the same session from more than one device. Some state belongs
to the session, and some to each browser page:

| State | Belongs to |
|---|---|
| Open applications and their windows | The session |
| The workspace each window is on | The session |
| Window size, position, and focus | Each browser page |
| The workspace you are viewing | Each browser page |

Closing a window or moving it to another workspace therefore affects every
device attached to the session. A new window opens on the workspace that was
last selected on any device.

Closing a browser tab doesn't end the session. Sign in again to return to it,
or use the desktop's sign-out action to end it.

## Where to start

These guides cover everyday use of the desktop:

- [Using the Launcher and Dock](/peios/using-peios/desktop-basics/launcher-and-dock.md) to
  start applications and switch between windows.
- [Arranging Windows and Workspaces](/peios/using-peios/desktop-basics/windows-and-workspaces.md)
  to resize tiles and move between workspaces.
- [Desktop Settings](/peios/using-peios/desktop-settings/overview.md) to change the
  wallpaper, clock, dock, and keyboard shortcuts.
- [Everyday Applications](/peios/using-peios/everyday-apps/essential-apps.md) to find the
  application for a file, account, or system task.

If something doesn't appear or doesn't apply, start with
[Troubleshooting Desktop Settings and Applications](/peios/using-peios/desktop-basics/troubleshooting.md)
or [Troubleshooting Windows and Desktop Connections](/peios/using-peios/desktop-basics/troubleshooting-the-compositor.md).

---

# The Desktop Shell

_Peios / Using Peios / Desktop Basics_

> The Fenesh shell's programs, the account it runs as, and which personal settings and machine defaults it stores.

Fenesh provides the background, top bar, dock, launcher, and power menu in
a Peios desktop session. GXWI serves the session, and Fenestra arranges its
windows. Fenesh is the shell application inside that session.

The component includes three programs:

| Program | Role |
|---|---|
| `fenesh` | Desktop shell surfaces and session controls |
| `fenesh-settings` | Desktop Settings for personal choices and machine defaults |
| `fenesh-welcome` | The Get started window with introductory desktop actions |

The shell runs as the signed-in account. Fenestra grants the configured
shell its desktop role. Starting an unrelated application does not make it
part of the shell. Desktop Settings and Get started are ordinary desktop
applications, with the same account permissions as the session.

## What the shell stores

Fenesh stores personal wallpaper, clock format, dock pins, and the welcome
marker in your registry settings. Machine defaults are separate. Deleting
a personal override restores the corresponding machine default, except
for the welcome marker, which enables another automatic welcome attempt.

Fenesh does not own account credentials, window tiling rules, the
application catalog format, or shared keyboard-shortcut and file-opening
contracts. Those belong to the components that provide them. Desktop
Settings presents controls for some of those shared settings.

---

# The Desktop Compositor

_Peios / Using Peios / Desktop Basics_

> How the Fenestra compositor arranges windows, how it relates to the shell and its fallback programs, and which window state is shared between devices.

Fenestra arranges windows in a Peios desktop session. Its Rust process
tracks applications and surfaces, while its browser page chooses each
window's size, position, and focus. The same session can appear on several
devices with different layouts.

GXWI starts Fenestra after sign-in and routes authenticated session traffic
to it. Fenestra runs as the session account. It does not receive your
password or perform the browser's sign-in authentication.

## Compositor and shell

The compositor manages surfaces; the shell provides controls such as a
dock and launcher. Fenestra starts the configured shell and grants it
access to desktop-wide operations. Fenesh is one shell that uses those
operations. Fenestra also includes a minimal taskbar and launcher for
sessions without a configured replacement.

The package contains three programs:

| Program | Role |
|---|---|
| `fenestra` | Session compositor, application connections, and desktop page |
| `fenestra-taskbar` | Fallback panel with a button for each window |
| `fenestra-launcher` | Fallback application search overlay |

The fallback programs do not provide Fenesh's wallpaper settings, pinned
dock, welcome application, or power menu. Choosing a shell changes those
controls without replacing Fenestra's window manager.

## Shared and local state

Application surfaces and their workspace assignments belong to the
session. Closing a surface or moving it to another workspace affects every
device attached to that session. Window geometry, focus, dialog position,
and the workspace being viewed belong to each browser page.

The workspace last selected on any device determines where a
subsequent application window opens. Two devices viewing different
workspaces therefore share the choice of destination for that window.

---

# Using the Launcher and Dock

_Peios / Using Peios / Desktop Basics_

> Start applications, switch windows, and keep dock pins.

Use these controls inside a signed-in desktop session. Your active
shortcuts appear in **Get started** and **Desktop Settings**.

## Start an application

Use the launcher to find an installed application:

1. Select the Peios mark at the bottom of the dock, or press the launcher
   shortcut. The built-in shortcut includes Ctrl+Space.
2. Type part of the application's name.
3. Use the arrow keys to select a result, then press Enter. You can also
   select the result with the pointer.

Press Esc to close the launcher. It shows up to 12 matching applications.
It reads application declarations from the system catalog, so a program
needs a valid declaration to appear.

## Pass simple arguments

The launcher accepts whitespace-separated arguments after an application
selector. For example, use an application ID followed by a file path that
contains no spaces. The selected application's declared arguments come
before the additional arguments.

If the entire input matches an application's name or ID, the launcher
treats all of it as the selector. Otherwise it treats the first word as
the selector and the remaining words as arguments. It does not implement
shell quoting, variable expansion, pipelines, or shell commands. Use a
terminal when you need those features.

## Switch between windows

The dock shows pinned applications first, followed by other running
programs. Select a running program's icon to cycle through its windows, or
select a window's dot to focus that window directly. With the built-in
shortcut, Alt+1 through Alt+9 select the first nine dock entries.

Separate processes can have separate dock entries even when they belong
to the same application. The first running instance occupies its pin;
additional instances appear with other running programs. An idle pin
starts the application when selected.

## Use an application's menu

Open a dock entry's context menu to see its available actions. Declared
applications offer **Open** or **New window**, and pin controls. Running
programs offer **Close** or a control to close all their windows. Closing
requests are sent to the application, which decides how to handle unsaved
work.

To keep an application on the dock, select **Pin to the dock**. Drag its
pin to change its position. Select **Unpin from the dock** to remove it.
For default and error behavior, see
[wallpaper, clock, and dock](/peios/using-peios/desktop-settings/wallpaper-clock-and-dock.md).

---

# Arranging Windows and Workspaces

_Peios / Using Peios / Desktop Basics_

> Resize tiles, move between workspaces, and use dialogs.

Use these controls inside a signed-in desktop session. Keyboard examples
use the built-in assignments; personal or machine shortcuts can replace
them.

## Arrange tiled windows

Application windows share the available desktop area. A window opening on
a workspace takes part of the focused tile, and closing a tile returns its
space to its neighbor.

To resize adjacent tiles:

1. Find the separator between the windows.
2. Drag the separator to the required position.
3. Release it to keep that split on this browser page.

For keyboard operation, press Tab until the separator has focus, then use
the arrow keys along its direction. The layout keeps both sides within
its allowed minimum size. Resizing on one device does not resize another
device's layout.

Alt+J focuses the previous tile and Alt+K focuses the next tile. On a
viewport narrower than 640 pixels, only the focused tiled window appears.
Side panels move to the bottom so they do not consume the narrow width.

## Change workspaces

Workspaces group windows within the session. To move between them:

1. Press Ctrl+Alt+Right Arrow to select the next workspace, or
   Ctrl+Alt+Left Arrow to select the previous one.
2. Open an application to place its window on the last selected
   workspace in the session.

To move the focused window and follow it, add Shift to the corresponding
workspace shortcut. A dialog can also move between workspaces.

Fenestra supports up to 16 workspaces. Below that limit, an empty workspace
is available after the last occupied workspace. Empty gaps collapse as
windows move or close, so workspace numbers can change. The last
selected workspace is retained while empty.

## Use dialogs

Dialogs float over tiled windows instead of taking a tile. You can
continue using other windows while a dialog is open. To reposition one,
drag its title strip. The position changes on this browser page only.

Selecting a dialog brings it in front of other dialogs. Closing it returns
focus to the earlier window when that window still exists. On a narrow
viewport, the dialog uses the available window width.

## Inspect a window's identity

Select the application icon in a window's title strip to show the
application and process information supplied by Fenestra. Select it again
to hide the information. This information comes from the connected
process, rather than text supplied inside its page.

If an application page cannot cooperate with desktop keyboard handling,
the strip keeps an explanatory identity label visible. Use the compositor
controls or another cooperating window when a shortcut is not received
inside that application.

---

# Using the Welcome and Power Controls

_Peios / Using Peios / Desktop Basics_

> Reopen the welcome window and end a desktop session.

The Get started window introduces the launcher, dock, and desktop layout.
Its shortcut hints use your active assignments. Buttons to open files or
a terminal appear only when the corresponding applications are installed.

## Reopen the welcome window

Use the launcher in a signed-in desktop session:

1. Open the launcher from the Peios mark on the dock.
2. Search for `Get started`.
3. Select the application.

You can also select **Show Again** in the **Dock** section of Desktop
Settings. That action clears the automatic welcome marker as well as
attempting to open the window.

At session startup, Fenesh attempts to open Get started when the welcome
application is installed and the account has no welcome marker. It writes
the marker before launching. A launch failure therefore does not retry at
every subsequent session. If the marker cannot be read, Fenesh skips the
automatic launch; if it cannot be written, Fenesh also skips the launch.

## End a session or shut down

Save your work before using the power menu:

1. Open the power menu from the top bar.
2. Choose the action for your intended result.

The menu offers three actions:

<!-- lint-disable-next-line spelling -->
- **Log off** ends your desktop session through the session service.
- **Restart** requests a machine restart from the service manager.
- **Shut down** requests a machine power-off from the service manager.

Restart and shutdown affect the machine, including other sessions. The
service manager authorizes the request using your account; Fenesh does not
bypass its policy. If the request fails or is refused, Fenesh restores the
desktop and displays the error. Read that error before retrying.

---

# Session Transitions

_Peios / Using Peios / Desktop Basics_

> Understand startup, reconnect, and shutdown displays.

Fenestra's browser page connects the sign-in screen to the desktop and
shows when a session or machine becomes unavailable. These displays
communicate session state; they do not authorize a restart or prove that a
machine has powered off.

## Entering the desktop

When GXWI passes its sign-in animation state to the page, Fenestra shows
the arrival transition while the shell starts. Without that saved state,
the page displays the desktop directly. Reduced-motion preferences shorten
the movement.

The first-session greeting is selected when Fenestra creates the account's
`CurrentUser\Software\Fenestra` key. An existing key means the session is
not treated as the first, even if another application created the key.
A registry failure also uses the non-first-session behavior. Only the
session's first browser attachment receives the first-session flag.

The arrival display waits for shell panels and backgrounds to become
ready. A shell can declare how many parts to expect. Without that count,
the page uses readiness and a settling interval. A 10-second upper bound
prevents the arrival display from waiting indefinitely for a broken shell.
The desktop appearing after that bound is not evidence that every shell
program started successfully.

## Reconnecting a page

The compositor sends a complete surface list and the active shortcut map
when a page attaches. A disconnected page reconnects and receives another
snapshot. A page that falls too far behind the compositor's change stream
is disconnected so it can reconnect from a complete snapshot.

An application surface lasts while its application connection exists.
Reconnecting a browser does not recreate a process that has exited. Raw
application pages can also have browser-local state that does not survive
a page reload; shared live application state belongs to the application
process.

## Restart, shutdown, and loss of contact

A trusted shell can announce a restart or shutdown to every page showing
its session. The page displays the departure animation and checks whether
GXWI answers again. The shell remains responsible for requesting the
machine operation from the service manager.

If the shell withdraws its announcement after a refusal, the page returns
to the desktop and stops the outstanding availability check. Delayed
callbacks from that canceled attempt cannot redirect the restored desktop
or interfere with a later attempt. A shutdown message in the browser is
not an independent hardware power-state check.

When a session connection closes and GXWI also stops answering, the page
reports loss of contact and waits for the address to return. This can mean
a machine restart, a network interruption, or another availability problem.
It does not identify the cause. When the expected reconnect conditions are
met, the page returns to sign-in.

---

# Using the Fallback Taskbar and Launcher

_Peios / Using Peios / Desktop Basics_

> Start applications and select windows with the minimal shell.

Fenestra starts its companion taskbar and launcher when the machine has no
valid shell override. These controls are separate from Fenesh's dock and
launcher. Use this guide when your session shows the minimal taskbar.

## Select a window

The taskbar has one button per ordinary window, including its icon and
title. Select the button to focus that window on your device. With the
built-in shortcuts, Alt+1 through Alt+9 select the first nine buttons.

The taskbar lists windows rather than application groups. Several windows
from one application therefore have separate buttons. Dialogs are not
listed as ordinary windows. The taskbar does not store pinned applications.

## Start an application

Use the fallback launcher inside the desktop session:

1. Press Ctrl+Space or Alt+P to show the launcher, unless your shortcuts
   have been changed.
2. Type one word from the application's title or its application ID.
3. Use the up or down arrow to select a match, then press Enter.

The launcher shows up to 12 matches. Press Esc to close it and clear the
search. It reads the installed application catalog when matching or
starting an application.

## Supply arguments

The first whitespace-separated word selects applications. Every remaining
word becomes an additional argument after the application's declared
arguments. A multiword application title is therefore not treated as one
selector. Use its ID or a single matching word when supplying arguments.

The launcher does not support shell quoting, variable expansion, or
pipelines. Use a terminal for commands that need those features. An
application that fails to start is reported in the launcher's error output.

## Change shortcuts

The taskbar and launcher follow the session's shared shortcut settings.
The taskbar uses `DockItem`, and the launcher uses `Launcher`. Changes are
watched while the session runs.

Desktop Settings, when installed, provides the controls for personal and
machine shortcuts. It is part of Fenesh, not the fallback shell. The
installed Fenestra registry reference describes the stored values.

---

# Troubleshooting Desktop Settings and Applications

_Peios / Using Peios / Desktop Basics_

> Investigate missing applications and settings that do not apply.

Use the visible error message first. Fenesh also writes diagnostic messages
to standard error. Where those messages are collected depends on how your
desktop session was started.

## A changed setting does not appear

Check the setting and its scope before restarting anything:

1. Reopen the relevant section in **Desktop Settings** and check whether
   the value was saved.
2. Check for a personal override if you changed a machine default. Choose
   **System Default** for your account if you want to follow that default.
3. Read any permission or save error in the settings window.
4. If an immediate shell setting is saved but unchanged on the desktop,
   inspect the shell's error output for a failed registry watch. Start
   another desktop session to reread the settings.

Sign-in appearance, icon themes, and advanced settings have their own
activation points. See [settings for all users](/peios/using-peios/desktop-settings/for-all-users.md).

## A wallpaper falls back to the embedded image

Check that the selected path is absolute, readable by the session account,
and names a supported regular image file of at most 16 MiB. Symlinks to
regular files are accepted; pipes and other special files are rejected.
A machine wallpaper must be
readable by every intended account. A selected but unusable personal image
falls back to the embedded image, not the machine image.

A supported extension does not prove that image contents can be decoded.
Try a known valid image. If you replaced a file at the same path, select it
again or start another session; Fenesh does not watch image files.

## An application or pin is missing

The launcher lists declared applications in the system catalog. Check that
the package and its application declaration are installed. A running
program without a declaration can appear on the dock but cannot be pinned
or restarted from its menu.

A pin for an uninstalled application stays in your saved list and is
hidden. Reinstalling that application makes the pin visible again.

## A shortcut is refused

Choose a combination that includes Ctrl, Alt, or Meta and that the browser
does not reserve. If another action has that shortcut, remove the existing
assignment before adding it to the intended action. A reset can also create
a conflict with an override; resolve the reported conflict first.

## The welcome window does not open automatically

Search for **Get started** in the launcher. If it is absent, install the
welcome application. If it opens manually, use **Show Again** in Desktop
Settings to clear the marker for another automatic attempt. Check the
shell's error output if reading or writing the marker fails.

---

# Troubleshooting Windows and Desktop Connections

_Peios / Using Peios / Desktop Basics_

> Investigate absent shell controls, missing windows, and connection failures.

Fenestra writes failures and shell restarts to standard error. The place
those messages are collected depends on how GXWI starts the session. Keep
session authentication failures separate from compositor failures: GXWI
owns sign-in and browser routing.

## Shell controls are absent

Check startup and configuration before repeatedly restarting the session:

1. Read the session's Fenestra messages for display-socket or shell errors.
2. Inspect `Machine\Software\Fenestra Shell`. An empty list intentionally
   starts no shell; an absent value selects the fallback programs.
3. Check that each configured executable exists and can run as the session
   account. A valid but missing executable does not select the fallback.
4. Correct the cause and start another desktop session.

Fenestra needs the runtime directory provided by GXWI to bind its display
socket. If binding fails, it reports that applications are unavailable and
does not start shell applications. A browser page appearing is therefore
not enough to establish that application transport is working.

## A window is missing

Check the workspace and application before assuming data was lost:

1. Move through the workspaces using your configured shortcuts.
2. If the viewport is narrow, focus another tiled window with the taskbar,
   dock, or tile shortcut. Only one tiled window is visible at a time.
3. Check whether the application process has exited or disconnected.

Moving a window from another device changes its workspace for the whole
session. Window geometry and focus remain local to each device. A closed
application connection removes its surfaces from every attached page.

## Shortcuts do not work inside an application

A browser can reserve a combination before the desktop receives it. Choose
a different shortcut in Desktop Settings if available. An application's
raw page also needs to cooperate with desktop keyboard forwarding. An
explanatory label stays visible on pages that do not cooperate.

When shortcuts were edited directly, check for conflicting assignments.
The window manager's claimed shortcut takes precedence over a shell claim.
Among shell claims, the first claim wins. Use the settings controls to
avoid introducing these conflicts.

## A debug window appears unexpectedly

The desktop page includes diagnostic key bindings when the compositor page
itself has keyboard focus. Space requests a debug surface. Enter attempts
to start `gxwi-hello-app` beside Fenestra; Shift+Enter requests its raw-page
mode. These are diagnostic controls, separate from the application launcher.
Focus an application window to enter ordinary application input.

## The page waits for the machine

Check whether the machine and its GXWI address are reachable from another
administrative connection. A loss-of-contact display cannot distinguish a
network failure from a stopped service or machine. Avoid repeating a power
operation until the actual machine state is known.
