Questions tagged [xdg-open]

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.

Xdg itself was an acronym of the X Desktop Group, which is now known as freedesktop.org, which developed a set of standards that are common across different desktop environments such as GNOME, KDE, LXDE and others.

These standards are important as it means xdg-open can be used on any standards compliant Desktop Environment to open a file with the default application. One just needs, for example, to enter:

xdg-open my.pdf

Whichever desktop environment is running, the native opening program, such as gnome-open, will be invoked.

For more information, see the official site.

111 questions
39
votes
3 answers

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?
Oxwivi
  • 17,849
15
votes
7 answers

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 text files and gnome-open also opens one file. I…
karo
  • 147
3
votes
1 answer

Is there a way to extend xdg-open?

I hope the title is not misleading. I am using an note taking app that let's me open files from markdown notes: [read more](/path/to/file.pdf) I couldn't find a way to open it at a specific page. I cannot create a link in The format which the…
2
votes
0 answers

Purge default-web-browser from xdg-settings

Is it possible to purge default-web-browser entry from xdg-settings for specific user? I.e. that if xdg-open with an url is called an error will be thrown instead of opening the url in the default browser.
smihael
  • 216
1
vote
1 answer

`xdg-open .` opens file manager, but opens Audacious with sudo permissions

xdg-open . opens file manager, but opens Audacious with root permissions. It then proceeds to play all system sounds! I'm just trying to open the file manager with sudo. Is there a better way to do it? (On Lubuntu so I don't have nautilus or gnome)
J.Smith
  • 85
  • 1
  • 8
1
vote
1 answer

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 which then launches an arbitrary program (it resorts…
1
vote
0 answers

Can xdg-open open a different browser for specific URLs?

I'd like xdg-open to use a non-default browser when I click a work related link. Maybe I could configure xdg-open to call a script when opening URLs. The script could open a different browser based on the URL host. It would be ideal, though, if…
1
vote
1 answer

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. I've been testing on stock Natty (Gnome,…
Suan
  • 111
0
votes
0 answers

Prevent xdg-open to open mistyped files as URLs

I am often inadvertently trying to open incomplete filenames with xdg-open, because of the presence of several files with the same basename but different extensions, e.g. very-long-filename.tex, very-long-filename.pdf etc. Using autocomplete in…