{
    "content": [
        {
            "type": "text",
            "text": "# XDG-OPEN(1) (man)\n\n**Summary:** xdg-open - opens a file or URL in the user's preferred application\n\n**Synopsis:** xdg-open {file | URL}\nxdg-open {--help | --manual | --version}\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --help | — | Show command synopsis. |\n| — | --manual | — | Show this manual page. |\n| — | --version | — | Show the xdg-utils version information. |\n\n## Examples\n\n- `xdg-open 'http://www.freedesktop.org/'`\n- `Opens the freedesktop.org website in the user's default browser.`\n- `xdg-open /tmp/foobar.png`\n- `Opens the PNG image file /tmp/foobar.png in the user's default image viewing application.`\n\n## See Also\n\n- xdg-mime(1)\n- xdg-settings(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (8 lines)\n- **OPTIONS** (1 lines) — 3 subsections\n  - --help (2 lines)\n  - --manual (2 lines)\n  - --version (2 lines)\n- **EXIT CODES** (15 lines)\n- **SEE ALSO** (2 lines)\n- **EXAMPLES** (8 lines)\n- **AUTHORS** (1 lines) — 2 subsections\n  - Kevin Krammer (2 lines)\n  - Jeremy White (2 lines)\n- **COPYRIGHT** (2 lines)\n- **NOTES** (6 lines)\n\n## Full Content\n\n### NAME\n\nxdg-open - opens a file or URL in the user's preferred application\n\n### SYNOPSIS\n\nxdg-open {file | URL}\n\nxdg-open {--help | --manual | --version}\n\n### DESCRIPTION\n\nxdg-open opens a file or URL in the user's preferred application. If a URL is provided the\nURL will be opened in the user's preferred web browser. If a file is provided the file will\nbe opened in the preferred application for files of that type. xdg-open supports file, ftp,\nhttp and https URLs.\n\nxdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as\nroot.\n\n### OPTIONS\n\n#### --help\n\nShow command synopsis.\n\n#### --manual\n\nShow this manual page.\n\n#### --version\n\nShow the xdg-utils version information.\n\n### EXIT CODES\n\nAn exit code of 0 indicates success while a non-zero exit code indicates failure. The\nfollowing failure codes can be returned:\n\n1\nError in command line syntax.\n\n2\nOne of the files passed on the command line did not exist.\n\n3\nA required tool could not be found.\n\n4\nThe action failed.\n\n### SEE ALSO\n\nxdg-mime(1), xdg-settings(1), MIME applications associations specification[1]\n\n### EXAMPLES\n\nxdg-open 'http://www.freedesktop.org/'\n\nOpens the freedesktop.org website in the user's default browser.\n\nxdg-open /tmp/foobar.png\n\nOpens the PNG image file /tmp/foobar.png in the user's default image viewing application.\n\n### AUTHORS\n\n#### Kevin Krammer\n\nAuthor.\n\n#### Jeremy White\n\nAuthor.\n\n### COPYRIGHT\n\nCopyright © 2006\n\n### NOTES\n\n1. MIME applications associations specification\nhttp://www.freedesktop.org/wiki/Specifications/mime-apps-spec/\n\n\n\nxdg-utils 1.0                                08/22/2022                                  XDG-OPEN(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "XDG-OPEN",
        "section": "1",
        "mode": "man",
        "summary": "xdg-open - opens a file or URL in the user's preferred application",
        "synopsis": "xdg-open {file | URL}\nxdg-open {--help | --manual | --version}",
        "flags": [
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Show command synopsis."
            },
            {
                "flag": "",
                "long": "--manual",
                "arg": null,
                "description": "Show this manual page."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Show the xdg-utils version information."
            }
        ],
        "examples": [
            "xdg-open 'http://www.freedesktop.org/'",
            "Opens the freedesktop.org website in the user's default browser.",
            "xdg-open /tmp/foobar.png",
            "Opens the PNG image file /tmp/foobar.png in the user's default image viewing application."
        ],
        "see_also": [
            {
                "name": "xdg-mime",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xdg-mime/1/json"
            },
            {
                "name": "xdg-settings",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xdg-settings/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "--manual",
                        "lines": 2,
                        "long": "--manual"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT CODES",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Kevin Krammer",
                        "lines": 2
                    },
                    {
                        "name": "Jeremy White",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}