Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [xdg-open]

xdg-open is a tool from the FreeDesktop project. xdg-open accepts both filenames and URLs as arguments; when invoked, it will open the given argument in the user's preferred application for handling that file type or URL. xdg-open is desktop-independent.

1
vote
0answers
11 views

Using glob mime types in mimeapps.list for use with xdg-open?

With xdg-open I would like to open all image files with shotwell, even risking that it may complain about files types it does not know about. I added [Default Applications] image/png=shotwell....
0
votes
0answers
112 views

What is the correct way to associate MIME type with applications that have multiple desktop entries?

Description Applications in GUI environments represented by desktop entries (files with the desktop extension) can include a key called MimeType for supported MIME types for that application. Some ...
1
vote
0answers
34 views

Chrome opens a second Transmission window with magnet links. How does it check if there is a transmission open or not?

The magnet link is correctly set with xdg-mime to open in transmission, and also in .local/share/applications/mimeapps.list. If transmission is NOT running, everything works as expected (click a ...
0
votes
1answer
425 views

Create a custom URL Protocol Handler

I would like to register a URL scheme (or protocol) handler for my own custom URL protocol, so that clicking on a link with this custom protocol will execute a command on that URL. Which steps do I ...
0
votes
2answers
2k views

How to open an .png type image in Linux terminal?

I just can't find the command to display a *.png image! I tried xdg-open command but it failed: [student@seqpapl1 Images]$ xdg-open adapter_content.png xdg-open: no method available for opening '...
0
votes
1answer
49 views

How to raise the system native OpenWith dialog for a particular file?

The xdg-open command opens a file specified with the default app associated with the type. Is there an alternative that would raise the system native application choice dialog (which pops up when you ...
0
votes
0answers
23 views

xdg-open tries to open URLs as files on LXDE [duplicate]

I run $ xdg-open 'http://google.com' in /home/rominf/ and expect Firefox to open Google, but instead got GUI message with error: /home/rominf/http:/google.com: No such file or directory Firefox is ...
0
votes
1answer
144 views

Use crontab to start AnyDesk

I am using AnyDesk on a Raspberry Pi 3. After around 6-7 days, it suddenly consumes all the memory and the device stops responding. To prevent this, I am using crontab to execute /usr/bin/killall ...
2
votes
0answers
1k views

Open xdg-open to download files not working on google-chrome [closed]

I am having google-chrome(69.0.3497.100) on Debian Stretch, whenever I try to download some files by clicking on the download link there will a popup Open xdg-open and when I click on yes option ...
1
vote
1answer
256 views

How can I set application for unknown file on xdg-open?

On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications. $ xdg-mime query filetype jquery.js application/javascript $ xdg-mime query default ...
2
votes
0answers
234 views

How to make xdg-open follow mailcap settings in Debian

tl;dr: In Debian xdg-open (through xdg-mime) does not follow the mailcap specifications used by run-mailcap which I prefer to use. Is there some systematic way to make xdg-open follow the mailcap ...
1
vote
1answer
263 views

What's the right way to add directories to XDG_DATA_DIRS?

I've installed some app under /opt/myapp, which has a /opt/myapp/share directory. As I finish installing, it tells me: Note that '/opt/myapp/share' is not in the search path set by the XDG_DATA_HOME ...
0
votes
0answers
104 views

xdg-open launches both hexchat and firefox

I recently noticed that when I click an irc:// link in my browser (Chromium), it launches HexChat, and when I close HexChat, it will launch Firefox. Suspicious that it might be something wrong with ...
1
vote
1answer
617 views

Cannot set default application for xdg-open

I am trying to make gthumb the default when opening png files from the terminal $ xdg-mime default ~/.gnome/apps/gthumb.desktop image/png I created this symlink: $ ls -l ~/.gnome/apps/gthumb....
2
votes
2answers
653 views

xdg-open on debian 9 fails to open browser

I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message; Quite strange as you can see, it's prepending the ...
2
votes
1answer
203 views

xdg-open block until spawned process is killed

I have a lot of documents to view, and I'd like to view them one by one, so the next opens when I close the previous. I've done this with evince before, with for i in `ls | grep .pdf`; do evince $i; ...
1
vote
0answers
48 views

Use xdg-open to set cookie or post data

I use debian with gnome, and I often use xdg-open to launch my broswer on differents websites. I know xdg-open is intended to use system's default application for argument's registered purpose, be it ...
0
votes
1answer
375 views

xdg-open opens a specified htm file but ignores the tag (#) location within the page

I have a function in a bash script (openWebPage) which I want to open a web page and navigate to an id tag within the page. The url components are held in variables PIXPAGE="/home/bu5hman/pix/...
0
votes
0answers
165 views

make Firefox respect XDG MIME association

I have a website that serves dynamic eml / mbox files with a content type of message/rfc822. To open them in the MUA, I have the MIME type associated: $ xdg-mime query default message/rfc822 mutt-...
3
votes
0answers
195 views

Why does xdg-open use Mendeley as default for PDFs?

Similar to this question, I have some applications (Calibre, texdoc) open PDFs with Mendeley. Opening PDFs from Thunar, Thunderbird, Firefox etc. opens evince, the expected default. It seems that ...
4
votes
1answer
1k views

Is there something like an “xdg-close” - opposite of xdg-open?

Sometimes I xdg-open somefile.ext from a terminal session, but then I want to be able to close the application or viewer that opened, later on. I was hoping there might be something like an xdg-close, ...
3
votes
1answer
1k views

How to set the default web browser used to open URLs under i3?

I have tried to set my default browser for opening URLs to Chromium using: xdg-settings set default-web-browser chromium.desktop (yes I checked out whether /usr/share/applications/chromium.desktop ...
0
votes
1answer
329 views

Comments in ~/.config/mimeapps.list

I want to add comments in my ~/.config/mimeapps.list file. How do I do this? Chapter and verse preferred as errors seem to be silently ignored.
1
vote
2answers
366 views

Syntax check ~/.config/mimeapps.list

Is there a way of checking for syntax errors in ~/.config/mimeapps.list? Errors seem to be silently ignored: I added fdsobojaba to the bottom of the file I ran xdg-open on an existing file There was ...
1
vote
0answers
159 views

List all filename extension associations for a given program

Is there a way of getting all xdg-open's file name extensions that are associated with a given application, eg: .html -> firefox.desktop .htm -> firefox.desktop
3
votes
0answers
142 views

xdg-open keeps using Konqueror

$ xdg-settings --list Known properties: default-url-scheme-handler Default handler for URL scheme default-web-browser Default web browser $ xdg-settings get default-web-browser google-...
1
vote
0answers
287 views

How can I open a MIME-formatted file?

On several distributions of Linux, there is a utility called xdg-open, which opens a file in the default application for that particular file type. E.g., for HTML files, it might open firefox. A MIME-...
2
votes
1answer
3k 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
2answers
152 views

xdg-open backend

I'm creating a desktop for Linux. As a result, I'm creating a utility called ts-open. However, when xdg-open is run, I want it to open ts-open when it detects that my desktop is running (just like it ...
1
vote
0answers
39 views

Set default application based on filename not mimetype

I want to define an application for opening files based on the filename. For example I want a file called Gemfile or Dockerfile to be opened with sublime or atom. I know I can use the mime-type but ...
2
votes
1answer
2k views

Can't change the xdg-open url-handler to firefox

My problem is that many programs call xdg-open to open websites but on my manjaro system (arch based) this is somehow bound to cups :) When such a call to xdg-open happens, the cpu-usage goes up a ...
1
vote
0answers
379 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. ...
5
votes
1answer
6k views

How can I run a .desktop file?

I'm trying to write a script that launches the default application for a given mime type. For example, I would like to say my-script text/plain and have it open KWrite for me. What I know is that you ...
3
votes
1answer
113 views

Why does xdg-open remove @ from a URI if it's the first character in the path?

I'm trying to get xdg-open to properly handle URIs with the pattern of ob://@username but it seems that xdg-open is stripping the @ symbol. Is there someway to prevent this without modifying xdg-open ...
10
votes
2answers
5k views

Find the default application for a certain extension

Given xdg-open and an extension, is there a way to get the application which xdg-open is set to for that particular extension? For example given xdg-open and .jpg the result is eog.
6
votes
1answer
636 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: ...
0
votes
1answer
231 views

XDG resolves filename as text/plain

I have a MIME definition file which is installed as part of a package: $ rpm -ql virt-viewer | grep mime /usr/share/mime/packages/virt-viewer-mime.xml $ cat /usr/share/mime/packages/virt-viewer-mime....
3
votes
1answer
277 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 ...
1
vote
0answers
840 views

Front-end to `~/.config/mimeapps.list`

SOLVED: Apparently, Xfce does not use ~/.config/mimeapps.list anyway, because even though ~/.config/mimeapps.list names Firefox as the default browser, links open in Chromium. Is there a front-end ...
2
votes
1answer
485 views

How can I change the order in which update-desktop-database puts the applications supporting a mimetype?

I am running manjaro linux which is built on top of Arch Linux. I use cinnamon desktop environment occasionally and Awesome for the rest. I am trying to figure out how I can get the system to choose ...
16
votes
2answers
16k views

How does the xdg-open command know which application to use to open a file?

I would expect xdg-open command to use the same application that opens when I double-click the file in the default file manager, but this is not always true. For example my DE is XFCE, my file ...
3
votes
1answer
2k views

How can I open all urls in my browser with xdg-open?

xdg-open opens normal web pages in Firefox, such as xdg-open http://google.com. However, images do not. For example, xdg-open https://i.imgur.com/JfKwovX.jpg opens the image in Gwenview. I tried ...
4
votes
1answer
156 views

Firefox tries to open TeX files with wined notepad

I am using Arch Linux. Each time I download a TeX file, Firefox suggest me to open it with notepad (which is installed through wine). Why? $ xdg-mime query filetype Random-file.tex text/x-tex $ xdg-...
5
votes
1answer
1k views

kioclient KMimeTypeRepository::parents: “/usr/share/mime/subclasses” refers to unknown mimetype “application/vnd.ms-excel…”

Whenever I open something with xdg-open in my new OpenSUSE 13.2 install, I am spammed by a sequence of warnings like $ xdg-open ./flask.wsgi kioclient(10634) KMimeTypeRepository::parents: "/usr/...
4
votes
1answer
459 views

Why does xdg-open use Firefox rather than the default app according to xdg-mime?

$ xdg-mime query filetype my-time-sheet.ods application/vnd.oasis.opendocument.spreadsheet $ xdg-mime query default application/vnd.oasis.opendocument.spreadsheet calc.desktop calc.desktop $ xdg-...
3
votes
1answer
1k views

How does filetype determination by filename extension in addition to XDG spec (mimeapps.list) work

I'm trying to set the default application for R noweb files but fail to find the place where this is specified. The reason for this is that my file managers seem to determine the file type by filename ...
3
votes
1answer
394 views

Why do desktop environments make custom xdg-open replacements?

Related to this answer on my previous question. So, XDG can handle it on its own: It can manage default applications - xdg-mime It can open file with associated application - xdg-open. Why do ...
8
votes
2answers
4k views

Set default xdg-open application to terminal program

Is it possible to use terminal vim with xdg-open? I don't have a GUI text editor because I only use vim through the terminal. (I don't care very much for gvim either.) Is it possible to tell xdg-open ...
3
votes
1answer
730 views

xdg-open doesn't handle percent encoded “file:///” urls with LXDE

I noticed that xdg-open doesn't handle percent encoded urls. For example, these lines will succeed (provided the files exist): xdg-open "/home/sashoalm/Has Spaces.txt" xdg-open file:///home/sashoalm/...
4
votes
0answers
924 views

xdg-open just opens Nautilus [closed]

I'm running Fedora 20 with Gnome 3.12. Recently, I installed KDE via yum but decided to stick with Gnome. Ever since installing KDE, the xdg-open and gnome-open commands do not open files with the ...