Skip to content

Conversation

sannidhyaroy
Copy link
Contributor

@sannidhyaroy sannidhyaroy commented Feb 19, 2025

The Problem

While the 1Password Integration Fix guide does help for some, like when installed through the aur, it fails for the native tarball installation or the AppImage. This is a problem for users running other distros than Arch.

Solution

While I haven't discovered a solution for the AppImage, the native tarball install script installs Zen in the current user's $HOME directory. The 1Password Integration Fix guide would only work if Zen is installed at the root-level, and add zen (instead of zen-bin) to the /etc/1password/custom_allowed_browsers file.

Changes

  • Added a seperate script that installs Zen to /usr/local/src/zen.
  • Added a script that automatically adds zen to /etc/1password/custom_allowed_browsers safely, with proper rollback if anything fails.
  • Backup 1Password config directory before the above script modifies it for safety.

Credits

Thanks to Kerren Ortlepp for his article on Running 1Password on Zen Browser.

@sannidhyaroy
Copy link
Contributor Author

I've been using the install script for two months, and have re-tested it in a Fedora 41 Virtual Machine. I'll be testing the 1Password install script, so the PR should be ready soon.

It'd be great if someone could test this out and check for possible issues.

@sannidhyaroy sannidhyaroy force-pushed the feat/root-installation branch from 95fec4b to bc21502 Compare February 19, 2025 10:48
@sannidhyaroy
Copy link
Contributor Author

sannidhyaroy commented Feb 19, 2025

I tested the entire process on a fresh Fedora 41 Virtual Machine, and it's working as expected. Here are the steps:

Note

If your system does not have sudo installed, simply remove sudo from the commands and use the appropriate method to run them as the root user (e.g., by using su or doas).

  1. Install Zen as root binary

    curl -fsSL https://raw.githubusercontent.com/sannidhyaroy/updates-server/refs/heads/feat/root-installation/install-as-root.sh | sudo bash
    Wanna go Twilight? 😈

    Then dare to use this, instead of the above command 😈

    curl -fsSL https://raw.githubusercontent.com/sannidhyaroy/updates-server/refs/heads/feat/root-installation/install-as-root.sh | sudo bash -s -- --twilight

  2. Run the 1Password Integration Script

    bash <(curl -s https://raw.githubusercontent.com/sannidhyaroy/updates-server/refs/heads/feat/root-installation/1password-integration.sh)

After this PR is merged, the urls wouldn't look this ugly. The above commands should work as:

  1. Install Zen as root binary:

    curl -fsSL https://updates.zen-browser.app/install-as-root.sh | sudo bash
    Wanna go Twilight? 😈

    Then dare to use this, instead of the above command 😈

    curl -fsSL https://updates.zen-browser.app/install-as-root.sh | sudo bash -s -- --twilight

  2. Run the 1Password Integration Script

    bash <(curl -s https://updates.zen-browser.app/1password-integration.sh)
Still not working?

Check if Desktop Integration is enabled in 1Password Desktop App Settings. Go to 1Password App > Settings > Browser and enable the Connect with 1Password in the browser toggle.

@sannidhyaroy sannidhyaroy marked this pull request as ready for review February 19, 2025 11:44
The script will fail on non-linux systems to avoid accidental execution on unsupported platforms
@sannidhyaroy
Copy link
Contributor Author

I guess the reason why 1Password doesn't work by default with the tarball installer is due to the following security reasons.

The 1Password Support Page mentions the following:

  • On macOS and Windows, the 1Password app verifies the browser’s code signature for authentication.
  • On Linux, the 1Password app checks to confirm that the browser appears to be installed by a package manager.

I remember installing Zen using sneexy's copr repo a long time back, since Zen doesn't provide pre-compiled rpm packages, and 1Password integration was as simple as adding zen-bin to the custom allowed browsers file.

This doesn't seem to be the case here, when installed using the tarball installer, simply because you aren't using a package manager. Security-wise, the best solution obviously is to maintain packages for different package managers, as they verify the integrity of the package being installed and perform pre/post transaction scripts, but for now, I guess this PR is just a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant