MIMEOPEN(1p)
π NAME π
mimeopen β open files by mimetype, bestie. That's it, that's the whole job.
β¨ SYNOPSIS β¨
mimeopen [options] [-] files
π¦ DESCRIPTION π¦
okay so here's the vibe: this script figures out the mimetype of a file and then opens it with the default desktop application. iconic behaviour, honestly.
But β and this is the fun part β if there's no default application configured, it hits you with an "open with" menu right there in your terminal. main character energy fr fr, it literally asks you what you want.
To use this script you need the freedesktop mime-info database and the freedesktop desktop-file-utils package. See File::MimeInfo::Applications(3) for more details. π«Ά
π₯ OPTIONS π₯
-a,--askβ Do not execute the default application, just ask you which application to run instead. Heads up bestie: this does not change the default application. It's a one-time thing, a little treat. π-d,--ask-defaultβ Lets you choose a new default program for the given files. This one does commit. π-n,--no-askβ Don't ask the user which program to use. It'll pick the default program, or the first program known to handle the file's mimetype. And nope, this does not set the default application either. π-M,--magic-onlyβ Do not check for extensions, globs or inode type β only look at the actual content of the file. Lowkey the move if for some reason you don't trust the name or the extension a file is claiming to have. Trust issues but make it valid. π--database=mimedir:mimedir:...β Force the program to look in these directories for the shared mime-info database. The directories specified by the basedir specification are ignored. Bye, basedir. π-D,--debugβ Print debug information about how the mimetype was determined. Detective mode. π-h,--help-u,--usageβ Print a help message and exits. (Yes, both of these do the exact same thing. They're twins. π―)-v,--versionβ Print the version of the program and exit.
π DEPRECATED OPTIONS π
-L,--dereferenceβ Follow symbolic links. Deprecated because this is the logical default for this command anyway. Ignored silently. Not me being old news β it just literally does nothing now. πͺ¦
π BUGS π
If you find bugs, please file them in our Github issue tracker at <https://codeberg.org/michielb/File-MimeInfo/issues>. Do it bestie, they wanna know. π«Ά
See File::MimeInfo::Applications(3) and File::DesktopEntry(3) for some limitations. Yeah, there are limits. It's giving "we're aware". π
π AUTHOR π
Jaap Karssenberg <pardus@cpan.org> β maintained by Michiel Beijen <mb@x14.nl>.
π COPYRIGHT π
Copyright (c) 2002, 2012 Jaap G Karssenberg. All rights reserved.
Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Read that twice, bestie. No promises. π
π SEE ALSO π
mimetype(1)update-mime-database(1)update-desktop-database(1)File::MimeInfo(3)File::MimeInfo::Applications(3)
slay, you made it to the end π this whole thing lives in MIMEOPEN(1p), part of the User Contributed Perl Documentation, and it's running on perl v5.40.1 with a page date of 2026-05-20. go open some files, you absolute icon. π
β¨
π¦ where this page comes from
- ubuntu stonking: libfile-mimeinfo-perl 0.37-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms