Questions tagged [file-opening]
How to open files in the desired application.
45 questions
4
votes
2
answers
1k
views
How do I open a file at specific line in a running emacs?
emacs can be run from the command line to open a file at line n with a +n command line argument like so :
$ emacs +n file
I'd like to do the same from a running emacs instance, either via find-file ...
1
vote
1
answer
377
views
How to set Open File Dialog path explicitly?
Description
I'd like to point a folder so any application will start its "File Open Dialog" in it. How can I do that?
Rationale
I'm naturally using many applications while working on a ...
3
votes
4
answers
2k
views
Open any .c file with Sublime Text using a terminal command
The IDE that I use is Sublime Text 3.
If I want to open a file through a terminal with Sublime Text, I have to type:
subl <file>.c
I want to edit my .bashrc so that any .c file automatically ...
1
vote
1
answer
267
views
Canonical way to simulate a file manager "open item" from the command line
Almost every desktop environment has a mechanism for determining what to do when you (double)-click a file in file manager/explorer windows. This can be based on the extension, or on whatever file ...
3
votes
1
answer
10k
views
Launch executable with xdg-open
I am trying to write a function launchSystemFile which works like windows ShellExecuteEx from the command line or from C++.
If I ShellExecuteEx a blah.txt it opens it in the default editor.
If I ...
1
vote
1
answer
593
views
How to automatically open terminal window when I click a script?
My Python script has an interpreter in a first line. The file is executable. Is it possible that I click on my script and the terminal windows opens, executes the script and stays open?
Right now, ...
2
votes
1
answer
2k
views
What is the selected application for XFCE's exo-open?
Under XFCE, xdg-open calls exo-open.
When exo-open is called with --launch is uses the application set with xfce4-settings-manager.
However, when one calls exo-open foo.txt (local path, without --...
1
vote
0
answers
789
views
Universal file association file
I am using multiple desktops / windows managers (KDE, Openbox wm, and i3 wm ) on my PC and I want to establish an unified and universal file where I would set file associations for my whole system.
...
3
votes
1
answer
459
views
Can I add the Twig file type to Linux?
I generally give Twig files a "twig" extension. As I understand it these Twig files are usually recognised as HTML like files by Linux using some sort of scan algorithm. So Nemo for example ...
6
votes
1
answer
1k
views
What program to use to open files? (gnome-open, gvfs-open, xdg-open, etc.)
I have a Java program that runs on Linux, and from within the program, I want to open files (e.g. PDF files) with the system's native viewer. There are various programs available for this purpose: ...
2
votes
1
answer
1k
views
Where mimeopen saves default app config?
I associated pdf with Okular using mimeopen. Then I became curious where it had saved the configuration. My first guess was:
$HOME/.config/mimeapps.list
but it didn't contain the right entry. So I ...
1
vote
0
answers
57
views
Directory of the "open files dialog" in Kicad
I need to make an application (Kicad, in this context) launch its "Open File" dialog in current working directory (where I launched Kicad).
Is there any standard environment variable for this ...
2
votes
1
answer
258
views
Is there any way to detect file type and open it with GUI in terminal in Fedora? [duplicate]
For example , there are two files a.ppt and b.jpg .
And I can call a magic method to open them appropriately just like :
magic_method a.ppt
magic_method b.jpg
And it open libreoffice writer and ...
2
votes
1
answer
648
views
Is there a FreeDesktop command to open an open-with dialog similar to xdg-open?
is there a (FreeDesktop) Linux command to open an "open-with" dialog similar to xdg-open?
I'm searching for some general desktop environment independent solution for showing something like this:
Of ...
7
votes
3
answers
23k
views
Why does linux use file extension to decide the default program for opening a file though it's independent of file extensions
I have a text file as- abc.text and it has its contents as Hi I'm a text file.
If I double click to open this file, then the files is opened in gedit editor.
Whereas, if I rename the file to abc....