Package Details: protonmail-bridge-nogui 1.3.2-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: 7
Popularity: 1.28
First Submitted: 2020-04-17 09:58
Last Updated: 2020-08-05 23:23

Dependencies (5)

Required by (0)

Sources (2)

Pinned Comments

mclancy commented on 2020-06-15 16:35

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

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

grimfrenzy commented on 2020-05-15 18:16

I'm having a similar issue to @hakayova. When using the bridge.service mbsync reports that my email address cannot be found. If I run 'protonmail-bridge -c' or 'protonmail-bridge --noninteractive' directly from the shell then mail is retrieved and sent as usual.

This seems to be consistent as far as I can tell. If I stop the bridge.service and launch the protonmail-bridge from the shell -- it works. If I kill protonmail-bridge and start the bridge.service again -- it doesn't.

My understanding of systemd falls short of suggesting what the difference would be between a service file launched application and one launched manually here. Any ideas on troubleshooting this?

hakayova commented on 2020-04-26 22:17

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

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

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

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

@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

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

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

@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

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.