[SOLVED] Open Documents/File with Specific Application in Command Line
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using the GUI(GNOME), when you Right-Click on the file abs.odt a pop-up menu appears. In the pop-up menu, there are several options and one of them is "Open-With -->" and when you move the mouse over it, another menu appears with applicatons for you to choose from to open the file with.
So explain what behaviour would you exactly expect from the command line? It's not a graphical user environment. The command line itself therefore has no way to show pop-ups so there's no menu to choose from...
You're never going to get a GUI menu to choose an application from, because the command line is the command line, not a GUI. In the command line, you open an application by typing the name of its executable (which is often the same, or very similar to the name of the application). If you want to open a file with that application, you typically just type the filename after the executable.
So if you want to open abs.odt with LibreOffice Writer (executable name "oowriter"), you would type "oowriter abs.odt"
If you want to open readme.txt with gedit (executable name "gedit"), you would type "gedit readme.txt"
And so on
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.