Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Document Linux system auth setup

Neeraj Gupta7d93e97fc8fc
diff --git a/docs/docs/.vitepress/sidebar.ts b/docs/docs/.vitepress/sidebar.ts
index 886d83bb30..18dc94ac32 100644
--- a/docs/docs/.vitepress/sidebar.ts
+++ b/docs/docs/.vitepress/sidebar.ts
@@ -325,6 +325,20 @@ export const sidebar = [
},
],
},
+ {
+ text: "Troubleshooting",
+ collapsed: true,
+ items: [
+ {
+ text: "Linux system authentication",
+ link: "/auth/troubleshooting/linux-system-auth",
+ },
+ {
+ text: "Windows login",
+ link: "/auth/troubleshooting/windows-login",
+ },
+ ],
+ },
],
},
{
diff --git a/docs/docs/auth/faq/installing.md b/docs/docs/auth/faq/installing.md
index 78ae331d82..8b91bbb81f 100644
--- a/docs/docs/auth/faq/installing.md
+++ b/docs/docs/auth/faq/installing.md
@@ -62,6 +62,8 @@ You can install Ente Auth on Apple devices from [AppStore](https://apps.apple.co
You can grab the latest version of Ente Auth for Mac, Windows and Linux from [GitHub](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4).
+On Linux, App lock can use system authentication in releases newer than `auth-v4.4.22`. Learn how to [set up Linux system authentication](/auth/troubleshooting/linux-system-auth).
+
<br/>
---
diff --git a/docs/docs/auth/troubleshooting/linux-system-auth.md b/docs/docs/auth/troubleshooting/linux-system-auth.md
new file mode 100644
index 0000000000..d68b77262e
--- /dev/null
+++ b/docs/docs/auth/troubleshooting/linux-system-auth.md
@@ -0,0 +1,100 @@
+---
+title: Linux system authentication
+description: Set up Linux system authentication for Ente Auth desktop
+---
+
+# Linux System Authentication
+
+> [!NOTE]
+>
+> Linux system authentication was added after the public `auth-v4.4.22` release
+> from May 6, 2026. Use a newer Ente Auth desktop release before following this
+> guide.
+
+Ente Auth uses Polkit to ask your Linux desktop to authenticate the current
+user. Polkit then uses your host PAM configuration, so the prompt may accept
+your account password, fingerprint, or another method configured by your
+distribution.
+
+## Register the Polkit Policy
+
+Deb, RPM, and pacman packages install the policy automatically. If Ente Auth
+shows **Linux setup required**, install the policy manually.
+
+The policy action is:
+
+```text
+io.ente.auth.unlock
+```
+
+### Flatpak
+
+Flatpak apps cannot install host Polkit policies by themselves. Install the
+policy from the installed Flatpak bundle:
+
+```sh
+app_id="io.ente.auth"
+install_dir="$(flatpak info --show-location "$app_id")"
+policy="$install_dir/files/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy"
+
+sudo install -D -o root -g root -m 0644 \
+ "$policy" \
+ /usr/share/polkit-1/actions/io.ente.auth.policy
+
+if command -v chcon >/dev/null 2>&1; then
+ sudo chcon system_u:object_r:usr_t:s0 \
+ /usr/share/polkit-1/actions/io.ente.auth.policy || true
+fi
+
+pkaction --action-id io.ente.auth.unlock --verbose
+```
+
+### AppImage or Manual Builds
+
+If Ente Auth shows **Linux setup required**, click **Copy setup command** in the
+dialog and run the copied command in a terminal.
+
+For AppImage builds, you can also extract the AppImage and install the bundled
+policy:
+
+```sh
+./ente-auth.AppImage --appimage-extract
+
+sudo install -D -o root -g root -m 0644 \
+ squashfs-root/data/flutter_assets/assets/polkit/io.ente.auth.policy \
+ /usr/share/polkit-1/actions/io.ente.auth.policy
+
+if command -v chcon >/dev/null 2>&1; then
+ sudo chcon system_u:object_r:usr_t:s0 \
+ /usr/share/polkit-1/actions/io.ente.auth.policy || true
+fi
+
+pkaction --action-id io.ente.auth.unlock --verbose
+```
+
+## Fingerprint Prompts
+
+The Polkit policy only registers Ente Auth as an application that can request
+system authentication. Password versus fingerprint is controlled by your Linux
+PAM and fprintd setup.
+
+On Ubuntu, if password authentication works but fingerprint is not offered:
+
+```sh
+fprintd-list "$USER"
+sudo apt install fprintd libpam-fprintd
+sudo pam-auth-update
+grep -n "pam_fprintd" /etc/pam.d/common-auth
+cat /etc/pam.d/polkit-1
+```
+
+Enable **Fingerprint authentication** in `pam-auth-update`. Polkit should route
+through `common-auth`; otherwise `/etc/pam.d/polkit-1` may remain password-only.
+
+## Expected Linux Behavior
+
+- `canCheckBiometrics=false` is expected for this backend.
+- Ente Auth does not enumerate fingerprints directly.
+- System authentication is ready when Polkit is available and
+ `io.ente.auth.unlock` is registered.
+- Fingerprint availability depends on your host PAM/fprintd configuration.
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
index a574dcdc89..71e882abd6 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
@@ -20,7 +20,12 @@ import "package:ente_ui/components/title_bar_title_widget.dart";
import "package:ente_ui/components/title_bar_widget.dart";
import "package:ente_ui/components/toggle_switch_widget.dart";
import "package:ente_ui/theme/ente_theme.dart";
+import "package:ente_utils/platform_util.dart";
import "package:flutter/material.dart";
+import "package:flutter/services.dart";
+
+const _linuxSystemAuthGuideUrl =
+ "https://ente.com/help/auth/troubleshooting/linux-system-auth";
class LockScreenOptions extends StatefulWidget {
const LockScreenOptions({super.key});
@@ -75,14 +80,32 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
context: context,
title: pendingTranslation("Linux setup required"),
body: pendingTranslation(
- "Install the Ente Auth Polkit policy, then try device lock again.\n\n${linuxStatus!.policyInstallCommand}",
+ "Ente Auth needs a one-time Linux Polkit policy setup before system authentication can be used. Open the guide for setup steps, including Flatpak, AppImage, and fingerprint notes.",
),
isDismissible: true,
buttons: [
+ ButtonWidget(
+ buttonType: ButtonType.primary,
+ labelText: pendingTranslation("Open guide"),
+ isInAlert: true,
+ onTap: () async {
+ await PlatformUtil.openWebView(
+ context,
+ pendingTranslation("Linux setup required"),
+ _linuxSystemAuthGuideUrl,
+ );
+ },
+ ),
ButtonWidget(
buttonType: ButtonType.secondary,
- labelText: context.strings.ok,
+ labelText: pendingTranslation("Copy setup command"),
isInAlert: true,
+ shouldShowSuccessConfirmation: true,
+ onTap: () async {
+ await Clipboard.setData(
+ ClipboardData(text: linuxStatus!.policyInstallCommand),
+ );
+ },
),
],
);