How to always open a *specific filename* with a program (not *specific type*)
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to always open a *specific filename* with a program (not *specific type*)
Hi all!
I already know how to open a specific file type with always the same program.
What I'd like in fact in to do the same but restricted to a specific filename.
Concrete case:
I've got a text file. This file is in fact what the flowchart graphic program, "Draw.io", uses to store your project.
What I want is to always open the program "Draw.io" when I click on this file.
But I don't want that all the others text files have to be open with "Draw.io", but like "normal" text file (for example with vim).
Is it possible?
Thanks a lot in advance!
I already know how to open a specific file type with always the same program.
What I'd like in fact in to do the same but restricted to a specific filename.
Concrete case:
I've got a text file. This file is in fact what the flowchart graphic program, "Draw.io", uses to store your project.
What I want is to always open the program "Draw.io" when I click on this file.
But I don't want that all the others text files have to be open with "Draw.io", but like "normal" text file (for example with vim).
Is it possible?
Thanks a lot in advance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 16
- Posts: 6054
- Joined: Mon Aug 27, 2012 10:17 pm
Re: How to always open a *specific filename* with a program (not *specific type*)
interesting. we don't even know your desktop environment !!
one possible workaround in mate:
right-click your specific file, "open with" your application (and don't forget not to leave on "always open ...")
within a terminal note the exact command line ps -ef
then on the desktop right-click and choose to create a launcher, with this command line, example:
one possible workaround in mate:
right-click your specific file, "open with" your application (and don't forget not to leave on "always open ...")
within a terminal note the exact command line ps -ef
then on the desktop right-click and choose to create a launcher, with this command line, example:
Re: How to always open a *specific filename* with a program (not *specific type*)
It's possible but a PITA because freedesktop glommed a bunch of extensions with very different uses into one file-type of "text".ThePhi wrote: ⤴Tue May 18, 2021 12:14 am I've got a text file. This file is in fact what the flowchart graphic program, "Draw.io", uses to store your project.
What I want is to always open the program "Draw.io" when I click on this file.
But I don't want that all the others text files have to be open with "Draw.io", but like "normal" text file (for example with vim).
Is it possible?
An easy semi-solution is to rt-click-> Open with -> pick your program but don't set it as the default; you other text files will continue to open with the default programs but your program will be on the rt-click->'open with' list. (This might be the same as what donaldduck said...?)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: How to always open a *specific filename* with a program (not *specific type*)
I'd do what donalduck suggested - stick a launcher on your desktop.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: How to always open a *specific filename* with a program (not *specific type*)
It can have extension, or not. the program doesn't care in fact since it looks inside the file directly, whatever the extension is.Kadaitcha Man wrote: ⤴Tue May 18, 2021 3:08 amMaybe yes, maybe no.
Your post is missing some detail. Whether or not the file has its own extension, and if so, what it is, and if not, an example of the file name with extension, and details about what you've tried so far.
I've tried nothing for the moment.
Re: How to always open a *specific filename* with a program (not *specific type*)
The post is in "Cinnamon", so my Desktop environment is cinnamon.
It opens the file with the chosen application, but only for one time. Next time I click, it opens it like a text file. I guess it's because "Always open..." wasn't checked. But if I check it, ALL the text files open with the chosen program (what I don't want).donalduck wrote: ⤴Tue May 18, 2021 3:59 am one possible workaround in mate:
right-click your specific file, "open with" your application (and don't forget not to leave on "always open ...")
within a terminal note the exact command line ps -ef
then on the desktop right-click and choose to create a launcher, with this command line, example:
mate_launcher_2021-05-18.png
Re: How to always open a *specific filename* with a program (not *specific type*)
(as written above) It's a one-time solution: the next time I double click on the file, it opens with the usual program chosen for text file.Flemur wrote: ⤴Tue May 18, 2021 9:18 am An easy semi-solution is to rt-click-> Open with -> pick your program but don't set it as the default; you other text files will continue to open with the default programs but your program will be on the rt-click->'open with' list. (This might be the same as what donaldduck said...?)
Re: How to always open a *specific filename* with a program (not *specific type*)
It's not a one-time solution; it puts your program in the the "open with" list of programs so it's easy to access...it's just not as easy as "Open". Some file-browsers might be friendlier about this than others.ThePhi wrote: ⤴Tue May 18, 2021 11:41 pm(as written above) It's a one-time solution: the next time I double click on the file, it opens with the usual program chosen for text file.Flemur wrote: ⤴Tue May 18, 2021 9:18 am An easy semi-solution is to rt-click-> Open with -> pick your program but don't set it as the default; you other text files will continue to open with the default programs but your program will be on the rt-click->'open with' list. (This might be the same as what donaldduck said...?)
Edit: Open a text file with "my-program":
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: How to always open a *specific filename* with a program (not *specific type*)
Ok, I get what you mean. It's better than nothing...Flemur wrote: ⤴Wed May 19, 2021 7:55 am It's not a one-time solution; it puts your program in the the "open with" list of programs so it's easy to access...it's just not as easy as "Open". Some file-browsers might be friendlier about this than others.
Edit: Open a text file with "my-program":
my-program.jpg
For a precision, here how it works:
I needed to select AT LEAST ONE TIME "always open with" my specific program for a file type. Then, I switch back to the normal program in "always open with".
Only at this condition does the specific program appears in the list.
Re: How to always open a *specific filename* with a program (not *specific type*)
You don't need to do that with thunar or pcmanfm; just the single "Open with" puts it on the list without changing the default.ThePhi wrote: ⤴Thu May 20, 2021 1:58 pm For a precision, here how it works:
I needed to select AT LEAST ONE TIME "always open with" my specific program for a file type. Then, I switch back to the normal program in "always open with".
Only at this condition does the specific program appears in the list.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: How to always open a *specific filename* with a program (not *specific type*)
Ah? Okay, good to know. I'm on Dolphin, I guess it behaves differently (i have thunar installed also though but I prefer Dolphin)