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.
111
questions
39
votes
3
answers
55k
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?
31
votes
5
answers
93k
views
How can I set which application is launched by 'xdg-open'?
I have run update-alternatives as well as the GNOME Preferred apps selection thing. And all point to have the Chromium browser as the default. Yet, when I run xdg-open http://askubuntu.com, Firefox is ...
23
votes
6
answers
167k
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 ...
22
votes
2
answers
46k
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 ...
15
votes
7
answers
19k
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 ...
14
votes
1
answer
65k
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 ...
13
votes
1
answer
24k
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 ...
12
votes
2
answers
14k
views
What do these symbols "$@">/dev/null 2>&1" after a command mean? [duplicate]
I've recently found here a solution to my problem, but I can't completely understand what everything in this command means:
xdg-open "$@">/dev/null 2>&1
11
votes
1
answer
10k
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 ...
11
votes
1
answer
9k
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 ...
11
votes
2
answers
10k
views
Xdg-open doesn't do anything, Zoom in Chromium,
I'm running Ubuntu 18.04.4 LTS.
As the title says, when prompt to "xdg open" on Zoom (chromium browser), nothing happens and I can't do a conference call.
Does anyone know what might be the issue?
I'...
10
votes
4
answers
3k
views
Opening Links from some applications takes a long time
When I click on links in some applications it can take up to a minute until the open in the browser. This is regardless if the default browser is chrome or firefox.
Example applications where opening ...
10
votes
5
answers
2k
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
4
answers
5k
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 --...
8
votes
1
answer
1k
views
how to get links from chrome to open in firefox?
Firefox is my default browser but I have to run Chrome to be able to use PWAs (progressive web apps). when I click links in the PWA they always open a Chrome window. I've been playing with appending ...
7
votes
2
answers
1k
views
How to locate and display a file
I want to locate and display an image. Is there any way to do so using pipe or ...? I wanna locate image X, i do locate X and the path is shown, but i can't send the output to xdg-open.
7
votes
1
answer
3k
views
How to change default program for http(s):// links in Xubuntu/XFCE
I am using XFCE on Xubuntu. I want my default browser to be Chromium.
In Settings Manager > Preferred Applications web browser is set to Chromium.
In gconf-editor: /desktop/gnome/url-handlers/http ...
6
votes
3
answers
1k
views
How to open a PDF file with "Master PDF Editor" application from terminal?
I want to open a PDF file from terminal. I only know the command xdg-open file-name.xxx to open a file. But once I use this command, it opens the PDF file with the Document Viewer application (Evince)....
6
votes
2
answers
857
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 ....
6
votes
2
answers
19k
views
xdg-open can't open applications from links
I'm using Kubuntu 19.10 and I have a problem with xdg-open.
Every link that redirects to an application doesn't work. For example slack links: I am on their website, when the link of accessing a ...
6
votes
0
answers
3k
views
xdg-document is keeping my files open
I use Master PDf editor installed through flathub to edit some PDf files.
When I close it, I can sse by lsof | grep /media/<MYUSER>/<DEVICE> that xdg-document is keeping my file open.
What ...
6
votes
1
answer
3k
views
Force Firefox to use xdg-open to open downloaded files
Firefox in Kubuntu is broken, as it doesn't follow the system default applications that I can configure using "file associations" in the KDE Control Module. For example, it wants to open ...
5
votes
3
answers
6k
views
open whatsapp links with web.whatsapp.com
There is still no way to install a native Linux application for whatsapp, so I always use whatsapp's webapp with my daily browser (chromium based brave-browser).
Everything works [mostly] fine, except ...
5
votes
2
answers
48k
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 ...
5
votes
2
answers
3k
views
Trying to install a sw xdg-open: gnome-open: not found
I am trying to install this program and it gives me this error.
4
votes
5
answers
3k
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, "...
4
votes
2
answers
2k
views
How to install latest stable dolphin file manager on Kubuntu via xdg-open(Discover)? [duplicate]
I am running latest Kubuntu 20.04 with dolphin file manager version 19.12.3. However the latest stable version is already available as 20.04.3 https://kde.org/applications/en/system/org.kde.dolphin
...
4
votes
1
answer
3k
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 ...
4
votes
1
answer
2k
views
How do I close a pdf from Ubuntu command line?
Suppose I open a file (pdf) with a command line in Ubuntu by running
xdg-open abc.pdf
The pdf is shown in a pdf reader which is set as default.
Now how can I close this pdf viewer from the command ...
4
votes
1
answer
1k
views
How do I add a file type to XDG?
Using LXQT, the file manager (PCManFM-QT) is showing all files with unrecognized suffixes as "text/plain". I've added an entry to /etc/mime.types mapping a new suffix to a new application/x-...
4
votes
2
answers
6k
views
`xdg-open` does not open files in the preferred applicaton
xdg-open does not work as expected. It opens most my files in browser, directories in my code editor(VS code) and plain text files using less. It also throws this error message,
$ xdg-open $HOME
xdg-...
4
votes
1
answer
2k
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 ...
4
votes
2
answers
977
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=...
4
votes
2
answers
845
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
3
answers
8k
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
3
answers
13k
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 ...
3
votes
1
answer
2k
views
Protocol handler setting to automatically open protocol with xdg-open
On Ubuntu 18.04 when I clicked a Zoom link it automatically opened Zoom for me without prompt. I think that the version of Chrome that I was using on Ubuntu 18.04 had had an option in the xdg-open ...
3
votes
1
answer
736
views
reveal file in default file manager with command line
I would like to open folder in default file manager an focus on specific file.
I can do it with Notilus or Nemo (for example)
notilus ~/folder/file.txt
nemo ~/folder/file.txt
but I want to use ...
3
votes
1
answer
357
views
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. ...
3
votes
1
answer
2k
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
1
answer
2k
views
Why xdg-open should not be used as root?
**xdg-open is for use inside a desktop session only. It is not
recommended to use xdg-open as root.**
Why does the manual page say the above ?
3
votes
1
answer
1k
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 ...
3
votes
1
answer
160
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
1
answer
2k
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?
3
votes
1
answer
1k
views
mimetype not identifying pdf files: mime hell
I have never had issues with opening pdf files until recently. Then, I wanted to readup on the xcolor package for TeX and entered the following command:
texdoc xcolor
This has always worked, opening ...
3
votes
1
answer
2k
views
Xdg-open doesn't work in Chromium
I have a fresh install of Ubuntu 20.04 LTS and I've got chromium-browser through apt(same problem persists with snap version).
The problem is that xdg-open doesn't seem to do anything when called ...
3
votes
2
answers
724
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....
3
votes
0
answers
409
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
1
answer
709
views
All files open in browser
Description
All files, no matter their type, and no matter what application I associate with the type, open with my default browser (Firefox), which then asks me to choose an application. This is very ...
2
votes
3
answers
716
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 ...