LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mimeopen.

opens files with their associated applications

TLDR

Open file with default app
$ mimeopen [file.pdf]
copy
Ask which application to use
$ mimeopen --ask [file.pdf]
copy
Set the default application for the MIME type
$ mimeopen -d [file.pdf]
copy
Show the MIME type without opening
$ mimeopen --no-ask [file.pdf]
copy
No forking
$ mimeopen -n [file.pdf]
copy

SYNOPSIS

mimeopen [options] file

DESCRIPTION

mimeopen opens files with their associated applications using MIME types to determine the appropriate handler. It queries the XDG MIME database to find registered applications for the file's type.The tool is part of the File::MimeInfo Perl module (perl-file-mimeinfo package). It reads and respects XDG MIME associations configured in `~/.config/mimeapps.list` and system defaults.

PARAMETERS

FILE

File to open.
--ask
Prompt to choose an application from known handlers.
-d
Set the default application for this MIME type.
-n
No fork; wait for the application to exit.
--no-ask
Print the MIME type without opening the file.
--help
Display help information.

CAVEATS

Part of perl-file-mimeinfo. Uses XDG MIME database. Desktop integration varies.

HISTORY

mimeopen provides MIME-based file opening following XDG (X Desktop Group) specifications.

SEE ALSO

xdg-open(1), mimetype(1), file(1)

Copied to clipboard
Kai