Package Details: protonmail-bridge-nogui 3.10.0-1

Git Clone URL: https://aur.archlinux.org/protonmail-bridge-nogui.git (read-only, click to copy)
Package Base: protonmail-bridge-nogui
Description: Integrate ProtonMail paid account with any program that supports IMAP and SMTP
Upstream URL: https://github.com/ProtonMail/proton-bridge
Licenses: GPL3
Conflicts: protonmail-bridge, protonmail-bridge-bin
Submitter: kausban
Maintainer: kausban
Last Packager: kausban
Votes: 27
Popularity: 0.22
First Submitted: 2020-04-17 09:58 (UTC)
Last Updated: 2024-03-24 03:55 (UTC)

Dependencies (7)

Required by (0)

Sources (2)

Pinned Comments

luoe commented on 2023-02-25 15:59 (UTC)

When using kwallet as provider for org.freedesktop.secrets and pass for key backend for the bridge, I've needed to add a delay before starting the systemd unit after login.

systemctl --user edit --full bridge.service

...
[Service]
...
ExecStartPre=/bin/sleep 30
...

Else the starting of the bridge might fail because kwallet isn't unlocked instantly after login and the GPG key for the pass repo thus is locked (Editing the systemd unit file will skip the need for manual input of the passphrase for the GPG key)

mclancy commented on 2020-06-15 16:35 (UTC)

hakayova and grimfrenzy: I managed to solve the issue of "no account found" by providing the correct PASSWORD_STORE_DIR to the systemd service.

In my case I provided: Environment="PASSWORD_STORE_DIR=/home/mclancy/.local/share/pass"

Hope this helps!

kausban commented on 2020-04-21 14:37 (UTC) (edited on 2020-04-21 14:37 (UTC) by kausban)

Minimal fork of https://aur.archlinux.org/packages/protonmail-bridge/

Compiled with 'nogui' option

Included is a user systemd service. Try: systemctl status --user bridge.service

  1. You can login and register accounts using the interactive cli: protonmail-bridge --cli
  2. Once you have everything configured and automated. You can enable and use bridge.service to run bridge in background.

The following is an alternative way to run the bridge in interactive cli mode encapsulated within a named screen session. Can be added to bridge.service

ExecStart=/usr/bin/screen -Dm -S bridgedaemon sh -c "sleep 5; protonmail-bridge -c"
ExecStop=/usr/bin/screen -X -S bridgedaemon quit

Latest Comments

« First ‹ Previous 1 2 3 4

hakayova commented on 2020-04-26 22:17 (UTC) (edited on 2020-04-26 22:19 (UTC) by hakayova)

Thanks for the updates @kausban! With the new systemd bridge service that doesn't use screen, I still have a problem after rebooting. At the first attempt to sync with protonmail, mbsync complains that the account myemail@protonmail.com cannot be found (for obvious reasons, I didn't post my actual email address here). I believe this is not a pass-related problem anymore, which I fixed, because if I read the error message right, protonmail-bridge is complaining that the email account cannot be found. What I need to do to make it work is as follows: Check status of bridge.service -- $systemctl --user status bridge.service, which reveals that the service is active Stop bridge.service -- $systemctl --user stop bridge.service Check account -- $protonmail-bridge -c, then >>info, which shows that the account is actually there with the right password and everything. Start bridge.service -- $systemctl --user start bridge.service After this seemingly unnecessary ritual, mbsync can login and sync with my protonmail account.

I wonder if the service is launched before it can read the protonmail credentials from pass somehow. Thank you again for troubleshooting this with me.

kausban commented on 2020-04-21 14:37 (UTC) (edited on 2020-04-21 14:37 (UTC) by kausban)

Minimal fork of https://aur.archlinux.org/packages/protonmail-bridge/

Compiled with 'nogui' option

Included is a user systemd service. Try: systemctl status --user bridge.service

  1. You can login and register accounts using the interactive cli: protonmail-bridge --cli
  2. Once you have everything configured and automated. You can enable and use bridge.service to run bridge in background.

The following is an alternative way to run the bridge in interactive cli mode encapsulated within a named screen session. Can be added to bridge.service

ExecStart=/usr/bin/screen -Dm -S bridgedaemon sh -c "sleep 5; protonmail-bridge -c"
ExecStop=/usr/bin/screen -X -S bridgedaemon quit

kausban commented on 2020-04-20 16:48 (UTC)

hakayova: this is not necessarily related to how I have packaged the bridge application. Is your password manager configured correctly? I propose you check your configuration perhaps even by using the protonmail-bridge application with GUI.

When I boot-up/start the bridge service/application pass is used to restore the login credentials and I am prompted for my pgp passphrase to decrypt the password store.

For gnome keyring, it should be something similar - a prompt for keyring unlock when you login.

hakayova commented on 2020-04-20 16:04 (UTC)

Thank you again @kausban. This is the problem I am getting into by using this package so far:

After I reboot the system, the account I set up gets disconnected. When I connect to the screen that runs the service (screen -R -S bridgedaemon) and give the command "login con 'account name'" to reconnect to my account, it works but it always generates a new password for the local server. This is quite annoying. How can I retain my settings. including the password for the local server?

kausban commented on 2020-04-17 23:13 (UTC)

@hakayova: I left some hints in the PKGBUILD for this. bridge cli is running interactively within a screen session. You can access it: screen -R -S bridgedaemon

Then just use the info command or help to see other options.

hakayova commented on 2020-04-17 22:26 (UTC)

A big thank you @kausban for providing this package and your guidance in the previous thread to help explain how it works! I set it up and it works like a charm. I do have one probably silly question. In the past, when protonmail bridge was upgraded, not every time but occasionally it would change the server passwords for IMAP and SMTP randomly. If this happens again, what would be the way/cli option to visualize those passwords to manually update the pass settings?

grunch commented on 2020-04-17 17:04 (UTC) (edited on 2020-04-17 17:05 (UTC) by grunch)

Arrgh! Thank you @kausban for clarifying! I apologize for not studying the package more before posting my (redundant and possibly misleading) message.

Thanks for your awesome work on this!

kausban commented on 2020-04-17 14:33 (UTC) (edited on 2020-04-17 14:43 (UTC) by kausban)

@grunch:

  1. You do not need to log in using the GUI instance. The interactive cli instance can be used to do the same (protonmail-bridge --cli).

  2. Credentials will be stored in pass or gnome keyring (I haven't tested it myself). Pass doesn't need any GUI to work.

  3. Please see bridge.service. A user service file that is included in this package precisely for use such as you describe.

  4. With this package. I do not copy in the QT library files with this package since it is not meant to be used with the GUI at all.

grunch commented on 2020-04-17 14:28 (UTC)

I have successfully built the proton-bridge package from the Github sources. I also started the app as a systemd "user" service. My unit file is at https://pastebin.com/Y3aUQ9mt

Two caveats: the source comes with its own copy of the QT libraries, and running it this way assumes you have previously logged in using a GUI instance of the bridge, so your credentials are stored in GNOME Keys (aka seahorse) or pass.

I wonder if such a unit file could be added to the package for people who want to run the bridge as a user service.