Questions tagged [xdg]
The xdg tag has no usage guidance.
110
questions
0
votes
1
answer
41
views
Wayland Issue on FreeBSD
The Problem
Hello, I am completely new to FreeBSD and relatively new to UNIX systems in general. I am following the FreeBSD Handbook, and loving it so far. My goal is to install river tiling window ...
1
vote
1
answer
69
views
Bridge dbus service to another bus
This is the situation:
I have NetworkManager running on the host system.
I have systemd and dbus running in a privileged Docker container.
I want nmcli in the container to access the NetworkManager ...
1
vote
1
answer
83
views
How should I handle two seemingly conflicting XDG Desktop Entry requirements?
According to my understanding of the File Naming section in the XDG Desktop Entry Specification, I should name my .desktop file following reverse-DNS notation:
The name of the desktop entry should ...
0
votes
0
answers
36
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/'
...
1
vote
1
answer
139
views
xdg-screensaver lock returns exit code 4 even though it worked
On an up to date openSUSE Tumbleweed install with KDE, running xdg-screensaver lock works (as in, the screen is locked just as if I'd done so through the UI), but it returns exit code 4, which ...
0
votes
0
answers
223
views
How do I open GUI apps as ROOT or with SUDO in Debian 11?
Every time I try to launch apps in Debian 11 with sudo and I get this same message:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
the app then doesn't open.
Logging in as ...
0
votes
1
answer
519
views
How can I find the value of $XDG_CONFIG_HOME, $XDG_CONFIG_HOME, $XDG_STATE_HOME, etc in a Bash script?
This seems like a simple question that every application developer would have, but I can't find the answer.
Per the latest XDG Basedir Spec, there are many directories that should be defined in ...
1
vote
2
answers
41
views
Where to put personal scripts according to XDG basedir spec?
I have a number of self-written scripts on my PC. I want to put these in the correct spot in my homedir according to the XDG Basedir spec. But I also want to backup these scripts in an clear and ...
2
votes
1
answer
61
views
changing default program that opens a file using xdg-mime
I want to change the default program that opens video/mp4 files using xdg-mime from vlc.desktop to the firefox browser, firefox-firefox.desktop. I tried following the instructions given here however I ...
0
votes
0
answers
243
views
Xubuntu: XDG_ variables missing
I'm connecting to a remote Xubuntu machine via VNC and since yesterday, I can't run certain applications (e.g. TortoiseHG) any more:
remote$ thg
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '...
1
vote
1
answer
176
views
XDG autostart order - how to control it?
When logging into my XFCE session, there are several "things" started via the XDG autostart mechanism. Is it possible to control the order in which applications start, or having some sort of ...
0
votes
0
answers
32
views
Prevent OBS from restoring session on reboot
I’m trying to setup my OBS so that it starts recording immediately on login/startup. I am using XFCE on Fedora Linux. I initially thought this would be as easy as going into the Session and Startup ...
0
votes
1
answer
411
views
What is "New Virtual Output" in kde screen share (portal) dialog?
In kde wayland when you choose the pipewire source in obs, you get the Desktop Portal dialog that allows you to choose one of your screens or a "Full Workspace". But also there is an option &...
2
votes
0
answers
341
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 ...
2
votes
1
answer
430
views
Where/How are the XDG_*_DIR user directory variables supposed to be set?
I'm referring to: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I have the following files in my .config directory:
~/.config/user-dirs.dirs:
# ...
XDG_DOWNLOAD_DIR=&...
0
votes
0
answers
42
views
How do I synchronize xdg-settings and update-alternatives?
I have previously set a default web browser with xdg-settings set default-web-browser. Today I discovered an application that instead honours update-alternatives --config x-www-browser.
Is there an ...
0
votes
2
answers
437
views
How to make Mozilla Firefox to follow the Freedesktop XDG specification?
I want to use the XDG specification to avoid cluttering in my $HOME directory in Arch Linux.
Right now, Firefox version 101 created a $HOME/.mozilla directory, which I want to place somewhere else.
So,...
1
vote
1
answer
189
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
...
0
votes
0
answers
144
views
Terminal not staying open when using custom URL protocol x-scheme-handler?
I am trying to pass the URL to be printed in shell, and that the terminal remains open for 10 seconds, using this scheme echo://helloworld, sadly not works. The terminal closes before completing the ...
0
votes
0
answers
39
views
xdg-mime query filetype does not give file type even with exist code 0
I am using manjaro kde with i3wm. When i am executing the command xdg-mime query filetype <file-type> it does not show anything. But when i am checking the exit code it is 0. Also when i am ...
2
votes
1
answer
1k
views
$XDG_CACHE_HOME vs. $XDG_STATE_HOME
Based on the XDG Base Directory Spacifications, $XDG_STATE_HOME should store history and log of the programs. But it is very common to see UNIX programs storing these kind of stuff at $XDG_CACHE_HOME, ...
3
votes
1
answer
352
views
Firefox is already running ... error, but only from MS Teams
Whenever I click an HTTP(S) link in my desktop Teams client it hangs for about 5 seconds, then I get an error saying:
"Firefox is already running, but is not responding. To use Firefox, you must ...
2
votes
1
answer
341
views
Custom mime type for directories
Is it possible to make a custom mime type for directories (inode/directory)?
Just like what MacOS does with *.app folders (app bundle) which make it possible to open them in another program.
3
votes
1
answer
635
views
XDG_DATA_DIRS env variable using two separator types in fish shell
After doing an OS upgrade (opensuse leap 15.2 -> 15.3), my XDG setup broke. Among other things, my XDG_DATA_DIR env var uses two different value separators: : and .
Current XDG_DATA_DIRS value:
/...
1
vote
1
answer
388
views
Make cron inherit XDG_RUNTIME_DIR
I have a cron job that runs emacsclient which requires that XDG_RUNTIME_DIR to be set. I can set the variable to something like /run/user/1000 in the crontab but then this assumes that the owner of ...
-1
votes
1
answer
323
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.
2
votes
0
answers
102
views
Xfce4: How to decide which application to open the url based on patterns
The system has a bunch of browsers (like Chromium and Brave). All urls are to be opened by Chromium. So brave is not the default application for that. However, I want youtube links to be opened by ...
5
votes
2
answers
5k
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
1
answer
2k
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 ...
1
vote
1
answer
298
views
How do I set priority of which application opens a url schema (rdp://) in kde?
I have several applications installed that handles url schema rdp:// (for example, rdp://myadmin@1.2.3.4). These applications are Krdc and Remmina. I want such links to be opened in krdc, but they are ...
1
vote
1
answer
254
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-...
1
vote
0
answers
254
views
How to change UnitPath property in systemd? [closed]
I'm experimenting with a non-standard home directory setup making heavy use of $XDG_CONFIG_HOME, $XDG_CACHE_HOME, etc. and most programs have run just fine. Unfortunately, my systemd user service for ...
2
votes
2
answers
1k
views
Problem with zsh_history file
I am currently trying to clean up my home directory by following this XDG BASE DIRECTORIES website.
To do so, i have stored in my ~/.zshenv:
# ---- Default editors ---- #
export EDITOR="nvim"...
1
vote
1
answer
268
views
How do I keep stdin open when launching an executable via a Desktop Entry File (i.e. .desktop)?
I have a desktop application that relies on stdin.
If I run it in the terminal, it runs great and quits when stdin closes (CTRL+D). I also have a systemd activation socket set up which can launch ...
0
votes
0
answers
323
views
xdg-mime not doing anything
Created an empty file in ~ called test.desktop. Ran xdg-mime default test.desktop inode/directory, which returned success (returned 0). After this, xdg-mime query default inode/directory returned caja-...
4
votes
0
answers
991
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 ...
3
votes
1
answer
677
views
How to set all youtube links to open in mpv
I would like to set my system to open all links is mpv as default ie. I click link to youtube video in IRC, mumble, discord, signal etc. it opens in mpv. I have read through xdg-open and xdg-mime but ...
1
vote
0
answers
475
views
xdg-open opens my .desktop file in text viewer or editor instead of launching the executable I want
I tried to create a .desktop file to launch xfreerdp with certain command-line arguments, using https://wiki.archlinux.org/index.php/Desktop_entries as a quick reference. Its file name is something....
1
vote
0
answers
265
views
xdg-scheme-handler doesn't open script with same terminal that launching it from a desktop menu does
I'm trying to set a x-scheme-handler URI for my python application. This application is launched via a shell script in /usr/bin. I've had a desktop file for a while, and it's worked fine, opening the ...
1
vote
0
answers
523
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-...
1
vote
1
answer
866
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
1
answer
699
views
Setting DISPLAY=:0 and XAUTHORITY=/home/pi/.Xauthority causes FFmpeg to run poorly
I've setup a webcam viewer that detects when a USB webcam is plugged in with a udev rule, then starts a systemd service that executes a script that starts an FFmpeg/FFplay webcam stream. I noticed ...
2
votes
0
answers
78
views
Is it possible to use unicode character within glob pattern in mime definition file?
I'm issuing the command xdg-mime install nv-custom.xml - using this file:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/...
1
vote
1
answer
1k
views
How to set MIME priority for applications?
Image types (e.g. image/jpeg, image/png etc.) are widely supported by ImageMagick and Eye of GNOME, so the only way I see to set priority for EOG is to check it's supported formats in .desktop and ...
4
votes
1
answer
756
views
Debian Buster XFCE: make PCManFM default, including for Open a Directory, as in Chromium - downloads - show in folder
Using Debian Buster XFCE. XFCE is married to Thunar, so cannot remove thunar.
I would prefer Chromium (or any other app that might choose to open a directory), as when viewing Downloads and clicking '...
3
votes
1
answer
1k
views
Assign an icon to a custom mimetype
I tried to create a custom mimetype (text/graphml+xml) by creating the file ~/.local/share/mime/packages/graphml+xml-mime.xml with this content:
<?xml version="1.0" encoding="UTF-8"?>
<mime-...
4
votes
0
answers
266
views
Links try and fail to open in firefox, then open in chromium after killall firefox
Whenever I click a link in some GUI applications, such as signal or slack, either nothing happens, or I just see the screen flash (the screen also flashes when I start firefox normally). This happens ...
0
votes
0
answers
253
views
Cannot make xdg-mime query return chosen browser
After maybe one year of using Chromium as the default browser, my Linux switched spontaneously to using Firefox (probably because of some updates). I want to switch back. Based on this answer, I ...
2
votes
1
answer
2k
views
How to disable /etc/xdg/{something}?
Take /etc/xdg/kwinrulesrc for example:
$ cat /etc/xdg/kwinrulesrc
[1]
Description=dde-dock
desktop=-1
desktoprule=2
wmclass=dde-dock dde-dock
wmclasscomplete=true
wmclassmatch=1
[2]
Description=dde-...
7
votes
1
answer
3k
views
What is the procedure to update mime type associations in KDE?
I would like to revert to the default mime definitions at the system level, and also rebuild my local mime database. I am running Arch Linux KDE.
The Arch Wiki says,
If you use a desktop ...