Giter VIP home page Giter VIP logo

Comments (8)

chmduquesne avatar chmduquesne commented on June 12, 2024

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.

coldfix avatar coldfix commented on June 12, 2024

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.

chmduquesne avatar chmduquesne commented on June 12, 2024

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.

coldfix avatar coldfix commented on June 12, 2024

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.

coldfix avatar coldfix commented on June 12, 2024

Almost forgot:

add this in the config file under program_options, i.e.:

program_options:
  password_prompt: ...

from udiskie.

coldfix avatar coldfix commented on June 12, 2024

I merged this into master and will issue a minor release soon. Reopen, if this doesn't work for you.

from udiskie.

chmduquesne avatar chmduquesne commented on June 12, 2024

Ah, sorry, I did not have time to test this yet. I'll test when this is released on arch. Thank you!

from udiskie.

mmirus avatar mmirus commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.