mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 02:00:13 +02:00
steamFrame.launchers.<desktop ID> takes the app's own entry (a Flatpak's
export, a Nix package's or a host file) and rewrites only its command lines
(hostEnv, env, flatpakArgs, args, wrappers) and the keys asked for
(mimeTypes, defaultFor, settings), so name, icon, translations and actions
stay the app's and follow its updates.
- Package entries are rewritten at build time; Flatpak/host file entries at
runtime by steam-frame-nix-launchers into
<session.runtimeDir>/steam-frame-nix/applications (tmpfs), on switch, at
login and when Flatpak installs/updates apps (path unit); the Home Manager
links point there.
- keyring.{enable,electron} replaces steamFrame.keyring.{flatpaks,programs}
(clean break: the old options fail with the new form).
- Firefox's launcher is the Flatpak's entry with the profile wrapper in
front (no --profile for the profile manager); Jellyfin's hardware
decoding sets flatpakArgs and env.
- cleanup --all removes the tmpfs entries.
- Check on copies of the real Element, KRDC, Firefox, gedit, Jellyfin and
Claude entries, quoting and generator behaviour.
102 lines
3.9 KiB
Markdown
102 lines
3.9 KiB
Markdown
# Session fixes
|
||
|
||
Four fixes for the Frame's [two graphical sessions](../README.md#two-sessions):
|
||
session settings and services, the portal, the keyboard layout and the
|
||
clipboard. Options: [README, Options](../README.md#options) (`session.*`,
|
||
`keyboard.layout`, `keyboard.variant`, `clipboardSync.*`).
|
||
|
||
## Session settings and services
|
||
|
||
Module `session` (`session.nix`), used by the other modules; normally
|
||
nothing to set.
|
||
|
||
**Problem:** the nested desktop can't see the Steam session's runtime dir
|
||
and bus (services, KDE wallet), and switching from the nested desktop,
|
||
Home Manager can't reach the service manager ("User systemd daemon not
|
||
running") and skips `reloadSystemd`.
|
||
|
||
**What you get:**
|
||
|
||
- `session.runtimeDir` / `session.bus` point at the Steam session's runtime
|
||
dir and bus; `session.busEnv` is a launcher prefix to reach them.
|
||
- After every switch this module reloads the Steam session's user manager
|
||
and applies `session.services.start` / `stop` / `restart`, which other
|
||
modules fill (you can add your own units).
|
||
|
||
**Configuration:** apps that keep secrets in the wallet get a
|
||
[launcher](launchers.md) with `keyring.enable`. Another app that must reach
|
||
the outer session (its bus, services or wallet) gets the bus through its
|
||
launcher's `hostEnv`; a hand-written entry uses the prefix `session.busEnv`:
|
||
|
||
```nix
|
||
{ config, ... }: {
|
||
steamFrame.launchers."org.example.App".hostEnv.DBUS_SESSION_BUS_ADDRESS =
|
||
config.steamFrame.session.bus;
|
||
# or, in an entry of your own:
|
||
# Exec=${config.steamFrame.session.busEnv} flatpak run org.example.App %U
|
||
}
|
||
```
|
||
|
||
## Portal fix
|
||
|
||
`session.portalFix.enable`, module `portal`. On by default.
|
||
|
||
**Problem:** the Frame image (SteamOS 0.3.0, build 20260922) points the Steam
|
||
session's `xdg-desktop-portal` at `/usr/share/xdg-desktop-portal/gamescope-portals`,
|
||
which lacks `gamescope-portals.conf`: no backend, no OpenURI, so no app in
|
||
the Steam session can open links.
|
||
|
||
**What you get:** a working OpenURI portal in the Steam session; the
|
||
desktop's portal is unaffected.
|
||
|
||
**Remove when** SteamOS ships `gamescope-portals.conf`.
|
||
|
||
**How it works:** a portal dir in `~/.local/share` linking Valve's `.portal`
|
||
files plus a config (`default=holo;gamescope`), and a drop-in on
|
||
`xdg-desktop-portal.service`.
|
||
|
||
## Keyboard layout
|
||
|
||
`keyboard.layout`, `keyboard.variant`, module `keyboard-layout`.
|
||
|
||
**Problem:** gamescope and its Xwayland displays use US unless
|
||
`XKB_DEFAULT_*` is set; KDE's layout only affects the nested desktop, and
|
||
`~/.config/environment.d` isn't read on the Frame.
|
||
|
||
**What you get:** the layout in the Steam session, from the next Steam
|
||
session start. The layout also picks the
|
||
[VR keyboard](keyboard.md#swipe-and-suggestions)'s default dictionary
|
||
language.
|
||
|
||
**Configuration:** `keyboard.variant` picks a variant of the layout, e.g. for
|
||
`de`: `null` (standard, with dead keys: `^`, `` ` ``, `´` wait for the next
|
||
key), `"nodeadkeys"` (those are typed immediately), `"mac"`, `"neo"`, `"e1"`,
|
||
`"us"` (German letters on a US layout). List them with
|
||
`localectl list-x11-keymap-variants <layout>`.
|
||
|
||
```nix
|
||
steamFrame.keyboard = { layout = "de"; variant = "nodeadkeys"; };
|
||
```
|
||
|
||
**Remove when** SteamOS applies a layout setting to gamescope.
|
||
|
||
**How it works:** a drop-in on `gamescope-session.service` setting
|
||
`XKB_DEFAULT_LAYOUT`/`VARIANT`.
|
||
|
||
## Clipboard sync
|
||
|
||
`clipboardSync.enable`, module `clipboard-sync`. On by default.
|
||
|
||
**Problem:** the Steam session's X displays and the nested desktop have
|
||
separate clipboards.
|
||
|
||
**What you get:** one clipboard: copy in one session, paste in the other.
|
||
|
||
**Configuration:** `clipboardSync.package` replaces the package. Switch from
|
||
a desktop terminal: each switch restarts clipboard-sync if outdated, and it
|
||
must restart with the desktop's environment.
|
||
|
||
**How it works:** [clipboard-sync](https://github.com/dnut/clipboard-sync),
|
||
built from source (its flake is x86-only), started via KDE autostart (the
|
||
desktop can't reach the user manager, and `:2` must exist first).
|