* Change icon to one that GNOME installs by default

* Remove option to install to different dirs as that is broken due to
hardcoded paths in D-bus service files.
* Don't install fuzzywuzzy through pip from install.sh as it may be preferable to
install it from distribution packages
* Improve README a bit
This commit is contained in:
Jonathan Lestrelin 2019-05-12 00:07:39 +02:00
parent 45cea53ef4
commit 56f3e25756
3 changed files with 24 additions and 20 deletions

View File

@ -1,4 +1,4 @@
A search provider for GNOME Shell that adds support for searching in [pass](https://www.passwordstore.org/). A search provider for GNOME Shell that adds support for searching in zx2c4/[pass](https://www.passwordstore.org/).
Names of passwords will show up in GNOME Shell searches, choosing one will copy the corresponding content to the clipboard. Names of passwords will show up in GNOME Shell searches, choosing one will copy the corresponding content to the clipboard.
@ -12,6 +12,12 @@ Install `gnome-pass-search-provider-git` from the AUR.
Ensure that python>=3.5 and python-gobject are installed on your system and that pass is setup. Ensure that python>=3.5 and python-gobject are installed on your system and that pass is setup.
Install Python 3 fuzzywuzzy module.
Depending on your distribution this can be packaged as python-fuzzywuzzy, python3-fuzzywuzzy or you might need to install it with pip:
```shell
python3 -m pip install fuzzywuzzy
```
Download or clone this repository: Download or clone this repository:
```shell ```shell
git clone git@github.com:jle64/gnome-shell-pass-search-provider.git git clone git@github.com:jle64/gnome-shell-pass-search-provider.git
@ -22,11 +28,6 @@ Run the installation script as root:
sudo ./install.sh sudo ./install.sh
``` ```
If you need to you can change the installation paths to suit your system:
```shell
sudo SYSCONFDIR=/etc DATADIR=/usr/share LIBDIR=/usr/lib LIBEXECDIR=/usr/lib ./install.sh
```
# Post-installation # Post-installation
Recommended : set gpg agent to use pinentry-gnome3 by adding `pinentry-program /usr/bin/pinentry-gnome3` to `~/.gnupg/gpg-agent.conf`. Recommended : set gpg agent to use pinentry-gnome3 by adding `pinentry-program /usr/bin/pinentry-gnome3` to `~/.gnupg/gpg-agent.conf`.
@ -43,7 +44,12 @@ The [pass-otp](https://github.com/tadfisher/pass-otp) extension is supported. Se
# Environment variables # Environment variables
If you are configuring pass through environment variables, such as `PASSWORD_STORE_DIR`, make sure to set them in a way that will propagate to the search provider executable, not just in your shell. If you are configuring pass through environment variables, such as `PASSWORD_STORE_DIR`, make sure to set them in a way that will propagate to the search provider executable, not just in your shell.
Setting them in `~/.profile` should be sufficient. Setting them in `~/.profile` or `~/.pam_environment` should be sufficient, but stuff in shell-specific files such as `~/.bashrc` and co will not be picked up by gnome-shell.
If your values have no effect, make sure they propagate to the script environment:
```shell
ps auxeww | grep [g]nome-pass-search-provider.py
```
# Clipboard managers # Clipboard managers
@ -52,9 +58,9 @@ Otherwise they are sent to the clipboard using `pass -c` which defaults to expir
# Compatibility # Compatibility
This implements the `org.gnome.Shell.SearchProvider2` D-Bus API which seems to be present in GNOME Shell since around 2012 and has been tested with GNOME Shell 3.22-3.30. This implements the `org.gnome.Shell.SearchProvider2` D-Bus API and has been tested with GNOME Shell 3.22-3.32.
# Troubleshooting # Troubleshooting
If this does not work for you, make sure to look to wherever GNOME and D-Bus are logging for error messages (in the journal on systemd-using systems). If this does not work for you, make sure to look to wherever GNOME and D-Bus are logging for error messages (using `journalctl --user` on systemd-using systems).
Don't hesitate to open an issue. Don't hesitate to open an issue.

View File

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Version=1.0 Version=1.0
Categories=GNOME;Security; Categories=GNOME;Security;
Icon=password-manager Icon=dialog-password
Name=Pass Name=Pass
Comment=GNOME Shell search provider for pass Comment=GNOME Shell search provider for pass
Terminal=false Terminal=false

View File

@ -2,22 +2,20 @@
set -eu -o pipefail set -eu -o pipefail
cd "$(dirname "$(realpath "${0}")")" cd "$(dirname "$(realpath "${0}")")"
DATADIR=${DATADIR:-/usr/share} DATADIR=/usr/share
LIBDIR=${LIBDIR:-/usr/lib} LIBDIR=/usr/lib
LIBEXECDIR=${LIBEXECDIR:-/usr/lib/}
SYSCONFDIR=${SYSCONFDIR:-/etc}
PIPARGS=${PIPARGS:-} # use --user for local install
pip install ${PIPARGS} fuzzywuzzy # The actual executable
install -Dm 0755 gnome-pass-search-provider.py "${LIBDIR}"/gnome-pass-search-provider/gnome-pass-search-provider.py
install -Dm 0755 gnome-pass-search-provider.py "${LIBEXECDIR}"/gnome-pass-search-provider/gnome-pass-search-provider.py
# Search provider definition # Search provider definition
install -Dm 0644 conf/org.gnome.Pass.SearchProvider.ini "${DATADIR}"/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini install -Dm 0644 conf/org.gnome.Pass.SearchProvider.ini "${DATADIR}"/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
# Desktop file # Desktop file (for having an icon)
install -Dm 0644 conf/org.gnome.Pass.SearchProvider.desktop "${DATADIR}"/applications/org.gnome.Pass.SearchProvider.desktop install -Dm 0644 conf/org.gnome.Pass.SearchProvider.desktop "${DATADIR}"/applications/org.gnome.Pass.SearchProvider.desktop
# DBus configuration # DBus configuration (no-systemd)
install -Dm 0644 conf/org.gnome.Pass.SearchProvider.service.dbus "${DATADIR}"/dbus-1/services/org.gnome.Pass.SearchProvider.service install -Dm 0644 conf/org.gnome.Pass.SearchProvider.service.dbus "${DATADIR}"/dbus-1/services/org.gnome.Pass.SearchProvider.service
# DBus configuration (systemd)
install -Dm 0644 conf/org.gnome.Pass.SearchProvider.service.systemd "${LIBDIR}"/systemd/user/org.gnome.Pass.SearchProvider.service install -Dm 0644 conf/org.gnome.Pass.SearchProvider.service.systemd "${LIBDIR}"/systemd/user/org.gnome.Pass.SearchProvider.service