Wednesday, May 8, 2024
81
rated 0 times [  81] [ 0]  / answers: 1 / hits: 137716  / 1 Year ago, sat, january 14, 2023, 1:01:05

When we want to open an application or file from the terminal, we type, say,



okular file.dvi


This opens the application, but also shows the status of the application. We cannot close the terminal, because it kills the process. Unfortunately, if you're trying to, for example, create a LaTeX file, you will need one tab for the text editor, one for the dvi file, and so on. And if you're trying to open all windows from the terminal, you can forget it. I'm trying use the terminal as much as possible, and while I have Yakuake, it is still a bother having so many tabs and seeing which of those have an application I've killed and so on.



So, is there a way to open an application/file from the terminal so that the status doesn't show and immediately gives the prompt so that we can use it to open more applications?


More From » command-line

 Answers
0
xdg-open file.dvi


xdg-open will open any file with its default application. As a bonus, you can close the terminal without killing the application.



Since xdg-open is quite a long name, I put an alias for it in .bashrc:



alias open='xdg-open'

[#36629] Sunday, January 15, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
attagjump

Total Points: 272
Total Questions: 127
Total Answers: 124

Location: Taiwan
Member since Fri, Sep 17, 2021
3 Years ago
;