Skip to content

only uses xterm when default program has Terminal=true #366

@SArpnt

Description

@SArpnt

if the default program to open a file has Terminal=true in the desktop entry, lxqt-archiver will only try to use xterm as the terminal, and fail if it isn't found. there's no way to select a different terminal. (this is probably because xterm is the first entry in the libfm terminals.list)

Expected Behavior

double clicking a file should open the file in the default program, regardless of what terminal emulator is default

Current Behavior

when trying to open a file in an archive where the default program should open in a terminal, it gives an error message saying xterm couldn't be opened.

Possible Solution

ideally, use $TERMINAL to find the correct terminal emulator, and if it's unset try every option in the libfm-qt terminals.list.

if trying every terminal in the terminals.list isn't possible for some reason, then add a settings option to set the terminal emulator, since people might not know to set the $TERMINAL variable.

if no terminal is found, ideally let the user select a terminal emulator from their installed programs the same way they can select default programs to open files in pcmanfm-qt, or at least guide them to whatever settings option is available

Steps to Reproduce
  1. create a desktop entry that uses Terminal=true, such as this:
[Desktop Entry]
Name=Kakoune
Exec=kak
Terminal=true
  1. set the program as the default program for text/plain. this can be done in .config/mimeapps.list
  2. open an archive with a text file in it, then try to open the text file by double clicking, without extracting it. lxqt-archiver will try to open xterm, and fail if it can't
Context

i use kakoune as my text editor, which only runs in a terminal, so the desktop file for it has Terminal=true. i don't have xterm, i'm on wayland and my only terminal emulator is foot. i have the TERMINAL environment variable set to foot.
xdg-open opens kakoune properly with a text file, pcmanfm-qt can open it after tweaking the libfm terminals.list file, but lxqt-archiver only tries xterm.

System Information
  • Distribution & Version: Artix linux
  • Kernel: linux-zen 6.4.12.zen1-1
  • Qt Version: 5.15.10+kde+r155-1
  • libqtxdg Version: not sure
  • lxqt-build-tools Version: not sure
  • Package version: lxqt-archiver 0.8.0-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions