Skip to content

Outdated version of xdg-open script causes browser to not open on KDE Plasma 6 desktop environments #197

@olivierbourdeau

Description

@olivierbourdeau

Environment

Node 24.0.2
listhen 1.9.0

Reproduction

No reproduction required

Describe the bug

Here is the function currently being used in your dist/chunks/xdg-open.mjs file to open the browser in KDE desktop environment :

open_kde()
{
    if [ -n "${KDE_SESSION_VERSION}" ]; then
      case "${KDE_SESSION_VERSION}" in
        4)
          kde-open "$1"
        ;;
        5)
          kde-open${KDE_SESSION_VERSION} "$1"
        ;;
      esac
    else
        kfmclient exec "$1"
        kfmclient_fix_exit_code $?
    fi

    if [ $? -eq 0 ]; then
        exit_success
    else
        exit_failure_operation_failed
    fi
}

As you can see, if the KDE_SESSION_VERSION is 6, the script won't do anything. Here is the same function, pulled from the latest version of xdg-open :

open_kde()
{
    if [ -n "${KDE_SESSION_VERSION}" ]; then
      case "${KDE_SESSION_VERSION}" in
        4)
          kde-open "$1"
        ;;
        5)
          "kde-open${KDE_SESSION_VERSION}" "$1"
        ;;
        6)
          kde-open "$1"
        ;;
      esac
    else
        kfmclient exec "$1"
        kfmclient_fix_exit_code $?
    fi

    if [ $? -eq 0 ]; then
        exit_success
    else
        exit_failure_operation_failed
    fi
}

This version supports version 6 of KDE Plasma desktop environment.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions