Questions tagged [xdg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 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 '...
  • 309
0 votes
0 answers
34 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
15 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
103 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 &...
  • 482
0 votes
0 answers
86 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 ...
  • 227
1 vote
1 answer
79 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=&...
  • 320
0 votes
0 answers
21 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 ...
  • 2,657
0 votes
2 answers
161 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,...
  • 77
1 vote
1 answer
59 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
50 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
23 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 ...
1 vote
1 answer
399 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
152 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
155 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.
  • 21
0 votes
0 answers
108 views

How to get KDE's Dolphin to recognize updated user-dirs.dirs?

~/.config/user-dirs.dirs holds the settings for the XDG user directories, accessible through the xdg-user-dirs-update command. I used to this command to update my user-dirs.dirs file to: ...
  • 21
3 votes
1 answer
376 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
233 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 ...
  • 297
-1 votes
1 answer
177 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.
1 vote
0 answers
51 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 ...
  • 111
5 votes
2 answers
3k 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
897 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 ...
  • 125
0 votes
1 answer
152 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 ...
  • 482
0 votes
1 answer
109 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-...
  • 103
1 vote
0 answers
171 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 ...
's user avatar
2 votes
2 answers
798 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"...
  • 123
0 votes
0 answers
137 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-...
3 votes
0 answers
649 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
522 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 ...
0 votes
0 answers
359 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....
  • 11
1 vote
0 answers
201 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 ...
  • 111
0 votes
0 answers
346 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-...
  • 614
1 vote
1 answer
572 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'...
  • 907
1 vote
1 answer
578 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
66 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
923 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 ...
  • 142
4 votes
1 answer
600 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-...
  • 111
4 votes
0 answers
221 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
214 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 ...
  • 4,821
0 votes
0 answers
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-...
  • 287
6 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 ...
  • 16k
2 votes
1 answer
393 views

In XDG Base Directory Specification what if $HOME is unset or empty

Personally I'd like to adhere to to XDG Base Directory Specification to make my utility more portable. However when doing so it requires me to re-implement for systems that do not have the XDG_ ...
  • 355
3 votes
1 answer
3k views

How do I get XDG_CONFIG_HOME from a shell script / command line?

Is ${XDG_CONFIG_HOME:-${HOME}/.config} enough or there are more tricks to it? Is there maybe some xdg-user-dir CONFIG or xdg-settings invocation that gives me where to expect programs' configs?
  • 5,216
2 votes
3 answers
4k views

Why are the XDG variables for my account undefined when I login through SSH?

When logged in to the desktop: $ env | grep XDG_ XDG_CONFIG_DIRS=/etc/xdg XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session4 XDG_MENU_PREFIX=xfce- XDG_SEAT=seat0 XDG_SESSION_DESKTOP=xfce ...
  • 2,225
1 vote
1 answer
578 views

MIME type text/html: how & where defined?

I've asked a related question on AskUbuntu (How to open *.htm differently than *.html?) with no interest yet, so I'm addressing the same issue with a more fundamental question. I cannot find how and ...
  • 21
28 votes
2 answers
21k 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 ...
  • 4,361
3 votes
1 answer
2k views

Understanding AutostartCondition key in .desktop files

CentOS 7.x with GNOME 3 Shell by default provides the following *.desktop files under /etc/xdg/autostart/ with AutostartCondition key: # gnome-welcome-tour.desktop [Desktop Entry] Type=Application ...
  • 33
2 votes
1 answer
1k views

Where should I store my application files (data, cache, logs, crashes, etc.) [closed]

Although I did some research on this subject, I couldn't reach the exact information I wanted. Actually, not exactly disclosed, everyone approached in a different way. For the: Filesystem Hierarchy ...
  • 123
4 votes
2 answers
3k views

Launch default terminal emulator by command

How do I launch the default terminal emulator by command? x-terminal-emulator won't work because I'm not using a Debian and xdg-terminal doesn't seem to exist either. Is there any other way to launch ...
  • 142
4 votes
2 answers
10k views

How to create / delete $XDG_RUNTIME_DIR at login / logoff

Today I was surprised to ssh into my box running Arch Linux and find that /run/user/$(id -u) didn't exist. The XDG Base Directory Specification says: $XDG_RUNTIME_DIR defines the base directory ...
  • 25.8k