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

CMD:// doesn't work in Fedora 33 #6555

Closed
josevnz opened this issue May 23, 2021 · 3 comments
Closed

CMD:// doesn't work in Fedora 33 #6555

josevnz opened this issue May 23, 2021 · 3 comments

Comments

@josevnz
Copy link

josevnz commented May 23, 2021

Overview

Hello,

When you try to use CMD:// to run a shell script or external command it fails

Steps to Reproduce

  1. Create a new entry
  2. On the URL call your script (make sure the full path works on the Bash command line first): CMD:///home/josevnz/bin/myscript.sh
  3. Try to execute script. No error on the GUI but if you are lucky enough to start KeePassXC from a terminal window you will see this:
io: cmd:///home/josevnz/bin/myscript.sh: The specified location is not supported

Expected Behavior

Run the script from Bash

Actual Behavior

io: cmd:///home/josevnz/bin/myscript.sh: The specified location is not supported

KeePassXC - Version 2.6.4
Revision: 34a78f0

Qt 5.15.2
Debugging mode is disabled.

Operating system: Fedora 33 (Workstation Edition)
CPU architecture: x86_64
Kernel: linux 5.11.21-200.fc33.x86_64

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:

  • libgcrypt 1.8.7

Operating System: Linux dmaf5 5.11.21-200.fc33.x86_64 #1 SMP Sat May 15 20:31:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (Fedora 33)
Desktop Env: Gnome
Windowing System: X11/Wayland

@josevnz josevnz added the bug label May 23, 2021
@josevnz
Copy link
Author

josevnz commented May 23, 2021

I was looking for more details on https://keepass.info/help/base/autourl.html or even on gio error but could not find anything useful. In all honesty it seems an Gnome issue and not a KeepassXC. This command also fails:

xdg-open CMD:///home/josevnz/bin/myscript.sh
io: CMD:///home/josevnz/bin/myscript.sh: The specified location is not supported

@droidmonkey
Copy link
Member

droidmonkey commented May 23, 2021

You need to tell KeePassXC which executable to run. A script file needs a shell to run on, when run from a terminal window the shell is implied as the current shell. Your URL's should be something like cmd://<executable> <parameters>

In your case you need to do:

cmd://bash /home/..../myscript.sh

If you want to show the console window, this worked nicely for me (KDE and Gnome options):

cmd://konsole --hold -e bash /home/.../myscript.sh
cmd://gnome-terminal --wait -- bash /home/.../myscript.sh

@josevnz
Copy link
Author

josevnz commented May 23, 2021

You are %100 correct, I changed cmd:// following your suggestion and works like a charm.
Thanks for looking into this!
--Jose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants