Quantcast
Channel: Active questions tagged desktop-environment - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 118

Is there an "open with" command for the command line?

$
0
0

Does the command line have a way to get a recommended list of programs used to open a particular file, based on the file type? For example, a .pdf file would have an open with... recommendation using the programs Evince and Document Viewer.

I use the command line for most things, but sometimes I forget the name of a program that I want to use to open a particular type of file.

BTW I am using Ubuntu 13.10.

pro-tip

Thanks to @slm 's selected answer below, I made the following bash script in a file called openwith.sh:

xdg-mime query default $(xdg-mime query filetype $1)

Add as an alias or execute directly as an openwith command.


Viewing all articles
Browse latest Browse all 118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>