You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **A second session for the same project no longer breaks a running session's notifications, Docker access, and kitty remote control.** The portal, Docker, and kitty proxies each created their unix socket at a path keyed only on the project (`<sandbox home>/.dbus-proxy/bus`, `<sandbox home>/docker.sock`, `<sandbox home>/.kitty.sock`), but sandbox home is shared by every session for that project. Starting a second session unlinked the live session's socket and re-created it, and that session's exit deleted the path outright - leaving the first session with `DBUS_SESSION_BUS_ADDRESS`, `DOCKER_HOST`, and `KITTY_LISTEN_ON` pointing at a path that no longer existed. `notify-send` failed with `Could not connect: No such file or directory` for the rest of the session, with no way to recover short of restarting it. Each session's sockets now live in a directory private to the owning process (`<sandbox home>/.run/<pid>/`), so concurrent sessions cannot disturb each other; directories left by sessions that are gone are reclaimed on the next start. `DBUS_SESSION_BUS_ADDRESS` is unchanged; `DOCKER_HOST` and `KITTY_LISTEN_ON` now point at `$HOME/.run/<pid>/docker.sock` and `$HOME/.run/<pid>/kitty.sock` inside the sandbox.
10
+
-**A socket path too long for the kernel is now reported as such.** The proxy socket paths above sit under an already-long sandbox home, and `bind(2)` rejects anything past 107 bytes (103 on macOS) with a bare `invalid argument` - which the portal surfaced only as an opaque "proxy socket not created" timeout. The portal, Docker, and kitty proxies now fail with the path, its length, the limit, and the remedy (a shorter project directory name).
1. A Unix socket proxy is created at `$HOME/docker.sock` inside the sandbox
523
+
1. A Unix socket proxy is created at `$HOME/.run/<pid>/docker.sock` inside the sandbox, where `<pid>` is the devsandbox process that owns the session. Sandbox home is shared by every session for the project, so the socket is kept per-session to stop a second session from unlinking a live one's socket.
524
524
2. The `DOCKER_HOST` environment variable is set to point to this socket
525
525
3. All requests are filtered before being forwarded to the host Docker socket
526
526
4. Write operations are blocked with an HTTP 403 error
| Proxy socket (`$HOME/.kitty.sock`) | read-write (proxy is local to the sandbox home) | kitty remote-control via the filtering proxy |
612
+
| Proxy socket (`$HOME/.run/<pid>/kitty.sock`) | read-write (proxy is local to the sandbox home) | kitty remote-control via the filtering proxy |
613
613
|`kitty` binary | read-only | CLI for `kitty @ launch`, `kitty @ ls`, etc. |
614
614
615
615
The host's real kitty socket is **not** bind-mounted into the sandbox.
616
616
617
617
### Environment Variables
618
618
619
-
-`KITTY_LISTEN_ON` - rewritten to `unix:$HOME/.kitty.sock` inside the sandbox. Host value is never exposed.
619
+
-`KITTY_LISTEN_ON` - rewritten to `unix:$HOME/.run/<pid>/kitty.sock` inside the sandbox, where `<pid>` is the devsandbox process owning the session. Host value is never exposed.
620
620
-`KITTY_WINDOW_ID`, `KITTY_PID` - passed through from host (read-only signals about the host pane).
621
621
622
622
### Limitations
@@ -698,7 +698,7 @@ notifications = false
698
698
4.`DBUS_SESSION_BUS_ADDRESS` inside the sandbox points to the proxy socket
699
699
5. A `.flatpak-info` file is created so `xdg-desktop-portal` recognizes the sandbox as a valid Flatpak-like application
700
700
701
-
The proxy is started before the sandbox launches and stopped when the sandbox exits.
701
+
The proxy is started before the sandbox launches and stopped when the sandbox exits. Each session runs its own proxy with its own socket on the host, so starting or exiting a second session for the same project leaves a running session's notifications working.
0 commit comments