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
-1
votes
1answer
25 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.
0
votes
0answers
37 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....
0
votes
1answer
29 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 ...
4
votes
1answer
313 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 ...
1
vote
1answer
129 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 ...
0
votes
1answer
47 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-...
0
votes
0answers
26 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. ...
0
votes
1answer
38 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-...
0
votes
1answer
64 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 ...
0
votes
0answers
61 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 ...
0
votes
1answer
394 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 ?
0
votes
1answer
58 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. ...
2
votes
0answers
279 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 ...
0
votes
1answer
169 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 ...
0
votes
1answer
408 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, ...
0
votes
0answers
183 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-...
4
votes
2answers
447 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 "...
2
votes
1answer
350 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 (...
1
vote
1answer
308 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'...
0
votes
1answer
87 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 ...
3
votes
1answer
272 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 ...
2
votes
0answers
303 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 ...
2
votes
1answer
471 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 ...
2
votes
1answer
139 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....
1
vote
1answer
85 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 (...
5
votes
3answers
366 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 ...
0
votes
1answer
65 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 ...
0
votes
0answers
55 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 ...
1
vote
1answer
455 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 ...
1
vote
1answer
1k 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/...
1
vote
1answer
397 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 ...
3
votes
1answer
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-...
3
votes
1answer
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-...
0
votes
0answers
382 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 ...
0
votes
0answers
157 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 ...
2
votes
1answer
234 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....
2
votes
0answers
137 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 ...
23
votes
2answers
16k 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 ...
8
votes
2answers
50k 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 '...
0
votes
1answer
254 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 ...
3
votes
0answers
349 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 ...
0
votes
1answer
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 ...
3
votes
0answers
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 ...
3
votes
2answers
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 ...
7
votes
1answer
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 ...
7
votes
2answers
18k 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 ...
0
votes
0answers
266 views

xdg-open launches both hexchat and firefox

I recently noticed that when I click an irc:// link in my browser (Chromium), it launches HexChat, and when I close HexChat, it will launch Firefox. Suspicious that it might be something wrong with ...
2
votes
1answer
2k views

Cannot set default application for xdg-open

I am trying to make gthumb the default when opening png files from the terminal $ xdg-mime default ~/.gnome/apps/gthumb.desktop image/png I created this symlink: $ ls -l ~/.gnome/apps/gthumb....
6
votes
4answers
5k views

xdg-open on debian 9 fails to open browser

I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message; Quite strange as you can see, it's prepending the ...
2
votes
1answer
656 views

xdg-open block until spawned process is killed

I have a lot of documents to view, and I'd like to view them one by one, so the next opens when I close the previous. I've done this with evince before, with for i in `ls | grep .pdf`; do evince $i; ...