'\" t
.\"     Title: xdg-open
.\"    Author: Kevin Krammer
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 12/31/2010
.\"    Manual: xdg-open Manual
.\"    Source: xdg-utils 1.0
.\"  Language: English
.\"
.TH "XDG\-OPEN" "1" "12/31/2010" "xdg-utils 1.0" "xdg-open Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
xdg-open \- opens a file or URL in the user\*(Aqs preferred application
.SH "SYNOPSIS"
.HP \w'\fBxdg\-open\fR\ 'u
\fBxdg\-open\fR {\fB\fIfile\fR\fR | \fB\fIURL\fR\fR}
.HP \w'\fBxdg\-open\fR\ 'u
\fBxdg\-open\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
.SH "DESCRIPTION"
.PP
xdg\-open opens a file or URL in the user\*(Aqs preferred application\&. If a URL is provided the URL will be opened in the user\*(Aqs preferred web browser\&. If a file is provided the file will be opened in the preferred application for files of that type\&. xdg\-open supports file, ftp, http and https URLs\&.
.PP
xdg\-open is for use inside a desktop session only\&. It is not recommended to use xdg\-open as root\&.
.SH "OPTIONS"
.PP
\fB\-\-help\fR
.RS 4
Show command synopsis\&.
.RE
.PP
\fB\-\-manual\fR
.RS 4
Show this manualpage\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Show the xdg\-utils version information\&.
.RE
.SH "EXIT CODES"
.PP
An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
.PP
\fB1\fR
.RS 4
Error in command line syntax\&.
.RE
.PP
\fB2\fR
.RS 4
One of the files passed on the command line did not exist\&.
.RE
.PP
\fB3\fR
.RS 4
A required tool could not be found\&.
.RE
.PP
\fB4\fR
.RS 4
The action failed\&.
.RE
.SH "EXAMPLES"
.PP

.sp
.if n \{\
.RS 4
.\}
.nf
xdg\-open \*(Aqhttp://www\&.freedesktop\&.org/\*(Aq
.fi
.if n \{\
.RE
.\}
.sp
Opens the Freedesktop\&.org website in the user\*(Aqs default browser
.PP

.sp
.if n \{\
.RS 4
.\}
.nf
xdg\-open /tmp/foobar\&.png
.fi
.if n \{\
.RE
.\}
.sp
Opens the PNG image file /tmp/foobar\&.png in the user\*(Aqs default image viewing application\&.
.SH "AUTHORS"
.PP
\fBKevin Krammer\fR
.RS 4
Author.
.RE
.PP
\fBJeremy White\fR
.RS 4
Author.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2006
.br
