Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [file-opening]

How to open files in the desired application.

Filter by
Sorted by
Tagged with
0 votes
0 answers
87 views

EOVERFLOW when opening any file for writing

I'm writing a custom container engine. When I attempt to open any file for writing somewhere in the container (as long as that place is writeable, permissions-wise), I get an EOVERFLOW error (Value ...
pxeger's user avatar
  • 134
2 votes
2 answers
739 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 ...
ychaouche's user avatar
  • 998
1 vote
1 answer
289 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 ...
ceremcem's user avatar
  • 2,361
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 ...
K Split X's user avatar
  • 1,733
1 vote
1 answer
239 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 ...
einpoklum's user avatar
  • 9,595
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 ...
Noitidart's user avatar
  • 307
1 vote
1 answer
553 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, ...
Hrvoje T's user avatar
  • 1,031
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 --...
Martin Monperrus's user avatar
1 vote
0 answers
711 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. ...
71GA's user avatar
  • 1,156
3 votes
1 answer
434 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 ...
gornvix's user avatar
  • 473
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: ...
python dude's user avatar
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 ...
atevm's user avatar
  • 287
1 vote
0 answers
43 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 ...
ceremcem's user avatar
  • 2,361
2 votes
1 answer
236 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 ...
KIDJourney's user avatar
2 votes
1 answer
575 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 ...
Sebastian Wagner's user avatar
7 votes
3 answers
22k 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....
Shivam Aggarwal's user avatar
5 votes
2 answers
3k views

Change default web browser to lynx from terminal

I'm on Linux Mint Olivia. I just installed Lynx. How do I set Lynx as my browser, so when I open links from the terminal, they open in that terminal with Lynx?
user193661's user avatar
25 votes
4 answers
76k views

`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 ...
Edgar Oliveira's user avatar
2 votes
0 answers
138 views

Set default program for one specific file in Nemo

There's a lot of questions on how to change the default program for a specific file extension, but I want to know if I can change the default program for a specific file. Reason: Some PDFs don't ...
FearfulAnon's user avatar
33 votes
4 answers
115k views

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 ...
Paul's user avatar
  • 9,513
2 votes
2 answers
284 views

Linux Fedora: How to open a file with a random application

I downloaded a cross-assembler that as far I can tell, i am supposed to open a .txt file with it and the assembler will create an a.out file somewhere. But Fedora only lets me open .txt files with ...
mosesturner's user avatar
2 votes
1 answer
387 views

How to change programs used to handle files in Calibre in Debian

I have recently installed Calibre, and it works great, however I have some problems with handling of files by this program: Folders open in baobab. To open folder I just need to click on a book and ...
jb.'s user avatar
  • 719
2 votes
1 answer
207 views

Disable breadcrumb navigation in KDE

I want to copy the file path from a file open dialog, but can't because of breadcrumb-style navigation. There's no option in the dialog itself to switch between breadcrumb and address bar. I want to ...
Mike Dannyboy's user avatar
15 votes
2 answers
61k views

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's user avatar
  • 1,079
4 votes
2 answers
7k views

Which config-file stores file associations in KDE/Plasma?

With the 15.04 release of Kubuntu, I switched from Gnome (Ubuntu) to KDE/Plasma. I did a clean install, while keeping my home directory. Now, libreoffice (mostly Calc) seems to be associated with ...
burnpanck's user avatar
  • 143
56 votes
8 answers
7k views

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 ...
Niklas Rosencrantz's user avatar
2 votes
2 answers
4k views

KDE opens .deb files with ar instead of a package manager

I just installed Debian for the first time. I use KDE. I'm trying to install Google Chrome and Steam. I download the installation package, then I double-click it. Instead of installing, both display ...
Villa Caleb's user avatar
11 votes
2 answers
2k views

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'...
Gilles 'SO- stop being evil''s user avatar
5 votes
0 answers
308 views

programmatically alter kde file associations

Problem: In kde I want to remove a particular file association from every file type Details: I wanted to try out clamTk as a companion to clamAv. It didn't suit my needs so I uninstalled the ...
Wolf's user avatar
  • 91
14 votes
2 answers
9k views

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's user avatar
  • 2,742
2 votes
1 answer
654 views

How to change my file/url association across all my DM/WM without using the GUI?

I have installed several Desktop Managers and Window Managers, and changing the file association can become a mess. I need some foolproof method which can allow me to change my user or system file ...
Braiam's user avatar
  • 36.1k
8 votes
1 answer
3k views

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 ...
Benedikt Bauer's user avatar
15 votes
3 answers
11k views

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 ...
Anaphory's user avatar
  • 712
6 votes
1 answer
3k views

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 ...
bluefoggy's user avatar
  • 662
4 votes
1 answer
1k views

Files are opened by wrong applications if opened from a number of programs

History: I had problems with mime associations under Firefox. Firefox opened downloaded files with wrong programs. I deleted ~/.local/share/applications/mimeapps.list and now it works. Now I noticed ...
Marco Sulla's user avatar
-1 votes
2 answers
514 views

Reading file with different formats [duplicate]

I am a new user to Linux. I have several files and documents in my directory and sometimes when I want to read or display data in these files, I do not know which command I need to type for this ...
user1's user avatar
  • 1
43 votes
6 answers
21k views

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 ...
Tim's user avatar
  • 102k
6 votes
2 answers
2k views

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 ...
schrobe's user avatar
  • 698
24 votes
4 answers
16k views

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 ...
modulitos's user avatar
  • 3,165
2 votes
1 answer
2k views

Open file with default program and wait until the app is terminated [closed]

I want to open a text file from the command line with the default application. During that time the default app is opened, the terminal must be disabled (cannot execute another command). For example, ...
Blake's user avatar
  • 153
7 votes
2 answers
4k views

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 ...
lovelyzlf's user avatar
  • 113
3 votes
2 answers
1k views

Configuring Org-mode to open PDFs with evince

I'm starting to use org-mode to export text to LaTeX. My problem is that it opens the generated PDF with ebook-viewer (it is a EPUB, CHM reader) instead of using evince. Question Does anyone know ...
Dox's user avatar
  • 241
3 votes
4 answers
6k views

ranger: open many files with mplayer

I use the file explorer called ranger and I wonder if it is possible to open many files in different directory with mplayer? What I can already do is to select all the files (pressing v) from one ...
PinkFloyd's user avatar
  • 429
21 votes
8 answers
29k views

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 ...
Nick Tomlin's user avatar
4 votes
6 answers
17k views

File extensions and association with programs in linux

In windows we can associate a file's extension with programs. E.g. a file test.pl can be run by the installed Perl interpreter due to the pl extension. In linux though it needs #!/usr/bin/perl as the ...
Cratylus's user avatar
  • 519
3 votes
1 answer
1k views

Open any kind of application with BASH

I have made a Java program that could open any application. Suppose there is a file name "*.jpg", the it would allow the OS to recognize the type of application and then open the default application. ...
Pranit Bauva's user avatar