Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using KeePassXC integration (couldn't execute "clip") #3213

Open
apsinthium opened this issue Oct 12, 2023 · 9 comments
Open

Error using KeePassXC integration (couldn't execute "clip") #3213

apsinthium opened this issue Oct 12, 2023 · 9 comments
Labels
bug modes Core functionality: modes.

Comments

@apsinthium
Copy link

apsinthium commented Oct 12, 2023

.

@aadcg
Copy link
Member

aadcg commented Oct 12, 2023

@apsinthium please share you config file.


Could be related to 1871bd0.

@aadcg aadcg added the bug label Oct 12, 2023
@aadcg
Copy link
Member

aadcg commented Oct 12, 2023

On seconds thoughts, this may be because the Flatpak can't locate keepassxc-cli.

@apsinthium what's the output of:

flatpak run engineer.atlas.Nyxt  --eval "(serapeum:resolve-executable \"keepassxc-cli\")" --quit

@aadcg
Copy link
Member

aadcg commented Oct 12, 2023

@apsinthium you didn't enter the command as I've described. Did you escape the quotes? Please paste flatpak run engineer.atlas.Nyxt --eval "(serapeum:resolve-executable \"keepassxc-cli\")" --quit.

I think you should see something along the lines of

$ flatpak run engineer.atlas.Nyxt  --eval "(serapeum:resolve-executable \"keepassxc-cli\")" --quit

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/aadcg/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

<INFO> [11:12:38] Loading Lisp file #P"/home/aadcg/.config/nyxt/config.lisp".
NIL

@aadcg
Copy link
Member

aadcg commented Oct 12, 2023

@apsinthium Now you did it correctly. The output differs from the one above.


Two things here:

  1. The password manager must error when the call (executable interface) returns nil in execute from password.lisp. @aartaka could you address it?
  2. We need to understand how to manage system binaries when Nyxt is run as a Flatpak. We already pass --filesystem=host. I need to think.

@aadcg aadcg added the build label Oct 20, 2023
@aadcg
Copy link
Member

aadcg commented Oct 20, 2023

The solution to 2. is to invoke the password manager as flatpak-spawn --host keepassxc-cli. But first I need to tweak the Flatpak settings. Then we can test it.

Depends on flathub-infra/flatpak-builder-lint#194.

@aadcg aadcg self-assigned this Oct 20, 2023
@aadcg
Copy link
Member

aadcg commented Nov 13, 2023

@apsinthium are you still interested in testing the password facilities in the Flatpak distribution?

For reference, Flatpak users need to prepend the executable they need to invoke with flatpak-spawn --host. E.g. calling keepassxc-cli becomes flatpak-spawn --host keepassxc-cli. This piece of information should be added to the manual.

@aadcg
Copy link
Member

aadcg commented Nov 14, 2023

@apsinthium If you're not using the Flatpak, then it makes little sense. Thanks for the collaboration offer nonetheless!


For Flatpak users, I expected that the piece of configuration below should work. It seems that I'm missing something about the architecture of password mode. @aartaka any idea?

(define-configuration nyxt/mode/password:password-mode
  ((nyxt/mode/password:password-interface (make-instance 'password:keepassxc-interface))))

(define-configuration password:keepassxc-interface
  ((password:executable (str:split " " "flatpak-spawn --host keepassxc-cli"))))
When attempting to read the slot's value (slot-value), the slot
NYXT::CUSTOMIZE-HOOK is missing from the object
#<STANDARD-CLASS PASSWORD:KEEPASSXC-INTERFACE>.
   [Condition of type SB-PCL::MISSING-SLOT]

Restarts:
 0: [RETRY] Retry EVAL of current toplevel form.
 1: [CONTINUE] Ignore error and continue loading file "/home/aadcg/.config/nyxt/config.lisp".
 2: [ABORT] Abort loading file "/home/aadcg/.config/nyxt/config.lisp".
 3: [LOAD-LISP-RETRY] Retry loading Lisp file.
 4: [QUIT] Run `nyxt:quit' and try again.
 5: [FORCE-QUIT] Run `nyxt:quit' and set `*browser*' to NIL in any case.
 --more--

Backtrace:
 0: ((:METHOD SLOT-MISSING (T T T T)) #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS> #<STANDARD-CLASS PASSWORD:KEEPASSXC-INTERFACE> NYXT::CUSTOMIZE-HOOK SLOT-VALUE NIL) [fast-method]
 1: ((LAMBDA (SB-PCL::OBJECT) :IN SB-PCL::SLOT-MISSING-INFO) #<STANDARD-CLASS PASSWORD:KEEPASSXC-INTERFACE>)
 2: ((LAMBDA NIL :IN "/home/aadcg/.config/nyxt/config.lisp"))

@aartaka
Copy link
Contributor

aartaka commented Nov 14, 2023 via email

@aadcg aadcg added modes Core functionality: modes. and removed build labels Dec 11, 2023
@aadcg aadcg removed their assignment Dec 11, 2023
@aadcg
Copy link
Member

aadcg commented Dec 11, 2023

There are 3 topics in this issue:

I've fixed what is strictly related to the Flatpak and I'd suggest @aartaka taking over the remaining issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug modes Core functionality: modes.
Development

No branches or pull requests

3 participants