{
    "content": [
        {
            "type": "text",
            "text": "# open (man)\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}\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\n## TLDR\n\n> `open` can refer to multiple commands with the same name.\n\n- View documentation for the command available in macOS:\n  `tldr open {{-p|--platform}} osx`\n- View documentation for the command available through fish:\n  `tldr open.fish`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (3 subsections)\n- **EXIT CODES**\n- **SEE ALSO**\n- **EXAMPLES**\n- **AUTHORS** (2 subsections)\n- **COPYRIGHT**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "open",
        "section": "",
        "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}",
        "tldr_summary": "`open` can refer to multiple commands with the same name.",
        "tldr_examples": [
            {
                "description": "View documentation for the command available in macOS",
                "command": "tldr open {{-p|--platform}} osx"
            },
            {
                "description": "View documentation for the command available through fish",
                "command": "tldr open.fish"
            }
        ],
        "tldr_source": "official",
        "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": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "xdg-open - opens a file or URL in the user's preferred application\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "xdg-open {file | URL}\n\nxdg-open {--help | --manual | --version}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "xdg-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",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--help",
                        "content": "Show command synopsis.\n",
                        "long": "--help"
                    },
                    {
                        "name": "--manual",
                        "content": "Show this manual page.\n",
                        "long": "--manual"
                    },
                    {
                        "name": "--version",
                        "content": "Show the xdg-utils version information.\n",
                        "long": "--version"
                    }
                ]
            },
            "EXIT CODES": {
                "content": "An 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",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "xdg-mime(1), xdg-settings(1), MIME applications associations specification[1]\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "xdg-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",
                "subsections": []
            },
            "AUTHORS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Kevin Krammer",
                        "content": "Author.\n"
                    },
                    {
                        "name": "Jeremy White",
                        "content": "Author.\n"
                    }
                ]
            },
            "COPYRIGHT": {
                "content": "Copyright © 2006\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. 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)",
                "subsections": []
            }
        }
    }
}