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
1 answer
32 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&...
user avatar
  • 115
0 votes
0 answers
31 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 ...
user avatar
0 votes
0 answers
13 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 "...
user avatar
0 votes
1 answer
65 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 ...
user avatar
-1 votes
1 answer
119 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.
user avatar
0 votes
0 answers
72 views

XDG-OPEN not working, error with KIO Client

Whenever I run xdg-open I get the following: Icon theme "breeze-dark" not found. Error: standard icon theme "hicolor" not found! kf.kio.widgets: Unknown MIME type "" kf....
user avatar
0 votes
1 answer
63 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 ...
user avatar
5 votes
2 answers
2k 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 ...
user avatar
1 vote
1 answer
550 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 ...
user avatar
  • 125
0 votes
1 answer
181 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-...
user avatar
  • 1
0 votes
0 answers
47 views

default inode/directory not working for google chrome on debian

I would like google chrome's option "Show in folder", like in chrome://downloads/, to be set to use terminator. If I issue open ~/Downloads/, or xdg-open ~/Downloads/ it works as expected. ...
user avatar
0 votes
1 answer
63 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-...
user avatar
  • 103
0 votes
1 answer
113 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 ...
user avatar
  • 161
0 votes
0 answers
98 views

How to create a keyboard shortcut for opening files after searching through fzf

I can launch a file after searching through fzf by doing xdg-open (fzf) (I'm using fish) or fzf | xargs xdg-open. But these do not work if I try to create a shortcut for opening a terminal and ...
user avatar
0 votes
1 answer
778 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 ?
user avatar
1 vote
1 answer
91 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. ...
user avatar
2 votes
0 answers
478 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 ...
user avatar
0 votes
1 answer
250 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 ...
user avatar
0 votes
1 answer
641 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, ...
user avatar
  • 196
0 votes
0 answers
278 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-...
user avatar
  • 564
4 votes
2 answers
637 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 "...
user avatar
2 votes
1 answer
818 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 (...
user avatar
  • 33
1 vote
1 answer
473 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'...
user avatar
  • 945
0 votes
1 answer
104 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 ...
user avatar
  • 1,672
3 votes
1 answer
404 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 ...
user avatar
  • 133
2 votes
0 answers
412 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 ...
user avatar
2 votes
1 answer
675 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 ...
user avatar
2 votes
1 answer
175 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....
user avatar
  • 31
1 vote
1 answer
140 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 (...
user avatar
  • 7,311
5 votes
3 answers
428 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 ...
user avatar
  • 209
0 votes
1 answer
84 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 ...
user avatar
  • 5,361
0 votes
0 answers
109 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 ...
user avatar
  • 8,932
1 vote
1 answer
487 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 ...
user avatar
  • 111
1 vote
1 answer
2k 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/...
user avatar
1 vote
1 answer
505 views

Exceptions with xdg-open when starting programs in the background

Until now I've been using the alias to xdg-open. alias o='xdg-open $@ 2> /dev/null' The default behaviour for xdg-open is to start the process in the foreground of the currently selected terminal ...
user avatar
3 votes
1 answer
2k views

How to associate a new (custom) mime type with files (based on file extension)?

This is part 2 of How to install a new (custom) mime type on my Linux system using CLI tools? Using the steps in the accepted answer at the above question, I created the following mime-type mx-...
user avatar
  • 15.5k
3 votes
1 answer
3k views

xdg-open fails to open file [closed]

I was trying to open an Excel file with python on Linux using xdg-open but realized xdg-open doesn't really work on my machine: $ xdg-open ~/Documents/foo.xlsx /usr/bin/xdg-open: line 881: www-...
user avatar
0 votes
0 answers
470 views

Configure xfce to use an alternative to the xdg-open program

I wonder how I would change the default file open application in xfce. In the terminal I always use rifle (from the terminal file manager ranger) and I would like to use rifle as well for when I open ...
user avatar
0 votes
0 answers
188 views

Set icon from the current directory in a .desktop file

I have an application in /home/sourav/project/.src/ directory. I have a desktop entry to run the application. I have set Path='./.src' to the .desktop file to run the application from the src/ and ...
user avatar
  • 1,645
2 votes
1 answer
369 views

Using glob mime types in mimeapps.list for use with xdg-open?

With xdg-open I would like to open all image files with shotwell, even risking that it may complain about files types it does not know about. I added [Default Applications] image/png=shotwell....
user avatar
  • 766
2 votes
0 answers
146 views

Chrome opens a second Transmission window with magnet links. How does it check if there is a transmission open or not?

The magnet link is correctly set with xdg-mime to open in transmission, and also in .local/share/applications/mimeapps.list. If transmission is NOT running, everything works as expected (click a ...
user avatar
  • 23
25 votes
2 answers
19k views

Create a custom URL Protocol Handler

I would like to register a URL scheme (or protocol) handler for my own custom URL protocol, so that clicking on a link with this custom protocol will execute a command on that URL. Which steps do I ...
user avatar
  • 4,151
10 votes
2 answers
60k views

How to open an .png type image in Linux terminal?

I just can't find the command to display a *.png image! I tried xdg-open command but it failed: [student@seqpapl1 Images]$ xdg-open adapter_content.png xdg-open: no method available for opening '...
user avatar
  • 103
0 votes
1 answer
295 views

How to raise the system native OpenWith dialog for a particular file?

The xdg-open command opens a file specified with the default app associated with the type. Is there an alternative that would raise the system native application choice dialog (which pops up when you ...
user avatar
  • 16.4k
3 votes
0 answers
351 views

xdg-open tries to open URLs as files on LXDE [duplicate]

I run $ xdg-open 'http://google.com' in /home/rominf/ and expect Firefox to open Google, but instead got GUI message with error: /home/rominf/http:/google.com: No such file or directory Firefox is ...
user avatar
  • 487
0 votes
1 answer
1k views

Use crontab to start AnyDesk

I am using AnyDesk on a Raspberry Pi 3. After around 6-7 days, it suddenly consumes all the memory and the device stops responding. To prevent this, I am using crontab to execute /usr/bin/killall ...
user avatar
3 votes
0 answers
10k views

Open xdg-open to download files not working on google-chrome [closed]

I am having google-chrome(69.0.3497.100) on Debian Stretch, whenever I try to download some files by clicking on the download link there will a popup Open xdg-open and when I click on yes option ...
user avatar
  • 5,424
3 votes
2 answers
3k views

How can I set default application for unknown file on xdg-open / mimeopen?

On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications. $ xdg-mime query filetype jquery.js application/javascript $ xdg-mime query default ...
user avatar
  • 133
7 votes
1 answer
1k views

How to make xdg-open follow mailcap settings in Debian

tl;dr: In Debian xdg-open (through xdg-mime) does not follow the mailcap specifications used by run-mailcap which I prefer to use. Is there some systematic way to make xdg-open follow the mailcap ...
user avatar
11 votes
2 answers
23k views

What's the right way to add directories to XDG_DATA_DIRS?

I've installed some app under /opt/myapp, which has a /opt/myapp/share directory. As I finish installing, it tells me: Note that '/opt/myapp/share' is not in the search path set by the XDG_DATA_HOME ...
user avatar
  • 7,311