2022 Developer Survey is open! Take survey.

Questions tagged [xdg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 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 ...
user avatar
1 vote
1 answer
79 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, ...
user avatar
2 votes
1 answer
46 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 ...
user avatar
2 votes
0 answers
34 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.
user avatar
  • 21
0 votes
0 answers
56 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: ...
user avatar
  • 21
3 votes
1 answer
157 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: /...
user avatar
0 votes
1 answer
117 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 ...
user avatar
  • 265
-1 votes
1 answer
82 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
34 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 ...
user avatar
  • 101
4 votes
1 answer
1k 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
429 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
91 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 ...
user avatar
  • 382
0 votes
1 answer
48 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
1 vote
0 answers
118 views

How to change UnitPath property in systemd?

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 ...
user avatar
2 votes
2 answers
475 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"...
user avatar
  • 123
0 votes
0 answers
48 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-...
user avatar
2 votes
0 answers
422 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
3 votes
1 answer
422 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 ...
user avatar
0 votes
0 answers
282 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....
user avatar
  • 11
1 vote
0 answers
171 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 ...
user avatar
  • 111
0 votes
0 answers
258 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
  • 514
1 vote
1 answer
443 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
  • 1,095
1 vote
0 answers
477 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 ...
user avatar
2 votes
0 answers
52 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/...
user avatar
1 vote
1 answer
762 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 ...
user avatar
  • 142
4 votes
1 answer
500 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 '...
user avatar
3 votes
1 answer
797 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-...
user avatar
  • 111
4 votes
0 answers
187 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 ...
user avatar
0 votes
0 answers
171 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 ...
user avatar
  • 4,731
0 votes
0 answers
1k 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-...
user avatar
  • 267
6 votes
1 answer
2k 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 ...
user avatar
  • 15.4k
2 votes
1 answer
344 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_ ...
user avatar
  • 333
3 votes
1 answer
2k 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?
user avatar
  • 5,126
1 vote
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 ...
user avatar
  • 2,145
1 vote
1 answer
486 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 ...
user avatar
  • 21
25 votes
2 answers
18k 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,121
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 ...
user avatar
  • 33
1 vote
1 answer
870 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 ...
user avatar
  • 113
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 ...
user avatar
  • 142
3 votes
2 answers
9k 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 ...
user avatar
  • 24.6k
11 votes
2 answers
22k 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,249
0 votes
0 answers
186 views

Change icons directory to a xdg base directory

How can I change the icons directory from ~/.icons to $XDG_DATA_HOME/icons/? I set $XDG_DATA_HOME to ~/.data/, but it didn't work (it seems that the icon configuration is not compliant to XDG Base ...
user avatar
  • 1,015
0 votes
2 answers
97 views

Can I use ~/.config/ instead of ~/ for arbitrary packages?

I read very little about xdg, probably just enough to be dangerous. From what I've seen online, it looks like the new cool thing is to put specification files for X in ~/.config/ instead of just ~/ ...
user avatar
8 votes
1 answer
2k views

How to make flatpak applications use standard locations for user data files?

Applications installed with Flatpak are keeping user data and configuration under ~/.var/app/ (see Wiki and documentation). I would like the applications installed with Flatpak to reuse the ...
user avatar
  • 1,658
2 votes
1 answer
242 views

Is there a standard XDG location for user secrets?

XDG defines ~/.config, ~/.cache and other shell-agnostic locations for user configuration files. Some applications define their own locations for user secrets, like ~/.ssh and ~/.gpg. Is there an XDG-...
user avatar
  • 2,495
2 votes
1 answer
303 views

Which program runs $XDG_CONFIG_HOME/autostart in Debian 9?

Which program runs $XDG_CONFIG_HOME/autostart in Debian 9? I tried putting the following .desktop file in $XDG_CONFIG_HOME/autostart: [Desktop Entry] Type=Application Name=test Comment=test ...
user avatar
2 votes
1 answer
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....
user avatar
  • 810
6 votes
4 answers
6k 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 ...
user avatar
3 votes
1 answer
908 views

Switching user with gdmflexiserver from i3

Apparently, when using gdm3 (the default of Ubuntu 18.04) we should be able to run gdmflexiserver to get a new greeter and log in with resp. switch to another user. When running the command in my i3 ...
user avatar
  • 1,905
13 votes
2 answers
14k views

Is there a home directory location for overriding icons?

There are a few home directory locations that complement /usr locations. Files in these locations override their /usr counterparts. For example: ~/.local/bin complements /usr/bin ~/.local/share/...
user avatar
  • 2,495