Comments (8)
By the way: x11-ssh-askpass would be a good default to replace your current prompt, if you add this feature. It's really just a window that prompts you for a password and prints it to stdout.
from udiskie.
Hey,
initially, I just used zenity for GUI password input (and systemd-ask-password on consoles) and there was a config file entry to allow using an arbitrary command instead. I then switched to an inline solution for security considerations and dropped the config file entry at the same time. I could readd that. What should the entry look like? I think, maybe a .format
string/list, getting a device object as its parameters, so you could use it for example like this:
password_prompt: [/usr/lib/ssh/ssh-x11-askpass, "Enter password to unlock {.device_presentation}"]
What do you think?
from udiskie.
I think that would do it. I guess that in my case, it would be:
password_prompt: ["gnome-keyring-query", "get", "{.device_presentation}"]
Am I right?
FYI The tool gnome-keyring-query is invoked like that:
gnome-keyring-query get foo
This gets the passphrase associated with the entry foo (in case the keyring is locked, it will prompt the user to type the password to the keyring, otherwise it will just get it). So on my side, I guess I would remplace foo with the uuid of the device (and set up the keyring accordingly).
from udiskie.
Hey,
I upped this modification in the prompt-config
branch, you can check it out and see if it fits your needs.
If you want to pass the UUID, you should rather use {.id_uuid}
:
password_prompt: [gnome-keyring-query, get, "{.id_uuid}"]
There is also a short syntax
password_prompt: gnome-keyring-query get {.id_uuid}
The possible values are the properties of the Device
class (see udiskie.udisks2
).
from udiskie.
Almost forgot:
add this in the config file under program_options
, i.e.:
program_options:
password_prompt: ...
from udiskie.
I merged this into master and will issue a minor release soon. Reopen, if this doesn't work for you.
from udiskie.
Ah, sorry, I did not have time to test this yet. I'll test when this is released on arch. Thank you!
from udiskie.
I found this issue helpful when looking up how to configure udiskie to use gnome keyring to automount encrypted devices, and thought I'd share a little additional info for anyone who finds their way here from Google.
I think secret-tool (part of libsecret) would be the way to go about this now, as gnome-keyring-query (or at least the library it depends on) seems to be a deprecated way of interacting with the keyring.
Config for udiskie would become this:
program_options:
password_prompt: ["secret-tool", "lookup", "gvfs-luks-uuid", "{id_uuid}"]
In ~/.config/udiskie/config.yml
.
from udiskie.
Related Issues (20)
- [Sway/Wayland] Smart tray is never hidden? HOT 2
- Tray icon HOT 9
- Autostart at boot HOT 2
- Locking LUKS device: Not authorized HOT 4
- Open file manager by click on notification HOT 5
- Unable to automount internal device HOT 6
- Configure file permission HOT 5
- Automount mounts in Read only HOT 15
- Automount only specific device HOT 1
- Automatic unmounting from file manager HOT 1
- Tell daemon to pause automounting HOT 1
- Tray menu shows invalid entry on first launch and icons are hard to see HOT 1
- Unmounting Btrfs partition: Error finding object for block device
- shell completions: need to escape spaces in labels HOT 2
- Not showing "internal HDD" HOT 1
- When use together with `tomb`, it cause problem because of the loop device password prompt. HOT 1
- make appimage or static binary file HOT 1
- Not authorized to mount on Linux Mint HOT 1
- Hide unpower (at least for optical devices) HOT 2
- Fedora package is wrong name on the installation manual HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udiskie.