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 (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 🌈


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