* rename various elements to be more consistent with other search

providers
* remove useless dbus config file
* add TODO
* minor changes
This commit is contained in:
Jonathan Lestrelin 2017-03-14 21:47:52 +01:00
parent 9a256569d4
commit e73977f1b2
12 changed files with 40 additions and 43 deletions

View File

@ -1,6 +1,6 @@
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 [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.
![Sreencapture](misc/screencapture.gif) ![Sreencapture](misc/screencapture.gif)
@ -31,8 +31,8 @@ If you need to you can change the installation paths to suit your system:
sudo SYSCONFDIR=/etc DATADIR=/usr/share LIBDIR=/usr/lib LIBEXECDIR=/usr/lib ./install.sh sudo SYSCONFDIR=/etc DATADIR=/usr/share LIBDIR=/usr/lib LIBEXECDIR=/usr/lib ./install.sh
``` ```
The search provider should show up and be enabled in Gnome search preferences and be autoloaded by Gnome-Shell. Close and reopen your GNOME session or (if not on Wayland) just restart the Shell (alt + f2, r).
If that's not the case try closing and reopening your Gnome session. The search provider should show up and be enabled in Gnome search preferences and be autoloaded by GNOME Shell.
# Environment variables # Environment variables
@ -40,7 +40,7 @@ If you are configuring pass through environment variables, such as `PASSWORD_STO
If you are on a systemd-based system, you can set them in the unit file : If you are on a systemd-based system, you can set them in the unit file :
```shell ```shell
systemctl --user edit org.gnome.pass.search.service systemctl --user edit org.gnome.Pass.SearchProvider.service
``` ```
Add your variables like this : Add your variables like this :
@ -51,7 +51,7 @@ Environment=PASSWORD_STORE_DIR=/my/passwords/path
Then restart the service : Then restart the service :
```shell ```shell
systemctl --user restart org.gnome.pass.search.service systemctl --user restart org.gnome.Pass.SearchProvider.service
``` ```
# Compatibility # Compatibility
@ -63,3 +63,4 @@ This works fine on Gnome 3.22 and I expect it will continue to work for some tim
# 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 (in the journal on systemd-using systems).

7
TODO.md Normal file
View File

@ -0,0 +1,7 @@
* Add a configuration dialog so that passing environment variables to pass is easier.
* Fix the problem of pinentry unable to show up if not called from pass before.
* Make packages.
* Find a good way of implementing LaunchSearch.
* Make the daemon exit after some time.
* Call into GPaste if present to mark item as password.

View File

@ -3,7 +3,7 @@ Version=1.0
Categories=GNOME;Security; Categories=GNOME;Security;
Icon=password-manager Icon=password-manager
Name=Pass Name=Pass
Comment=Gnome-shell search provider for pass Comment=GNOME Shell search provider for pass
Terminal=false Terminal=false
Type=Application Type=Application
OnlyShowIn=GNOME; OnlyShowIn=GNOME;

View File

@ -0,0 +1,5 @@
[Shell Search Provider]
DesktopId=org.gnome.Pass.SearchProvider.desktop
BusName=org.gnome.Pass.SearchProvider
ObjectPath=/org/gnome/Pass/SearchProvider
Version=2

View File

@ -0,0 +1,4 @@
[D-BUS Service]
Name=org.gnome.Pass.SearchProvider
Exec=/usr/lib/gnome-pass-search-provider/gnome-pass-search-provider.py
SystemdService=org.gnome.Pass.SearchProvider.service

View File

@ -0,0 +1,7 @@
[Unit]
Description=Pass search provider for GNOME Shell daemon
[Service]
Type=dbus
BusName=org.gnome.Pass.SearchProvider
ExecStart=/usr/lib/gnome-pass-search-provider/gnome-pass-search-provider.py

View File

@ -1,10 +0,0 @@
<?xml version="1.0"?><!--*-nxml-*-->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow send_destination="org.gnome.pass.search"
send_interface="org.gnome.pass.search"/>
</policy>
</busconfig>

View File

@ -1,5 +0,0 @@
[Shell Search Provider]
DesktopId=org.gnome.pass.search.desktop
BusName=org.gnome.pass.search
ObjectPath=/org/gnome/pass/search
Version=2

View File

@ -1,4 +0,0 @@
[D-BUS Service]
Name=org.gnome.pass.search
Exec=/usr/lib/gnome-shell-search-pass/daemon.py
SystemdService=org.gnome.pass.search.service

View File

@ -1,7 +0,0 @@
[Unit]
Description=Pass search provider for gnome-shell daemon
[Service]
Type=dbus
BusName=org.gnome.pass.search
ExecStart=/usr/lib/gnome-shell-search-pass/daemon.py

View File

@ -1,12 +1,12 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# This file is a part of gnome-shell-search-pass. # This file is a part of gnome-pass-search-provider.
# #
# gnome-shell-search-pass is free software: you can redistribute it and/or modify # gnome-pass-search-provider is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# gnome-shell-search-passs is distributed in the hope that it will be useful, # gnome-pass-search-providers is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
@ -49,7 +49,7 @@ class SearchPassService(dbus.service.Object):
:meth:`Enable` method, and stopped with :meth:`Disable`. :meth:`Enable` method, and stopped with :meth:`Disable`.
""" """
bus_name = 'org.gnome.pass.search' bus_name = 'org.gnome.Pass.SearchProvider'
enabled = False enabled = False
_search_cache = {} _search_cache = {}

View File

@ -7,15 +7,14 @@ LIBDIR=${LIBDIR:-/usr/lib}
LIBEXECDIR=${LIBEXECDIR:-/usr/lib/} LIBEXECDIR=${LIBEXECDIR:-/usr/lib/}
SYSCONFDIR=${SYSCONFDIR:-/etc} SYSCONFDIR=${SYSCONFDIR:-/etc}
install -Dm 0755 daemon.py "${LIBEXECDIR}"/gnome-shell-search-pass/daemon.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.search.ini "${DATADIR}"/gnome-shell/search-providers/org.gnome.pass.search.ini install -Dm 0644 conf/org.gnome.Pass.SearchProvider.ini "${DATADIR}"/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
# Desktop file # Desktop file
install -Dm 0644 conf/org.gnome.pass.search.desktop "${DATADIR}"/applications/org.gnome.pass.search.desktop install -Dm 0644 conf/org.gnome.Pass.SearchProvider.desktop "${DATADIR}"/applications/org.gnome.Pass.SearchProvider.desktop
# DBus configuration # DBus configuration
install -Dm 0644 conf/org.gnome.pass.search.service.dbus "${DATADIR}"/dbus-1/services/org.gnome.pass.search.service 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.search.conf "${SYSCONFDIR}"/dbus-1/system.d/org.gnome.pass.search.conf 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.search.service.systemd "${LIBDIR}"/systemd/user/org.gnome.pass.search.service