Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
1687fc3151 | ||
9e9520a3ef | |||
e63f95ee4f | |||
|
58ab46c0ab |
5 changed files with 28 additions and 12 deletions
|
@ -10,7 +10,13 @@ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY C
|
|||
With that said, if you do decide to use it, feed back is much appreciated. Please send me a message on mastodon [@micke@koyu.space](https://koyu.space/web/accounts/125968) if you use it with success, and open an [issue on smolnet.org](https://code.smolnet.org/micke/passui/issues/new/) if you have problems.
|
||||
|
||||
## Installation
|
||||
Clone this repository and run the crude installer:
|
||||
If you are running {Deb,Mo}bian you can install using the [prebuilt .deb file](https://code.smolnet.org/attachments/d3112068-cac5-4e22-890a-0765c8e170dd).
|
||||
|
||||
You can also build a deb yourself using python3-stdeb:
|
||||
```
|
||||
python3 setup.py --command-packages=stdeb.command bdist_deb
|
||||
```
|
||||
Otherwise you can clone this repository and run the crude installer:
|
||||
```
|
||||
git clone https://code.smolnet.org/micke/passui.git
|
||||
cd passui
|
||||
|
|
|
@ -10,7 +10,7 @@ Comment=GUI for the standard unix password store
|
|||
Comment[ca]=Interfície gràfica per al magatzem de contrasenyes UNIX estàndard
|
||||
Comment[nl]=GUI voor de standaard Unix wachtwoordopslag
|
||||
Comment[sv_SE]=GUI för Unix standardlösenordshanterare
|
||||
Exec=/usr/local/bin/passui
|
||||
Exec=/usr/bin/passui
|
||||
Icon=dialog-password
|
||||
Terminal=false
|
||||
Categories=Security;Utility;
|
||||
|
|
16
install.sh
16
install.sh
|
@ -2,7 +2,7 @@
|
|||
if [[ "${1}" == "-u" ]]; then
|
||||
echo "Uninstalling passui"
|
||||
sudo rm /usr/local/bin/passui /usr/share/applications/{org.smolnet.,}passui.desktop
|
||||
echo "If you wish you can now manually remove the dependencies: wxpython git gnupg pass"
|
||||
echo "If you wish you can now manually remove the dependencies: wxpython git gnupg pass pinentry-gtk wl-clipboard"
|
||||
exit 0
|
||||
elif [[ "${1}" == "-h" ]]; then
|
||||
echo "Usage: $0 [-u|-h]
|
||||
|
@ -10,13 +10,14 @@ elif [[ "${1}" == "-h" ]]; then
|
|||
-u uninstall passui"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -f /usr/bin/apk ]]; then # PostmarketOS/Alpine
|
||||
sudo apk add py3-wxpython py3-gnupg git gnupg pass
|
||||
python_version=3.9
|
||||
if [[ -f /usr/bin/apk ]] || [[ -f /sbin/apk ]]; then # PostmarketOS/Alpine
|
||||
sudo apk add py3-wxpython py3-gnupg git gnupg pass pinentry-gtk wl-clipboard
|
||||
python_version=3.10
|
||||
elif [[ -f /usr/bin/apt ]]; then # Mobian/Debian/Ubuntu
|
||||
sudo apt install python3-wxgtk4.0 python3-gnupg git gnupg pass
|
||||
sudo apt install python3-wxgtk4.0 python3-gnupg git gnupg pass pinentry-gtk2 wl-clipboard
|
||||
elif [[ -f /usr/bin/pacman ]]; then # Arch/Manjaro
|
||||
sudo pacman -S python-wxpython python-gnupg git gnupg pass
|
||||
sudo pacman -S python-wxpython python-gnupg git gnupg pass pinentry wl-clipboard
|
||||
else
|
||||
echo " This distribution is not supported by this installer.
|
||||
manually install: wxpython python3-gnupg git gnupg pass
|
||||
|
@ -24,7 +25,6 @@ else
|
|||
exit 1
|
||||
fi
|
||||
sudo cp scripts/passui /usr/local/bin/
|
||||
sudo cp -a lib/pass_handler /usr/lib/python3.9/site-packages/
|
||||
sudo cp -a lib/pass_handler /usr/lib/python3.9/
|
||||
sudo cp -a src/pass_handler /usr/lib/python${python_version}/site-packages/
|
||||
sudo cp data/org.smolnet.passui.desktop /usr/share/applications/
|
||||
exit 0
|
||||
|
|
|
@ -99,9 +99,12 @@ def copy_to_clipboard(text) -> tuple[Union[str, bytes], Union[str, bytes]]:
|
|||
|
||||
:param text:
|
||||
"""
|
||||
clip_command = ['/usr/bin/wl-copy']
|
||||
if not os.path.isfile(clip_command[0]):
|
||||
clip_command = ['xclip', '-selection', 'c']
|
||||
password: str = text.split('\n')[0]
|
||||
command1: list[str] = ['/bin/echo', password]
|
||||
command2: list[str] = ['/usr/bin/wl-copy']
|
||||
command2: list[str] = clip_command
|
||||
result: tuple[Union[str, bytes], Union[str, bytes]] = run_command(command1, command2)
|
||||
return result
|
||||
|
||||
|
@ -112,7 +115,10 @@ def get_password_from_path(pass_path) -> str:
|
|||
:param pass_path:
|
||||
"""
|
||||
result: tuple[Union[str, bytes], Union[str, bytes]] = run_command(['/usr/bin/pass', 'show', pass_path])
|
||||
password: str = result[0].decode()
|
||||
if type(result[0]) == type(bytes()):
|
||||
password: str = result[0].decode()
|
||||
else:
|
||||
password: str = result[0]
|
||||
return password
|
||||
|
||||
|
||||
|
|
4
stdeb.cfg
Normal file
4
stdeb.cfg
Normal file
|
@ -0,0 +1,4 @@
|
|||
[DEFAULT]
|
||||
Depends3: python3-wxgtk4.0, python3-typing-extensions, python3-typing-inspect, python3-gnupg, git, gnupg, pass, pinentry-gtk2, wl-clipboard | xclip
|
||||
Debian-Version: 1
|
||||
Package3: passui
|
Loading…
Add table
Reference in a new issue