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

14
votes
6answers
34k 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 ...
12
votes
1answer
6k 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?
8
votes
2answers
669 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 ...
7
votes
3answers
8k 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! ...
5
votes
3answers
261 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 ...
5
votes
2answers
418 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
1answer
433 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
1answer
2k 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 ...
3
votes
1answer
48 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?
1
vote
1answer
90 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 ...
1
vote
2answers
5k 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 ...
1
vote
1answer
146 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
83 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
150 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?
1
vote
1answer
222 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 ...
1
vote
1answer
421 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, ...
1
vote
0answers
258 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 ...
1
vote
0answers
52 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, ...
1
vote
3answers
290 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 ...
1
vote
1answer
100 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
0answers
385 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
0answers
462 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
36 views

xdg-open doesn't work in emacs (org mode)

In emacs (emacs24/xfce/saucy), when I click a link to a local file or export-&-open a pdf or html file, xdg-open is called with the target file. On my laptop system (emacs24/xfce/saucy), it uses ...
0
votes
0answers
45 views

How to fix inode/mount-point mime type in xdg?

I want to associate Thunar with folders after uninstalling other file managers and upgrading to 13.10. However current state confuses me and I am not sure what shoud I fix first (if anything). $ ...
0
votes
0answers
66 views

(Solved) Custom desktop file execution fails without any errors

I have made a custom .desktop file for a bittorrent client named Vuze. I have verified that the 'Exec' entry in the file is working, as given here Running a .desktop file in the terminal The shortcut ...
0
votes
1answer
146 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 ...
0
votes
1answer
150 views

Why does xdg-open text_file differ from sudo -u me xdg-open text_file?

If I run the following command, the text file opens in my preferred editor (kate). $ xdg-open /path/to/text/file However, if I try the following, where sparhawk is my username, I get several ...
0
votes
1answer
221 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. ...