Skip to main content
The 2024 Developer Survey results are live! See the results

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Block xdg-settings from being altered on package install

Running on ArchLinux, and it's incredibly frustrating that Chromium, upon install, sets itself as the default browser using xdg-settings (which many programs prefer over $BROWSER). Is there a method ...
Devildude4427's user avatar
0 votes
1 answer
41 views

Can I force xdg-open to use a new terminal when opening a terminal app?

I would like xdg-open to open a new terminal when I run it on a file from the terminal and it opens, for example, nvim. My default text editor for text/plain is set to nvim.desktop. When I open a text/...
vosjedev's user avatar
0 votes
1 answer
42 views

Open specific URLs in certain app?

How can I tell xdg-open to open, say, YouTube URLs in a specific app, but use my default browser for all other URLs?
Geremia's user avatar
  • 1,185
0 votes
0 answers
45 views

Flatpak-installed Spotify client doesn't evoke the web browser

I'm on Fedora 39 on bspwm (very minimal installation, maybe I'm missing some library necessary for this) and installed Spotify client from flathub using flatpak install flathub com.spotify.Client and ...
delivrance's user avatar
0 votes
1 answer
46 views

Is it Possible to Read stdout and stderr of Apps Launched From the Desktop?

Suppose I launch Firefox from my apps. Is the stdout and stderr redirected to a specific file or is it redirected to /dev/null? If it is indeed redirected to a specific file, I'd also like to know how ...
Elijah's user avatar
  • 123
0 votes
0 answers
26 views

gThumb won't open from its own .desktop file nor from thunar, xdg-open is ok

gThumb doesn't start when launched from Thunar (right click, open with, gThumb). I also can't run it with dex /user/local/share/application/org.gnome.gThumb.desktop. In both cases nothing happens, no ...
fabien-michel's user avatar
0 votes
2 answers
58 views

How to open a file starting with dash via xdg-open

Usually, a double dash separates options from filenames, but xdg-open does not care: ❯ xdg-open -headlinesAfter.epub xdg-open: unexpected option '-headlinesAfter.epub' Try 'xdg-open --help' for more ...
xeruf's user avatar
  • 581
1 vote
0 answers
112 views

Design .desktop File to Launch the Default Terminal Emulator with Arguments

I'd like to be able to open text and source code files in neovim (or any other terminal-based text editor) when an XDG-compatible GUI application asks with which application to open that file. For now,...
Marcus Müller's user avatar
0 votes
0 answers
75 views

Open file from terminal in already running "pure data" instance

Whenever I xdg-open patch.pd it will open a new pure data instance, how can I make it open with existing instance?
Leo Zerino's user avatar
0 votes
1 answer
482 views

`xdg-open /` opens in browser when not already in terminal

I have set default file manager to ranger (xdg-mime query default inode/directory = ranger.desktop). Yet, when I am not in the terminal already, xdg-open / opens in the browser. I have checked in /usr/...
JosefLitos's user avatar
0 votes
1 answer
579 views

Controll the application that opens the links

My scenario is simple - I have two browser profiles, personal and work. Now I have two sources I get urls. My goal is to have a way to open urls from one source (let's say Slack) with personal profile ...
kosciej16's user avatar
  • 113
0 votes
1 answer
975 views

Browser download location file manager is not using system default file manager

As a bit of background, I'm using Arch Linux with i3 as my window manager and I recently stopped using Nautilus as my default file manager and started using Thunar. The browser I'm using is Brave and ...
BingoKnight's user avatar
0 votes
1 answer
272 views

How to run application/x-executable in nnn file manager?

I'm trying to open executable files in nnn. In my case the executable is the Telegram. When I try to open it using nnn the firefox will open. I searched over the net and figure out I should set a ...
Amir reza Riahi's user avatar
3 votes
1 answer
987 views

google-chrome-stable not respecting xdg-open

I have a file downloaded using google-chrome-stable in ~/Downloads/video.mkv, but clicking the file in Chrome's downloads page somehow opens the file in Firefox instead of my default video player. ...
Kyle Richards's user avatar
1 vote
0 answers
203 views

On running xdg-settings get default-we-browser, I get the following message "unknown desktop environment"

I am running an R script that tries to open a link on the linux server. But on running the script, I get the following error xdg-open: no method available for opening 'https://unix.stackexchange.com/' ...
Narayan Shubha's user avatar
1 vote
1 answer
149 views

How to pass URL string in .desktop file in quotes

I installed WhatsApp Desktop via Wine and I am trying to associate whatsapp:// links with it. Executing the following via command line works and starts a chat with the phone number +1234567890: env ...
Mike's user avatar
  • 459
2 votes
2 answers
1k views

Escape spaces in path in export variable (Ubuntu 22.04.1 LTS)

I use WSL2 (Ubuntu 22.04.1 LTS) and need to refer to edge-browser for xdg-open. Due to the space in the path I get an error. How can I escape the space? The path is shown corrrectly in exported ...
Daniel's user avatar
  • 43
0 votes
1 answer
1k views

xdg-open opening wrong application

I do not know where to ask this. When I type help, I get "help: Help is being displayed in xdg-open." Which is normal I suppose, but the problem is it opens up in Todoist application, which ...
cade's user avatar
  • 1
4 votes
0 answers
685 views

default-url-scheme-handler not implemented for xfce

I run this code on kali linux: xdg-settings set default-url-scheme-handler https google-chrome.desktop I got this error: xdg-settings: default-url-scheme-handler not implemented for xfce how can I ...
Yilmaz's user avatar
  • 379
2 votes
1 answer
1k views

How Can I Open Multiple Files With xdg-open

Let's say I run xdg-open file.flac. It will be equivalent to mpv file.flac. But if I run xdg-open *.flac, it will give me an error because it thinks that the other files are "unexpected arguments&...
Amarakon's user avatar
  • 333
1 vote
1 answer
359 views

Xdg-Mime won't change default application for .xopp (Xournalpp) files

I'm trying to change the default application for the filetype .xopp, which is a file for the xournalpp application. I currently ran the following commands: xdg-mime query filetype 2022-06-09/note.xopp ...
SingularisArt's user avatar
0 votes
0 answers
237 views

URL ampersand escape xdg-open command

I am trying to open a URL using the xdg-open command, but I have tried escaping the ampersand character to no avail; all possible choices don't work in bash. I have tried the following xdg-open "...
Mathpdegeek497's user avatar
1 vote
1 answer
500 views

protonvpn RuntimeError: Couldn't find acceptable executables for {'xdg-open'}

EDIT #3: After a series of attempts at removing packages, and installing again with/without the virtualenv, I came across various hurdles, which required me doing (with the help of ref, ref) $ conda ...
sancho.s ReinstateMonicaCellio's user avatar
-1 votes
1 answer
451 views

Arch Linux: Is it possible to configure chromium to be my default browser for only a single website?

xdg-settings get default-web-browser produces firefox.desktop. This is what I want in almost every case. For a single website I want links to open in chromium.
Zach LeFevre's user avatar
0 votes
1 answer
428 views

How to reveal a file in file explorer

Is there any solution as cross-platform as xdg-open is for revealing a file in the user's file explorer? xdg-open /path/to/file unfortunately opens the file, but all I want to do is open the file ...
minseong's user avatar
  • 837
6 votes
2 answers
10k views

Custom URI handling: xdg-open and Firefox work, but Chrome doesn't

I'm trying to configure my Linux environment to open obsidian:// URIs using the Obsidian app (see Using Obsidian URI). This is the flow I'm using. I'm doing this on a clean Ubuntu machine to make sure ...
Amir Rachum's user avatar
1 vote
1 answer
3k views

xdg-open from .desktop file (in script)

I am trying to get a shell script to launch a browser. When run standalone, this script successfully opens a browser with xdg-open http://localhost:8080 However, I am trying to make it convenient ...
Real's user avatar
  • 135
2 votes
1 answer
3k views

Windows browser specific to program within WSL

I'm in a Windows Subsystem for Linux (WSL) Ubuntu 20.04 LTS. My ~/.zshrc file currently has the following appended to the end of the file. export BROWSER='/mnt/c/Program Files/BraveSoftware/Brave-...
Carl C's user avatar
  • 23
1 vote
1 answer
466 views

Open default application for file and wait until it terminates

I tried to use xdg-open but it does not wait until the application terminates. I also tried to get the MIME-type of the file with xdg-mime query filetype fileHere and using xdg-mime query default MIME-...
Cookie04's user avatar
  • 123
2 votes
1 answer
287 views

Skip the browser page when opening https URIs for Zoom, Teams, and other native apps

Android has a convenient feature: certain https links that have associated local apps installed are opened directly in these apps, skipping the browser page. How do I achieve this in Linux? I have ...
Tom Adler's user avatar
  • 181
0 votes
1 answer
3k views

Ranger: set default apps for files

I use arch linux, ranger and nvim. When I try to open any text file, ranger does not do anything and this is on output: /bin/sh: line 1: vim: command not found What can i do to open file in neovim ?
Jan Černý's user avatar
  • 1,441
1 vote
1 answer
186 views

.local/share/applications isn't detected by xdg-mime

I'm trying to change the default program to open PDF files with xdg-open using the command xdg-mime default pdf.desktop application/pdf. The file pdf.desktop is already in ~/.local/share/applications. ...
Rik Ferreira's user avatar
6 votes
0 answers
2k views

Portable way to set custom URL scheme handler for all users

I already know how to create a custom URL scheme and set its handler using xdg-utils: xdg-settings set default-url-scheme-handler name handler.desktop However, the command affects only the current ...
trungnt2910's user avatar
1 vote
2 answers
676 views

Cannot open multiple instances of Firefox with xdg-open or kde-open5 in OpenSUSE due to "Firefox is already running" error

When I try from the command line $ kde-open5 http://unix.stackexchange.com/ $ xdg-open http://unix.stackexchange.com/ ... I get after a few seconds a dialog box on X11 telling me that Firefox is ...
Richard Gomes's user avatar
0 votes
1 answer
2k views

Launching a program via `xdg-open` from a subshell without blocking

I've noticed that calling xdg-open from a subshell will reliably block until the launched process is closed. I suspect there may be a reason for this, but I'm not sure as to why. For example, ...
wardw's user avatar
  • 346
1 vote
0 answers
1k views

How do I unset my default xdg browser?

I want to debug a program's behaviour when the user has no default web browser set, but I'm not sure how I'd return to this state after setting one. I know that I can set my default browser via xdg-...
Newbyte's user avatar
  • 1,088
5 votes
2 answers
1k views

Setting default browser for zathura

So I have trouble setting the default browser for opening links in zathura. I would like to use chrome however Palemoon is always used instead. I am on Manjaro with i3. First of all xdg-open "...
szynka12's user avatar
3 votes
1 answer
3k views

How to xdg-open specific links with different apps

Hi I want to open specific link with specific application. To be more specific, I want to open zoom links https://us02web.zoom.us/j/something?pwd=somethingsomething with desktop-ish zoom application (...
Demiler's user avatar
  • 53
3 votes
1 answer
2k views

Where is the relevant .desktop file?

I can open a Python source file using xdg-open, e.g., $ xdg-open Documents/tmp/paramk.py Waiting for Emacs... $ what happens is that emacsclient is invoked and xdg-open returns when I close the Emacs'...
gboffi's user avatar
  • 1,454
0 votes
1 answer
202 views

xdg-open is only using gedit

Something went wrong on a whole bunch of machines, and I can't figure out what or where or when or how. Red Hat Enterprise Linux Workstation release 6.10 (Santiago) All of my desktop icons are not ...
hymie's user avatar
  • 1,740
3 votes
1 answer
923 views

How to register new mimetypes not available in xfce4-mime-settings so that they are recognized with xdg-open under XFCE4?

I am trying to register new mimetypes under XFCE4. In particular, I would like to register the protocol zoommtg so I can launch Zoom meetings from links in the webbrowser Chrome. Chrome will launch ...
Pete's user avatar
  • 133
1 vote
0 answers
734 views

Is it possible to tell xdg-open (or alikes) to open a window in the background?

I am using xdg-open with cronjobs to open our time-management web-app once per hour to log my time (among other repeating things). This works very well, but has an annoying usability problem. Once ...
Gerrit Addiks's user avatar
1 vote
1 answer
2k views

chromium: specify file association, instead of opening file in xdg-open

When I click on a file in chromium, it calls xdg-open to open the file based on its mime type. For example, if I click on a file with a .torrent extension, it opens it in my torrent client. Is it ...
Martin Vegter's user avatar
4 votes
1 answer
282 views

xdg-open autocomplete not working when calling it with alias

I've set an alias to xdg-open adding alias op="xdg-open" to my ~/.bashrc file. The command op file.pdf works, but I'm not able to autocomplete when typing, for example, op fi and hitting TAB....
fefff's user avatar
  • 151
1 vote
1 answer
495 views

Where does xdg-mime save its per-user default app settings?

Where does xdg-mime save the settings I make with commands which set the default app to handle MIME types? i.e. commands such as: xdg-mime default evince.desktop application/pdf ? I'm using SLES (...
einpoklum's user avatar
  • 9,662
5 votes
3 answers
655 views

Opening a URL with xdg-open using Mozilla Remote Protocol

Older versions of Netscape and Mozilla (for X11) supported the so-called remote protocol: it was possible to open a URL or start composing an e-mail whenever a Netscape/Mozilla window (not necessarily ...
Bass's user avatar
  • 269
0 votes
1 answer
133 views

Mirror image video using xdg-open

I am using a web cam in Zoom, which opens xdg-open to provide the video feed. Unfortunately the feed is mirror image, so if I have text in the image then it is reversed and unreadable. How can I ...
Tyler Durden's user avatar
  • 5,773
0 votes
0 answers
262 views

Wait for forking process to complete

I have an application which does this: #!/bin/bash tmpfile=$(mktemp) gedit $tmpfile && pkexec mv $tmpfile $1 Works great. It creates a temp file, opens it in a graphical editor, and it gets ...
Stewart's user avatar
  • 14.2k
1 vote
1 answer
564 views

`serverless login` return Error: spawn /home/imin/.serverless/bin/xdg-open ENOENT

As a linux newbie, I tried installing lubuntu-18.04.4-desktop-amd64 in my VMware to do my development work there. Installation is a breeze, now I'm trying to install Serverless as per the guide here ...
imin's user avatar
  • 111
2 votes
1 answer
4k views

Unable to open URL with xdg-open

Getting this error as regular user: ~$ xdg-open http://www.google.com/ xdg-open: no method available for opening 'http://www.google.com/' ~$ ~$ xdg-mime query default text/html ~$ Code from /usr/bin/...
xavier96's user avatar