Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • X xdg-utils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 167
    • Issues 167
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 39
    • Merge requests 39
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xdg
  • xdg-utils
  • Merge requests
  • !13

xdg-open: Exit also on non-zero exit status from 'Exec' .desktop entry.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Piotr Karbowski requested to merge piotrkarbowski/xdg-utils:xdg-open-handle-.desktop-Exec-non-zero-exit-code into master Jun 23, 2019
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Currently if the tool that was taken out of .desktop file Exec field will exit with non-zero exit code, xdg-open will then fallback to open_generic() from search_desktop_file(), which will lead to opening again the same file with the same tool and ending on opening the file with web browser.

This may lead to situation when for example text editor that fails to write file on exit, will open the unchanged file with web browsr.

Another real life example is if one were to exit from mpv with control-C, xdg-open will again start mpv, then it will try to start x-web-browser and ending with starting a browser from list -- firefox in my case.

This must be a bug as it's not docummented anywhere. If we got to the point where we exec $command_exec then xdg-open must exit even if whatever was executed by $command_exec returned non-zero exit status.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: xdg-open-handle-.desktop-Exec-non-zero-exit-code