passff-host
passff-host copied to clipboard
[Windows] Add install script for Cygwin
I use passff with pass on Cygwin piped to Firefox on Windows. I need to set up the host side again to reflect the latest changes. Would you guys be willing to accept a pull request for an install script for pass/Cygwin <=> Firefox/Windows?
We can't say anything about that before seeing the pull request actually. In principal, a working Windows setup would be good. But I don't have Windows, so won't be able to test your proposal. Therefore I depend on a third opinion before accepting any pull requests in that direction. Same thing as with Mac, where we have been waiting for someone to review the install script updates for almost three months now: https://github.com/passff/passff/pull/268
I just created pr #23 . Microsoft provides free Windows VM images for browser testing. These can be used for testing passff on cygwin. If you need instructions on how to do this, let me know.
Thanks for the PR :+1:
I'd like to test it with my two windows setups: Windows 7 Home and 10 Pro.
I followed these steps (read: my steps) to install cygwin & pass on my Windows 7 desktop :
- Install cygwin with chocolatey:
choco install cygwin cyg-get
- In cygwin, install the dependencies for passff-host/pass
cyg-get.bat python3 curl tree make
(You may need to install git and gpg! I personally havegit
&gpg4win
installed with chocolatey) - In cygwin, download pass:
curl -L -O https://git.zx2c4.com/password-store/snapshot/password-store-1.7.3.tar.xz
- Extract it:
tar --xz -xvf password-store*.tar.xz
- And install it (no sudo! run cygwin with admin rights! ):
make -C password-store-1.7.3 install
- Download rhlee's script:
curl -L -O https://raw.githubusercontent.com/rhlee/passff-host/cygwin/src/install_host_app_cygwin.sh
Passff-host install
-
Replace the placeholder with the right version
sed -i 's/_VERSIONHOLDER_/1.0.1/' install_host_app_cygwin.sh
-
Run it in cygwin:
bash -x install_host_app_cygwin.sh firefox
-
I install passff on Firefox... And I get
Error: "password store in empty"
...as expected ;) -
Let's find the cygwin path of my password store:
cygpath.exe -u 'E:\Sync\mypass.git'
-
Let's innovate and put
SET PASSWORD_STORE_DIR=/cygdrive/e/sync/mypass.git
inpassff_cygwin.bat
line 2 instead ofpassff.py
(see Preferences https://github.com/passff/passff-host#preferences )
It works!
:100: :100: :100: :tada: :tada: :tada:
As a side note, I also have a MINGW64 shell thanks to git, and I think I could manage to use MINGW instead of cygwin :thinking:
EDIT 2020/04/03 : Install make with cygwin, Bump pass version to 1.7.3, Fix the make command.
Thanks @5bentz ! Your instructions took me almost there 🎉 🎉 🎉
I have passff
now working in Win10 but it's looking at the wrong password store (an empty one). I've run pass init
when passff
told me so, and that created the default ~/.password-store
which is what I assume passff
is using.
However my password store is in a different location. I've got it to work under cygwin
adding the env to my .bashrc
(running pass
in cygwin now displays the correct list of passwords), but I can't find the way to tell passff
to use the correct path.
I have added SET PASSWORD_STORE_DIR="/cygdrive/z/actual-path/of-my-password-store/"
to passff-cygwin.bat
instead of your step 10, but it doesn't seem to be working: the extension in Firefox shows an empty password list.
I'm sure it's something silly that I'm missing, but I can't work it out!
Ohhhh sorry I see now. You appended the line in the file AFTER the call to passff.py.
Move your line before the call, put it on line2 before SET PATH=....
.
Your file should look like that: the environment variables must be set before passff.py is executed!
@ECHO OFF
SET VAR1=blabla
SET VAR2=foobar
C:\path\to\python3.6m.exe "path/to/passff.py" %%*
Another way is to set this env variable in passff.py
: add this line in COMMAND_ENV dict:
"PASSWORD_STORE_DIR": "/cygdrive/path/to/store",
@5bentz that made it!! Just moved the line up and it's perfectly working now in Windows 10 + cygwin. Thanks! 👏