Xdg-open is part of the xdg-utils package. When invoked from the command-line it can open any file in the default application or an url in the default browser.

learn more… | top users | synonyms

19
votes
2answers
13k views

How do I set a new xdg-open setting?

I want to use xdg-open to open irc:// links, how can I make the required parameter?
16
votes
6answers
60k views

How do I open a file from inside a bash script?

Ok, so running gedit myfile.txt works well. But what about opening a file from inside a bash script, using the default desktop app linked to the filetype? I've tried below, which works great when run ...
14
votes
4answers
23k views

How to set which application is launched by xdg-open?

I have run update-alternatives as well as gnome preffered apps selection thing. And all point to have chromium browser as default. Yet when I run xdg-open http://askubuntu.com firefox is launched! ...
9
votes
5answers
897 views

Files lens and xdg-open only open nautilus but not the correct applicatiion

since some days my Files lens opens only nautilus but not the correct application which is associated with the file extension. For example, if I choose a PDF file, Nautilus is openend, pointing to ...
9
votes
6answers
3k views

how to open multiple files with the default program from terminal?

I tried to open all my .mp3 files from a folder using xdg-open but I found out it opens just one! So I searched a little but there was not such a question! I found "evince" but apparently it open ...
6
votes
1answer
17k views

How to reset external protocol handler in Chrome?

A while back I selected "Do nothing" when Chrome asked me how to handle a specific url. Now I want Chrome to launch xdg-open, which again can launch the correct application, but I can't figure out how ...
6
votes
1answer
1k views

xdg-open only opens a new tab in a new Chromium window despite passing it a URL

When I am using xdg-open to open a link in Chromium, it just results in a new Chromium window with only the new tab page, with nothing else. For example, xdg-open 'https://askubuntu.com' will just ...
6
votes
1answer
4k views

How to change file association for files opened in Dolphin from command line in GNOME?

I would like to change several default applications for files opened in Dolphin. I know I could do it manually with kcmshell4 filetypes, keditfiletype or however else but is there a way how to change ...
6
votes
2answers
565 views

xdg-open file.cbz opens nautilus? [duplicate]

I'm using Calibre and it seems that it uses xdg-open to open files. This, even when tried in terminal, only opens nautilus and the file is selected, but not opened. It doesn't matter if I try to open ....
4
votes
2answers
147 views

xdg-open stopped working since 16.04 upgrade

xdg-mime query default inode/directory correctly gives me: nemo.desktop like I expect, and want it to. But xdg-open $HOME Gives an error: xdg-mime: mimetype argument missing Try 'xdg-mime --...
4
votes
2answers
652 views

Launch Webapps in custom browser

I'm using Google Chrome as default web-browser because i need Flash ang i've installed Firefox back to use with Webapps, because Chromium, that i tried to use before, launched through script, taking ...
3
votes
3answers
3k views

Open magnet links from Chrome into KTorrent

I'm trying to open magnet links from Chrome into KTorrent 4.3.1 on Kubuntu 13.10. The problem is that after i click the link, a new notification appears. It says "Examining magnet://..." and will run ...
3
votes
1answer
2k views

How can I open irc:// links in Pidgin from Chromium?

I want to open irc:// links in pidgin from chromium. When i am logged-in to a irc server(irc.freenode.net) running purple-url-handler irc://irc.freenode.net/#ubuntu in terminal works fine. But when ...
3
votes
1answer
153 views

How to make xdg-open to use kde-open instead of gvfs-open?

I have both gnome and KDE installed in my Ubuntu, but mostly I use KDE. When I execute: xdg-open <folder_name> it runs nautilus instead of dolphin (as gvfs-open also do). It seems to me ...
3
votes
2answers
11k views

Open file from terminal in specific application

I use xdg-open a lot in the terminal; this opens a file in the default application. However, sometimes I'd like to open a file in a different (non-default) application. Is there a way to achieve this ...
3
votes
1answer
53 views

Where to change how xdg-open opens urls? sync with kde-open?

kde-open "http://askubuntu.com/" is nice, and opens the URL in my webbrowser but xdg-open "http://askubuntu.com/" opens the link in my texteditor :-( I know where I find the file-association in ...
3
votes
1answer
359 views

How to handle google chrome external protocol when your software is on wine?

My problem is this: I have a software installed with Wine (Brain Explorer 2, it's free); certain functions of this software requires using the browser (in this case google chrome; firefox isn't an ...
3
votes
1answer
60 views

How can I prevent software from becoming default?

I recently installed SMPlayer and it became default without even asking, is there a way to prevent software doing this?
3
votes
0answers
285 views

Force firefox to use xdg-open to open downloaded files

Firefox in Kubuntu is broken, as it don't follows the system default applications that I can configure using "file associations" in the KDE Control Module. For example, it wants to open folders with ...
2
votes
3answers
5k views

How can I start Nautilus on Xubuntu / XFCE via the shortcuts in the XFCE panels?

I am on Xubuntu 13.10 and just installed and activated Nautilus as the default file manager. I'd like to use the current default file manager (whichever that might be) when I click on my panel ...
2
votes
1answer
1k views

telnet://IP from Firefox and Chrome

I have a problem initiating telnet sessions (telnet://IP) from Firefox and Chrome. With Chrome I have the following problem: When I click the telnet link, appears the "External Protocol Request" ...
2
votes
1answer
106 views

How to make ubuntu realize application type?

I made a text editor for Ubuntu in Java, and now I want to upload it on the Ubuntu Software Center but I have ran into a problem, how will Ubuntu recognize that my application is an editor once people ...
2
votes
1answer
528 views

txmt URL Handler for Chromium does not work

I used the instructions in the answer to this question but it won't open when I click those links in my browser. I can go to terminal, and type xdg-open and then paste the txmt link, and it will work, ...
2
votes
1answer
860 views

In Ubuntu, xdg-open command is not working

I'm new with Ubuntu, and I read in another thread that to open a file in the default editor (gedit for me), I need to run xdg-open, but for some reason, when I run the command xdg-open app.js I'm ...
2
votes
1answer
1k views

Cant open magnet links or APT links with Chromium

Chromium browser opens a new window instead of handling magnet links or APT links. I've tried looking aroud and found How to tell chrome what to do with a magnet link But it doesnt work for me .. I've ...
2
votes
1answer
271 views

How to enable javascript on xdg-open

I am trying to open a url using xdg-open but the terminal says, So how do I enable the javascript?
2
votes
1answer
165 views

Run script instead of opening Application (xdg-mime, gvfs-mime)

following this little hack, my goal is to upload any magnet link to my "remote" Desktop PC: https://blog.flo.cx/2011/02/how-to-open-magnet-links-on-a-remote-transmission-daemon-with-one-click/ ...
2
votes
0answers
254 views

Why does Synapse use Nautilus for all file types instead of the default application?

No matter which file I find via Synapse, it just gets opened in Nautilus. May that be because I recently put Nautilus as my default file manager? Can I change that behavior to the normal action, i.e....
2
votes
0answers
510 views

Chromium not opening URLs [closed]

I have installed the nightly build of Chromium using this script I created. I have set it as default web browser, although opening URLs via gnome-open and xdg-open just opens a new tab. Using the ...
1
vote
1answer
417 views

file command reports text/plain for .css file

I'm trying to get xdg-open to open css files with correct editor, but can't get file to report correct mimetype for a file.css file. There is an entry both in /etc/mime.types and a file already exist ...
1
vote
1answer
136 views

How to set image open-with via terminal?

I am running openbox and so do not have access to standard Ubuntu control panel, but must set everything from the terminal. When I download an image in chrome and click open, it launches xdg-open ...
1
vote
1answer
295 views

start an application based on extension not protocol (using xdg-open)

When I do xdg-open demo.odt Libre Office opens - as it should. When I do xdg-open http://askubuntu.com my browser opens - as it should. But now I'd like to have a command where I do mime-based-...
1
vote
0answers
63 views

Spotify xdg-open fails, while doing the same open directly works

When I execute spotify spotify:track:7u9Vkw4xWtGNjao5uz3fJV, I can freely listen to the linked track. But doing xdg-open spotify:track:7u9Vkw4xWtGNjao5uz3fJV, I get "Link not found" error in Spotify....
1
vote
0answers
171 views

xdg-open: chrome/chromium/opera

I have written an application that makes use of the pocket API. Currently the login is done inside a custom webframe of the application itself. But I want to use the default browser for this. ...
1
vote
0answers
134 views

Set the terminal title in a .desktop started application

I've an application that I want to start via an entry in the upper gnome panel using a .desktop file, it has to run inside a terminal. #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=...
1
vote
0answers
55 views

Text files open in Nautilus instead of Text Editor [duplicate]

When I try to open a "plain text document" (no file extension) it opens its folder in the file manager (Nautilus), instead of opening the file in my text editor. This happens when I open it through ...
1
vote
1answer
521 views

Menus (eg, right-click windows) are not being drawn on the screen

The "context menus" which normally show up on right-click, as well as other pull-downs (for example evince's resize screen or any program's at-the-top menu pulldowns) are invisible. This is Ubuntu 12....
1
vote
1answer
122 views

Why does Ubuntu opens the folder cointaining the file instead the file itself?

When I'm trying to open a file via search in the Ubuntu Dash or asking Chrome to open downloaded file, Nautilus opens a window containing this file instead of opening file in a related application. ...
1
vote
1answer
352 views

Is there a way to open a page in the browser in the background, UNFOCUSED, from the command line?

For those familiar with OSX, the behavior I'm looking for is open -g http://google.com, which will open a google webpage in the default browser in the background, without switching focus to it at all. ...
1
vote
0answers
465 views

How to set up uri / magnet links.(xdg-open) [duplicate]

Possible Duplicate: How to configure chrome to open magnet url's with deluge? I want to open Magnet links for torrents and Spotify, but whenever I click on one it either opens up another ...
0
votes
1answer
703 views

How to configure chrome to open magnet url's with tixati?

When I click on a magnet link chrome try to use transmission ... I'm actually using tixati torrent client ( very fast for me ) What I can do to fix this ? I'm running ubuntu 15.10
0
votes
1answer
33 views

Opening a file using xdg-open

I have a bash script which reads a file extension and list files of that extension using 'find' command. After that it reads name of the file. Now after this how can I open that file using name and ...
0
votes
3answers
204 views

Clicking link in PDF spawns thousands xdg-open processes

I have a PDF with a link to a web page, that used to work (it would open the link in firefox, via xdg-open). However, when I click it now, literally thousands of xdg-open processes are started and ...
0
votes
3answers
159 views

Auto opening generated pdf file [closed]

My application generates pdf file and writes out to some folder. Is there any setup to automatically open it when its generated?
0
votes
2answers
298 views

How to properly detach a command?

I have this little script I use to launch a root Nautilus window (yeah, dangerous, but sometimes necessary): #!/bin/bash gksudo --description "Launch a root Nautilus" -- sh -c "xdg-open / &" ...
0
votes
0answers
49 views

How to set the default application for all text MIME types text/XXX in mimeapps.list for xdg-open?

I want all MIME types of the form: text/XXX to be opened with gvim when I do: xdg-open myfile.ext Currently, the best I could find was to add one line for each text file to my ~/.config/mimeapps....
0
votes
0answers
15 views

xdg-utils backporting

There is xdg-open bug which seems to be fixed in xdg-utils 1.1.0 rc2 and newer - it seems that Ubuntu 15.10 will have rc3. Older Ubuntu versions do have still rc1 with that xdg-open bug. Could not ...
0
votes
0answers
85 views

xdg-open not obeying defaults

I'm running Cinnamon 2.6 with the Nemo file manager in Ubuntu 15.04. For some reason, I can't make Nemo automatically launch with the xdg-open command, which is probably why inserting removable media ...
0
votes
1answer
104 views

emacs doesnot work with xdg-open

I use emacs 24.4.1 on ubuntu 15.04. Somehow xdg-open doesnot work if i run it from emacs. For example, if i run "xdg-open 1.pdf" or "gvfs-open 1.pdf" in eshell they do not work. At the same time, "...
0
votes
1answer
372 views

Chrome is not opening magnet links properly with deluge?

If I use firefox, and click a magnet link, everything runs smoothly. however, in google chrome, all I get is that the deluge icon shakes as if it is opening something, but when I look at the window I ...