token2 / fido2-manage

This library is partially forked from libfido2 to provide a FIDO2.1 key management tool (with a GUI) under the Linux platform
Other
14 stars 3 forks source link

x-terminal-editor is not available in all Distros/DEs #9

Open CPU-Blanc opened 2 months ago

CPU-Blanc commented 2 months ago

Hello!

It would appear as though the gui.py is hardcoded to use x-terminal-emulator when setting/changing the PIN of the device, however, not all Linux distros/desktop environments have this available resulting in the following stacktrace

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.12/tkinter/__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "fido2-manage/gui.py", line 239, in change_pin
    subprocess.Popen(['x-terminal-emulator', '-e'] + command)
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'x-terminal-emulator'

Resulting in not being able to set it at all through the GUI and having to fallback to the command line. In my case, I'm on Arch with Hyprland as my WM.

token2 commented 2 months ago

What we mention in the main page "should work on any Linux distribution, but we develop and test using Ubuntu" refers to the command line part. We will check what can be done with the GUI part