MIMEOPEN(1)

πŸ’… MIMEOPEN(1) β€” the mimeopen manual, but make it make sense

okay bestie, welcome to the mimeopen page πŸ’– this is the User Contributed Perl Documentation version, and I'm literally about to walk you through it like we're texting at 1am 🫢


✨ NAME ✨

mimeopen β€” open files by mimetype πŸ”₯

🌸 SYNOPSIS 🌸

mimeopen [options] [-] files

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way this works: this script lowkey does a whole detective arc πŸ” it tries to determine the <highlight>mimetype</highlight> of a file, then opens it with your default desktop application. iconic behaviour, no notes.

but what if there's no default application configured? 😭 then it prompts you with an "open with" menu right there in the terminal. main character energy fr fr.

heads up babes: 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, instead ask which application to run. and no, this does not change the default application, it's just asking bestie πŸ’…
  • -d, --ask-default β€” let the user (that's you 🫡) choose a new default program for the given files.
  • -n, --no-ask β€” don't ask the user which program to use. just pick the default program, or the first program known to handle the file mimetype. this does not set the default application, it's giving "decide for me but don't make it official" πŸ’€
  • -M, --magic-only β€” do not check for extensions, globs or inode type β€” only look at the <highlight>content</highlight> of the file πŸ‘€ this is particularly useful if for some reason you don't trust the name or the extension a file has. like, sketchy filename vibes? vibe check failed? use this 🧚
  • --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, periodt ✨
  • -D, --debug β€” print debug information about how the mimetype was determined. detective mode activated πŸ•΅οΈβ€β™€οΈ
  • -h, --help β€” print a help message and exits πŸ₯°
  • -u, --usage β€” print a help message and exits πŸ₯° (same energy, different flag, iykyk)
  • -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. it's ignored silently πŸ™ˆ so like, it's still here, it just does nothing. ghosted, honestly.

😭 BUGS 😭

if you find bugs, please file them in our Github issue tracker at https://github.com/mbeijen/File-MimeInfo/issues πŸ›

also see File::MimeInfo::Applications(3) and File::DesktopEntry(3) for some limitations β€” not everything is slay, some things are just limitations, and we respect that 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Jaap Karssenberg <pardus@cpan.org> β€” maintained by Michiel Beijen <mb@x14.nl> 🫢


Copyright (c) 2002, 2012 Jaap G Karssenberg. 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. like, it's free, bestie, manage your expectations 😌


⭐ SEE ALSO ⭐

mimetype(1), update-mime-database(1), update-desktop-database(1), File::MimeInfo(3), File::MimeInfo::Applications(3) 🌸


aaaand that's the whole page, you ate it up fr fr πŸŽ€ this gorgeous thing is from perl v5.42.0, dated 2024-04-26 β€” go forth and open files responsibly, mwah πŸ’‹

πŸ“¦ where this page comes from