Questions tagged [file-opening]

How to open files in the desired application.

Use this tag for questions about causing a file to be opened in the desired application, e.g. via file name associations.

For questions about dealing with files that are currently opened in a program, see .

45 questions
56
votes
8 answers

How are file types known if not from file suffix?

I would like to know how file types are known if filenames don't have suffixes. For example, a file named myfile could be binary or text to start with, how does the system know if the file is binary or text?
Niklas Rosencrantz
  • 4,112
  • 6
  • 36
  • 58
43
votes
6 answers

How does Linux choose which application to open a file?

If a file tells the OS its file format, how does the OS choose which application to open it by default? In Windows, is the association stored in the registry table? How does Linux choose which application to open a file? I used to use Nautilus a…
Tim
  • 98,580
  • 191
  • 570
  • 977
32
votes
4 answers

Opening current directory from a terminal onto a file browser?

My current directory is buried deep in multiple subfolder layers from my home directory. If I want to open this directory in a gui-based file browser, I have to double click folder after folder to reach it. This is very time consuming. On the…
Paul
  • 9,163
  • 12
  • 32
  • 30
24
votes
4 answers

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

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…
modulitos
  • 3,097
  • 8
  • 29
  • 44
21
votes
4 answers

`open` command to open a file in an application

Why can't I run this command in my terminal: open index.html Wasn't it supposed open this file on my browser? Also can't I run this command: open index.html -a "Sublime Text". The result of these commands are: $ open index.html Couldn't get a file…
Edgar Oliveira
  • 1,941
  • 3
  • 11
  • 12
20
votes
8 answers

Use xdg-open to open a url with a new process

I'm starting to experiment with Crunchbang (which is based on Debian, and uses terminator) as a web development environment, and one of the things I am struggling with is the behaviour of xdg-open. I come from an OSX background, so forgive me if…
Nick Tomlin
  • 442
  • 1
  • 4
  • 10
15
votes
2 answers

Where does firefox get the “default” applications for opening files from?

By default, the Firefox (33.0) on my FreeBSD 11.0-CURRENT has the default application for opening PDF files set to Inkscape. Firefox does remember my previous choice, evince, in the “What should Firefox do with this file?” dialog, so until recently…
Anaphory
  • 692
  • 1
  • 5
  • 17
14
votes
2 answers

How to open any file through the command line?

I would like to know if there is a command to open any file in Linux independently of their extension, just as if you were double-clicking it.
Carl Rojas
  • 1,049
  • 4
  • 14
  • 27
14
votes
2 answers

Make Firefox use xdg-open for opening files

Is there any way to force Firefox to use system-wide defaults, i.e. xdg-open for opening all types of files?
marmistrz
  • 2,732
  • 4
  • 23
  • 30
11
votes
2 answers

Prevent the Gtk file dialog from listing mount points

When I open the Gtk file dialog, there is a box called “Places” on the left-hand side which lists “Search”, “Recently Used”, a bunch of directories, and several things that appear to be volumes. I don't care about any of these entries, but for the…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
8
votes
1 answer

How to find/remove file associations for a certain program in KDE

I had a program installed on my Kubuntu system that was able to open a lot of different graphics file types and registered as default program for many of those file types. I have unistalled the program, but in the file associations it is still…
Benedikt Bauer
  • 499
  • 1
  • 7
  • 17
7
votes
2 answers

If I open the same file twice in Okular, switch to the existing window

I have always been confused why the file manager in Linux cannot stop applications from opening a single file twice at the same time? Specifically, I want to stop the PDF file reader Okular from opening the file A.pdf again when I have already…
lovelyzlf
  • 113
  • 1
  • 6
6
votes
1 answer

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: gnome-open, gvfs-open, xdg-open, ... Which one(s)…
python dude
  • 163
  • 4
6
votes
1 answer

How an application is chosen over others to open a particular filetype in Linux

Earlier my text/xml files were by default opened by firefox I think. Not sure of this because I do not remember exactly. Then I think I installed geany and then my text/xml files were always by default opened by Geany until I installed…
bluefoggy
  • 662
  • 4
  • 9
6
votes
2 answers

How to find out which program can open a given file?

Let's say I have a file thesis.pdf or picture.jpg Is there a command which returns a program to open this file with? I am aware of the command file, but it just returns the correct type of the file (I know that this is not specified by its…
schrobe
  • 698
  • 5
  • 8
1
2 3