Home

Awesome

!!! This script is unmaintained !!!

rofi-pass

A bash script to handle Simple Password Store in a convenient way using rofi.

rofi-pass

Features

Requirements

BSD

Configuration

rofi-pass may read its configuration values from different locations in the following order:

rofi-pass only loads the first existing file. In case no config file exists, rofi-pass uses its internal default values. You can set the environment variable like this:

ROFI_PASS_CONFIG="$HOME/path/to/config" rofi-pass

For an example configuration please take a look at the included config.example file.

Extras

addpass

rofi-pass comes with a tiny helper script, which makes it easier to create new pass entries. Just run it with

addpass --name "My new Site" +user "zeltak" +branch "branch" +custom "foobar" +autotype "branch :tab user :tab pass"

keepass2 import script

Also included is an import script for keepass2 databases. It's the same script that can be downloaded from the pass homepage, with some minor modifications to match rofi-pass structure.

csv exporter

Finally a script to export your pass database to csv is included. The resulting csv was tested in keepassxc.

Sharing passwords

Rofi-pass allows you to easily share common used passwords across multiple entries. For example, if you have an academic account which includes several services (such as a library, Salary, Student portal etc), all with different URL's, login forms etc. you can share one password across all of them. This is very handy when the passwords change annually. To use this function you need to add the following line instead of the password, referencing a pass file which holds the password:

#FILE=PATH/to/filename

where PATH is relative to your password-store.

And yes, you should slap your service provider for forcing you to share passwords across services.

User filename as user

If your password file has no user field you can ask rofi-pass to use the filename instead. For example with this password file path : web/fsf.org/rms rofi-pass will user rms as your username. To get this, you need to set default_user to :filename in your configuration.

FAQ

rofi pass prints garbage instead of my actual passes

Make sure to run setxkbmap <language> <variant> at the start of your Xorg session.

rofi pass hangs after selecting password

To access passwords your GPG agent needs to have unlocked your secret key you're using to encrypt your passwords with. If the secret key hasn't been unlocked yet it will prompt for the secret key password using pinentry. If pinentry is configured to read from a tty then rofi-pass will hang indefinitely. To fix this you need to [configure gpg][gpg_pinentry_config] to use a gui version of pinentry. E.g.

$ cat ~/.gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-qt

You may have to kill the GPG agent if it's still in a bad state:

killall -9 gpg-agent

Alternative

jreinert has written the roughly compatible tool autopass. It has less features, but definately saner code. Also he provided a nice little script called passed to change your fieldnames. link

[gpg_pinentry_config][https://github.com/bfrg/gpg-guide/blob/master/gpg-agent.conf#L15]