LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Settings > Privacy: when each restriction applies to Linux apps, and what it covers
Federico Pereirafad3a9339d82
diff --git a/apps/monitor/Firewall.jsx b/apps/monitor/Firewall.jsxindex 6932237..4d9b5f5 100644--- a/apps/monitor/Firewall.jsx+++ b/apps/monitor/Firewall.jsx@@ -6,6 +6,8 @@// no incoming connections, and the non-network ones: camera, microphone…). Every one is// enforced (docs/FIREWALL.md, "Non-network restrictions"). The "LordOS" row is the desktop// itself: it does not offer files, USB, clipboard or Bluetooth, which the shell always uses.+// For Linux apps each checkbox says when it applies (all at once, files at the next launch)+// and the clipboard isn't offered yet; a help line per restriction says what it covers.// The rules are saved by lord-server (lord.fw); this screen writes no files. Drawn like the// Settings sections: 13/600 headers, inset GroupBoxes with hairlines, footers.import { View, Text, Button, Segmented, ScrollView, GroupBox, useTheme, useLocale, useStore, useLauncherApps, firewall, firewallState, spacing, typeScale, errorText } from '@lordos/sdk';@@ -16,7 +18,14 @@ import { useState } from 'react';const fwId = (a) => (a.kind === 'linux' ? a.id : a.kind === 'package' || a.isolated ? `lpk:${a.id}` : 'lordos');// The desktop shell and the built-in apps share "lordos": these would cut the desktop off itself.const DESKTOP_ALWAYS = ['no-files', 'no-usb', 'no-clipboard', 'no-bluetooth'];-const offered = (id) => (id === 'lordos' ? firewall.RESTRICTIONS.filter((f) => !DESKTOP_ALWAYS.includes(f)) : firewall.RESTRICTIONS);+// Linux apps: the clipboard of a Wayland app isn't mediated per app yet, so it isn't offered.+const LINUX_NOT_YET = ['no-clipboard'];+// For a Linux app every restriction applies at once (new connections, device opens, sockets,+// sound streams, notifications), except files: the app's view is built when it starts.+const NEXT_LAUNCH = ['no-files'];+const isLinux = (id) => id.startsWith('desktop:');+const offered = (id) => (id === 'lordos' ? firewall.RESTRICTIONS.filter((f) => !DESKTOP_ALWAYS.includes(f))+ : isLinux(id) ? firewall.RESTRICTIONS.filter((f) => !LINUX_NOT_YET.includes(f)) : firewall.RESTRICTIONS);function useAppIndex() {const list = useLauncherApps();@@ -147,9 +156,11 @@ export function FirewallPrivacy() {</View><View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 6, paddingHorizontal: 32 }}>{offered(id).map((f) => (- <Check key={f} on={restricted[id].includes(f)} label={tr(`firewall.r.${f}`)} onChange={(on) => setFlag(id, f, on)} />+ <Check key={f} on={restricted[id].includes(f)} onChange={(on) => setFlag(id, f, on)}+ label={isLinux(id) && NEXT_LAUNCH.includes(f) ? tr('firewall.whenNextLaunch', { name: tr(`firewall.r.${f}`) }) : tr(`firewall.r.${f}`)} />))}</View>+ {isLinux(id) && <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.35, paddingHorizontal: 32, textAlign: 'start' }}>{tr('firewall.linuxWhen')}</Text>}{id === 'lordos' && <Text style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.35, paddingHorizontal: 32, textAlign: 'start' }}>{tr('firewall.desktopAlways')}</Text>}</View>))}@@ -157,6 +168,15 @@ export function FirewallPrivacy() {<AddApp apps={apps} exclude={inLists} tr={tr} onPick={(id) => firewall.setRestricted(id, ['no-internet'])} /></GroupBox>{foot(tr('firewall.restrictedHint'))}+ {Object.keys(restricted).length > 0 && (+ <View style={{ gap: 3, marginHorizontal: spacing.xs }}>+ {firewall.RESTRICTIONS.map((f) => (+ <Text key={f} style={{ fontSize: typeScale.caption, color: t.textDim, lineHeight: 1.4, textAlign: 'start' }}>+ {tr('firewall.helpLine', { name: tr(`firewall.r.${f}`), help: tr(`firewall.help.${f}`) })}+ </Text>+ ))}+ </View>+ )}</View>{foot(tr('firewall.footer'))}</View>diff --git a/assets/locales/en/firewall.json b/assets/locales/en/firewall.jsonindex 540bffa..29983d8 100644--- a/assets/locales/en/firewall.json+++ b/assets/locales/en/firewall.json@@ -39,5 +39,20 @@"counts": "Connections","countsValue": "{allowed} allowed · {denied} denied","r.no-clipboard": "No reading the clipboard",- "desktopAlways": "The desktop itself always has access to files, removable drives, the clipboard and Bluetooth; restrict individual apps instead."+ "desktopAlways": "The desktop itself always has access to files, removable drives, the clipboard and Bluetooth; restrict individual apps instead.",+ "whenNextLaunch": "{name} (at next launch)",+ "linuxWhen": "Applies immediately to the running app, except access to your files, which applies the next time it starts.",+ "helpLine": "{name}: {help}",+ "help.no-internet": "only the local network; checked on every new connection.",+ "help.no-lan": "nothing on the local network, including this computer.",+ "help.no-network": "the app can't even open a network socket.",+ "help.no-incoming": "the app can't listen for connections.",+ "help.no-camera": "cameras can't be opened, directly or through the sound and video server.",+ "help.no-mic": "the app sees no microphone and its recordings are stopped.",+ "help.no-screen": "the app can't copy the screen; Linux apps never can.",+ "help.no-usb": "no raw USB devices, security keys or USB serial ports.",+ "help.no-bluetooth": "no Bluetooth sockets of its own.",+ "help.no-files": "only its own settings folders and the file you open it with.",+ "help.no-notifications": "its notifications aren't shown.",+ "help.no-clipboard": "it can't read what you copied (LordOS apps)."}diff --git a/assets/locales/es/firewall.json b/assets/locales/es/firewall.jsonindex 813702c..4596170 100644--- a/assets/locales/es/firewall.json+++ b/assets/locales/es/firewall.json@@ -39,5 +39,20 @@"counts": "Conexiones","countsValue": "{allowed} permitidas · {denied} denegadas","r.no-clipboard": "Sin leer el portapapeles",- "desktopAlways": "El escritorio en sí siempre tiene acceso a los archivos, las unidades extraíbles, el portapapeles y Bluetooth; restringe apps individuales."+ "desktopAlways": "El escritorio en sí siempre tiene acceso a los archivos, las unidades extraíbles, el portapapeles y Bluetooth; restringe apps individuales.",+ "whenNextLaunch": "{name} (al próximo inicio)",+ "linuxWhen": "Se aplica enseguida a la app abierta, salvo el acceso a tus archivos, que se aplica la próxima vez que se inicie.",+ "helpLine": "{name}: {help}",+ "help.no-internet": "solo la red local; se comprueba en cada conexión nueva.",+ "help.no-lan": "nada de la red local, ni esta computadora.",+ "help.no-network": "la app ni siquiera puede abrir un socket de red.",+ "help.no-incoming": "la app no puede esperar conexiones.",+ "help.no-camera": "no puede abrir cámaras, ni directamente ni a través del servidor de sonido y video.",+ "help.no-mic": "la app no ve ningún micrófono y sus grabaciones se detienen.",+ "help.no-screen": "la app no puede copiar la pantalla; las apps Linux nunca pueden.",+ "help.no-usb": "sin dispositivos USB directos, llaves de seguridad ni puertos serie USB.",+ "help.no-bluetooth": "sin sockets Bluetooth propios.",+ "help.no-files": "solo sus propias carpetas de ajustes y el archivo con el que la abrís.",+ "help.no-notifications": "sus notificaciones no se muestran.",+ "help.no-clipboard": "no puede leer lo que copiaste (apps de LordOS)."}diff --git a/assets/locales/pt/firewall.json b/assets/locales/pt/firewall.jsonindex 200c3fb..54bfc85 100644--- a/assets/locales/pt/firewall.json+++ b/assets/locales/pt/firewall.json@@ -39,5 +39,20 @@"counts": "Conexões","countsValue": "{allowed} permitidas · {denied} negadas","r.no-clipboard": "Sem ler a área de transferência",- "desktopAlways": "A própria área de trabalho sempre tem acesso aos arquivos, unidades removíveis, área de transferência e Bluetooth; restrinja apps individuais."+ "desktopAlways": "A própria área de trabalho sempre tem acesso aos arquivos, unidades removíveis, área de transferência e Bluetooth; restrinja apps individuais.",+ "whenNextLaunch": "{name} (na próxima abertura)",+ "linuxWhen": "Aplica-se na hora ao app aberto, exceto o acesso aos seus arquivos, que vale a partir da próxima vez que ele abrir.",+ "helpLine": "{name}: {help}",+ "help.no-internet": "só a rede local; verificado a cada nova conexão.",+ "help.no-lan": "nada da rede local, nem este computador.",+ "help.no-network": "o app nem consegue abrir um socket de rede.",+ "help.no-incoming": "o app não pode esperar conexões.",+ "help.no-camera": "não pode abrir câmeras, nem diretamente nem pelo servidor de som e vídeo.",+ "help.no-mic": "o app não vê nenhum microfone e suas gravações param.",+ "help.no-screen": "o app não pode copiar a tela; apps Linux nunca podem.",+ "help.no-usb": "sem dispositivos USB diretos, chaves de segurança nem portas seriais USB.",+ "help.no-bluetooth": "sem sockets Bluetooth próprios.",+ "help.no-files": "só as próprias pastas de configuração e o arquivo com que você o abre.",+ "help.no-notifications": "as notificações dele não aparecem.",+ "help.no-clipboard": "não pode ler o que você copiou (apps do LordOS)."}