Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(linux): point Fedora and other non-Ubuntu Wayland desktops to a cloud desktop
Bugfixer 23d3d46cfd4bb
diff --git a/docs/linux-desktop.md b/docs/linux-desktop.mdindex f750ce699b..f9318c2016 100644--- a/docs/linux-desktop.md+++ b/docs/linux-desktop.md@@ -100,6 +100,10 @@ Remove it with `sudo dnf remove openmausbot`. Updates are downloaded by the app,command and opens a terminal for you to run it. Other RPM distributions (RHEL, openSUSE) and image-based Fedoraeditions such as Silverblue are untested; use the AppImage there.+Fedora's GNOME runs only on Wayland (it has no Xorg session to choose), so **This computer** stays unavailable there+for now, as on Ubuntu's GNOME Wayland (see [Enable local control](#enable-local-control)). Chat, screen preview,+Cloud desktop and Private desktop still work.+### Arch Linux and EndeavourOSArch-based distributions are not an official target. The release AppImage runs there, or you can build a native@@ -237,8 +241,9 @@ mouse remains under their control.On GNOME Wayland, **This computer** remains unavailable and an older persisted opt-in is reset to off with privatefile permissions. Sign out and choose **Ubuntu on Xorg** from the login-screen session menu, or continue using Chat,-preview-only capture, Cloud, or Local VM. Wayland re-enablement requires its own real-seat evidence and will not be-controlled by an environment override.+preview-only capture, Cloud, or Local VM. On desktops that aren't Ubuntu the app names no Ubuntu session: it says to+choose an Xorg session if the sign-in screen offers one, and otherwise (Fedora, for example) to use a cloud desktop.+Wayland re-enablement requires its own real-seat evidence and will not be controlled by an environment override.Upstream release assets are mutable, so the build uses an explicit reviewed digest as its trust anchor (the release'sown `checksums.txt` and Sigstore bundles were checked when the digest was reviewed, but the build does not depend on them):diff --git a/electron/capabilities.cjs b/electron/capabilities.cjsindex b976ca7bcb..5ea36e2fb9 100644--- a/electron/capabilities.cjs+++ b/electron/capabilities.cjs@@ -1,4 +1,4 @@-const { PLUGIN_REQUIRED_MESSAGE, isHyprlandSession } = require("./cua-hyprland.cjs");+const { PLUGIN_REQUIRED_MESSAGE, desktopNames, isHyprlandSession } = require("./cua-hyprland.cjs");const DESKTOP_PLATFORMS = new Set(["darwin", "linux", "win32"]);const UNAVAILABLE_LOCAL_STATUSES = new Set(["disabled", "checking", "starting", "error", "stopped", "unavailable"]);@@ -27,6 +27,14 @@ function linuxSession(platform, env) {return "headless";}+/** Ubuntu names itself in the desktop variables ("ubuntu:GNOME"); its sign-in screen offers "Ubuntu on Xorg". Other+ * Wayland desktops, such as Fedora's GNOME, may have no Xorg session at all. */+function ubuntuDesktop(env) {+ const names = desktopNames(env);+ // Without either variable the desktop is unknown; keep the Ubuntu wording.+ return names.length ? names.includes("ubuntu") : undefined;+}+/** `hyprlandPlugin` is what `probeCuaHyprlandPlugin` found: "active" or anything else. */function linuxLocalControlSupport(platform, env, { hyprlandPlugin } = {}) {if (platform !== "linux") {@@ -56,8 +64,10 @@ function linuxLocalControlSupport(platform, env, { hyprlandPlugin } = {}) {available: false,session,reasonCode: "linux-wayland-seat-safety-blocked",- message:- "Local control is not available on Wayland yet. Sign out and choose Ubuntu on Xorg to use This computer.",+ message: ubuntuDesktop(env) !== false+ ? "Local control is not available on Wayland yet. Sign out and choose Ubuntu on Xorg to use This computer."+ : "Local control is not available on Wayland yet. Sign out and choose an Xorg session if your sign-in screen " ++ "offers one; on a desktop without one, such as Fedora, use a cloud desktop instead.",});}return Object.freeze({@@ -198,6 +208,10 @@ function desktopCapabilities({? driverBlocked(localConnection?.reason) ? "cua-driver-blocked" : "cua-driver-unavailable": "unsupported-platform");}+ // The Wayland block names the way out: "Ubuntu on Xorg" on Ubuntu, a cloud desktop where there may be no Xorg.+ if (!remote && localComputer.reasonCode === "linux-wayland-seat-safety-blocked") {+ localComputer.ubuntuDesktop = ubuntuDesktop(env);+ }if (remote) {const unavailable = { reasonCode: "remote-server" };diff --git a/electron/capabilities.test.mjs b/electron/capabilities.test.mjsindex 6ee621e111..99fa354fc7 100644--- a/electron/capabilities.test.mjs+++ b/electron/capabilities.test.mjs@@ -219,6 +219,29 @@ describe("desktop capabilities", () => {});});+ it("keeps Fedora's GNOME Wayland blocked and points it to a cloud desktop, not Ubuntu on Xorg", () => {+ const wayland = { XDG_SESSION_TYPE: "wayland", WAYLAND_DISPLAY: "wayland-0" };+ const fedora = linuxLocalControlSupport("linux", { ...wayland, XDG_CURRENT_DESKTOP: "GNOME", XDG_SESSION_DESKTOP: "gnome" });+ expect(fedora).toMatchObject({ available: false, session: "wayland", reasonCode: "linux-wayland-seat-safety-blocked" });+ expect(fedora.message).not.toMatch(/Ubuntu/);+ expect(fedora.message).toMatch(/Fedora, use a cloud desktop/);+ const ubuntu = linuxLocalControlSupport("linux", { ...wayland, XDG_CURRENT_DESKTOP: "ubuntu:GNOME" });+ expect(ubuntu.message).toBe(+ "Local control is not available on Wayland yet. Sign out and choose Ubuntu on Xorg to use This computer.",+ );++ const blocked = { mode: "unavailable", reasonCode: "linux-wayland-seat-safety-blocked" };+ const capabilitiesFor = (env, remote = false) =>+ desktopCapabilities({ platform: "linux", env: { ...wayland, ...env }, localConnection: blocked, remote }).localComputer;+ expect(capabilitiesFor({ XDG_CURRENT_DESKTOP: "GNOME" }).ubuntuDesktop).toBe(false);+ expect(capabilitiesFor({ XDG_CURRENT_DESKTOP: "ubuntu:GNOME" }).ubuntuDesktop).toBe(true);+ expect(capabilitiesFor({ XDG_CURRENT_DESKTOP: "GNOME" }, true).ubuntuDesktop).toBeUndefined();+ expect(capabilitiesFor({}).ubuntuDesktop).toBeUndefined();+ expect(linuxLocalControlSupport("linux", wayland).message).toMatch(/Ubuntu on Xorg/);+ expect(desktopCapabilities({ platform: "linux", env: { XDG_SESSION_TYPE: "x11", DISPLAY: ":0" } }).localComputer)+ .not.toHaveProperty("ubuntuDesktop");+ });+describe("Omarchy (Hyprland) detection matrix", () => {const hyprland = {XDG_SESSION_TYPE: "wayland",diff --git a/electron/cua-hyprland.cjs b/electron/cua-hyprland.cjsindex 21173a1f74..905b266843 100644--- a/electron/cua-hyprland.cjs+++ b/electron/cua-hyprland.cjs@@ -123,6 +123,7 @@ module.exports = {PLUGIN_REQUIRED_MESSAGE,SYSTEM_DRIVER,SYSTEM_DRIVER_PACKAGE,+ desktopNames,isHyprlandSession,parseCuaPluginStatus,probeCuaHyprlandPlugin,diff --git a/src/components/LinuxLocalControl.test.ts b/src/components/LinuxLocalControl.test.tsindex c31981a082..9ee742920d 100644--- a/src/components/LinuxLocalControl.test.ts+++ b/src/components/LinuxLocalControl.test.ts@@ -76,7 +76,25 @@ describe("Linux local control on Omarchy", () => {} as DesktopCapabilities["localComputer"];const markup = renderToStaticMarkup(createElement(LinuxLocalControl));expect(markup).toContain("Unavailable on Wayland");+ expect(markup).toContain("Ubuntu on Xorg");expect(markup).not.toContain("cua-hyprland-plugin");expect(markup).not.toContain("Try again");});++ it("points Fedora and other non-Ubuntu Wayland desktops to an Xorg session or a cloud desktop", () => {+ fixture.localComputer = {+ available: false,+ support: "unsupported",+ enabled: false,+ status: "unavailable",+ reasonCode: "linux-wayland-seat-safety-blocked",+ ubuntuDesktop: false,+ } as DesktopCapabilities["localComputer"];+ const markup = renderToStaticMarkup(createElement(LinuxLocalControl));+ expect(markup).toContain("Unavailable on Wayland");+ expect(markup).toContain("such as Fedora");+ expect(markup).toContain("Cloud desktop");+ expect(markup).not.toContain("Ubuntu on Xorg");+ expect(markup).not.toContain("Try again");+ });});diff --git a/src/components/LinuxLocalControl.tsx b/src/components/LinuxLocalControl.tsxindex 5308f239d1..34df0943de 100644--- a/src/components/LinuxLocalControl.tsx+++ b/src/components/LinuxLocalControl.tsx@@ -31,6 +31,8 @@ export function LinuxLocalControl() {const busy = pending !== null || local.status === "checking" || local.status === "starting";const ready = local.available;const waylandSafetyBlocked = local.reasonCode === "linux-wayland-seat-safety-blocked";+ // Fedora's GNOME and other desktops that aren't Ubuntu may offer no Xorg session to switch to.+ const otherWaylandDesktop = waylandSafetyBlocked && local.ubuntuDesktop === false;const pluginRequired = local.reasonCode === "linux-hyprland-plugin-required";const hyprland = local.compositor === "hyprland";const wayland = capabilities.host.session === "wayland";@@ -100,11 +102,15 @@ export function LinuxLocalControl() {<div className="mt-3 rounded-lg border border-danger/20 bg-danger/5 p-3"><div className="flex gap-2 text-[12px] leading-relaxed text-ink-secondary"><AlertTriangle size={15} className="mt-0.5 shrink-0 text-danger" />- <span>- {t("computer.linux.waylandBefore")}{" "}- <strong className="font-medium text-ink">{t("computer.linux.waylandXorg")}</strong>- {" "}{t("computer.linux.waylandAfter")}- </span>+ {otherWaylandDesktop ? (+ <span>{t("computer.linux.waylandOtherDesktop")}</span>+ ) : (+ <span>+ {t("computer.linux.waylandBefore")}{" "}+ <strong className="font-medium text-ink">{t("computer.linux.waylandXorg")}</strong>+ {" "}{t("computer.linux.waylandAfter")}+ </span>+ )}</div></div>) : pluginRequired ? (diff --git a/src/lib/local-computer.test.ts b/src/lib/local-computer.test.tsindex 2cf56b144a..3bb8681608 100644--- a/src/lib/local-computer.test.ts+++ b/src/lib/local-computer.test.ts@@ -107,6 +107,24 @@ describe("local computer UI eligibility", () => {);});+ it("doesn't send Fedora and other non-Ubuntu Wayland desktops to Ubuntu on Xorg", () => {+ const capabilities = {+ host: { platform: "linux" as const },+ localComputer: {+ available: false,+ enabled: false,+ reasonCode: "linux-wayland-seat-safety-blocked",+ ubuntuDesktop: false,+ },+ } as DesktopCapabilities;++ expect(+ localComputerDisabledReason({ capabilities, providerSupportsLocal: true }),+ ).toBe(+ "Bots can't use this computer in this kind of desktop session yet. If your sign-in screen offers an Xorg session, sign out and choose it. On a desktop without one, such as Fedora, use Cloud desktop or Private desktop instead.",+ );+ });+it("tells a Mac older than macOS 13 to update, not to grant permissions", () => {const capabilities = {host: { platform: "darwin" as const, label: "Mac" },diff --git a/src/lib/local-computer.ts b/src/lib/local-computer.tsindex a3f7f1fd4a..b4aca4e607 100644--- a/src/lib/local-computer.ts+++ b/src/lib/local-computer.ts@@ -41,7 +41,11 @@ export function localComputerDisabledReason({if (capabilities.localComputer.available) return null;if (pageOnRemoteServer(capabilities)) return t("computer.problem.localRemoteServer");if (capabilities.host.platform === "linux") {- if (capabilities.localComputer.reasonCode === "linux-wayland-seat-safety-blocked") return t("computer.problem.localWaylandBlocked");+ if (capabilities.localComputer.reasonCode === "linux-wayland-seat-safety-blocked") {+ return t(capabilities.localComputer.ubuntuDesktop === false+ ? "computer.problem.localWaylandBlockedOther"+ : "computer.problem.localWaylandBlocked");+ }if (capabilities.localComputer.reasonCode === "wayland-compositor-unsupported") return t("computer.problem.localWaylandDesktop");if (capabilities.localComputer.reasonCode === "linux-hyprland-plugin-required") return t("computer.problem.localHyprlandPlugin");if (!capabilities.localComputer.enabled) return t("computer.problem.localTurnOn");diff --git a/src/locales/en.json b/src/locales/en.jsonindex e6f18ecfa6..7d08e3d307 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -5368,6 +5368,7 @@"computer.problem.cuaNotReady": "The private desktop started, but its controls aren't ready yet","computer.problem.localAiCannot": "This bot's AI can't use this computer. Pick another AI for it in the bot's settings.","computer.problem.localWaylandBlocked": "Bots can't use this computer in this kind of desktop session yet. Sign out, choose “Ubuntu on Xorg” on the sign-in screen, and sign back in.",+ "computer.problem.localWaylandBlockedOther": "Bots can't use this computer in this kind of desktop session yet. If your sign-in screen offers an Xorg session, sign out and choose it. On a desktop without one, such as Fedora, use Cloud desktop or Private desktop instead.","computer.problem.localWaylandDesktop": "In this kind of desktop session, bots can use this computer only on GNOME. Sign out and choose an Xorg session on the sign-in screen to use it here.","computer.problem.localHyprlandPlugin": "Bots can use this computer on Omarchy once its Hyprland add-on is installed and turned on. Open Local control for the steps.","computer.problem.localTurnOn": "Turn on local control in the Screen panel first.",@@ -5947,6 +5948,7 @@"computer.linux.waylandBefore": "Local control is available on Ubuntu Xorg. It remains disabled on Wayland until its input-safety boundary is validated. Sign out and choose","computer.linux.waylandXorg": "Ubuntu on Xorg","computer.linux.waylandAfter": "to use This computer; Chat, Cloud desktop, Private desktop, and screen preview still work here.",+ "computer.linux.waylandOtherDesktop": "Local control is available on Xorg desktops. It remains disabled on Wayland until its input-safety boundary is validated. If your sign-in screen offers an Xorg session, sign out and choose it. On a desktop without one, such as Fedora, use Cloud desktop or Private desktop instead; Chat and screen preview still work here.","computer.linux.pluginBadge": "Plugin needed","computer.linux.hyprlandPlugin": "To use This computer on Omarchy, install and turn on Cua's Hyprland plugin (cua-hyprland-plugin), reload Hyprland, then try again.","computer.linux.omarchyGuide": "Cua's Omarchy guide",diff --git a/src/types/ogb.d.ts b/src/types/ogb.d.tsindex a18af32779..8b7b4049cc 100644--- a/src/types/ogb.d.ts+++ b/src/types/ogb.d.ts@@ -62,6 +62,8 @@ const __APP_VERSION__: string;driverSource?: "bundled" | "environment" | "user-local" | "path" | "system-package";session?: "x11" | "wayland" | "headless" | "unknown";compositor?: "gnome-mutter" | "hyprland";+ /** Set with the Wayland seat-safety block: false on a desktop that isn't Ubuntu, which may have no Xorg session. */+ ubuntuDesktop?: boolean;};};