XDG-SETTINGS(1)

πŸ’… XDG-SETTINGS(1) β€” the xdg-settings glow-up (from the xdg-settings Manual, bestie)

okay so listen. xdg-settings is that girl who goes and asks the desktop environment what's up and comes back with the receipts. she's your plug for getting settings OUT of the desktop session. πŸŽ€


✨ NAME ✨

xdg-settings β€” get various settings from the desktop environment


✨ SYNOPSIS ✨

xdg-settings {get | check | set} {property} [subproperty] [value]

xdg-settings {--help | --list | --manual | --version}

like. that's the whole vibe. two little forms. pick one. πŸ¦‹


✨ DESCRIPTION ✨

so xdg-settings gets various settings from the desktop environment. bestie, desktop environments are always hoarding good info β€” proxy configuration, default web browser settings, the works. and the apps that live inside the desktop's own libraries just get that stuff natively, no problem, main character energy. but the apps that DON'T use those libraries? they're standing outside the group chat with no invite. 😭

that's literally what xdg-settings is for. it pulls those parameters out so any application can use them.

⚠️ real talk: xdg-settings is for use inside a desktop session only. and it is not recommended to use xdg-settings as root. not the vibe. don't do it. πŸ’€

✨ OPTIONS ✨

  • --help β€” show the command synopsis. the quick little "what do i even type" moment.
  • --list β€” list every property xdg-settings knows about. the full roster. πŸ‘‘
  • --manual β€” show this manual page. you're literally reading it rn. iconic.
  • --version β€” show the xdg-utils version information. receipts for which version you're on. ⭐

✨ PROPERTIES ✨

when you use xdg-settings to get, check or set a desktop setting, you use properties β€” and sometimes sub-properties β€” to say exactly which setting you're changing. no vague posting allowed. πŸ™…

some properties (hey, default-web-browser) fully describe the setting to be changed all by themselves. self-sufficient queen. 🫢

other properties (looking at you, default-url-scheme-handler) need more info β€” in this case, the actual scheme you want the default handler for β€” and that extra info MUST be provided in a sub-property. she needs her plus-one. πŸ’–


✨ EXIT CODES ✨

an exit code of 0 means success. a non-zero exit code means failure. that's the whole energy. the following failure codes can be returned:

  1. error in command line syntax. you typed it weird. πŸ™ˆ
  2. one of the files passed on the command line did not exist. it's not there. it never was. πŸ’€
  3. a required tool could not be found. where is she. 😭
  4. the action failed. it just did not work out. πŸ₯€

✨ SEE ALSO ✨

xdg-mime(1), xdg-open(1), MIME applications associations specification[1]


✨ EXAMPLES ✨

get the desktop file name of the current default web browser 🌈

xdg-settings get default-web-browser

check whether the default web browser is firefox.desktop β€” and lowkey, this can be false even if "get default-web-browser" says that is the current value (if only some of the underlying settings actually reflect that value). sneaky behavior but okay. 🧚

xdg-settings check default-web-browser firefox.desktop

set the default web browser to google-chrome.desktop ✨

xdg-settings set default-web-browser google-chrome.desktop

set the default mailto URL scheme handler to be evolution.desktop πŸ’…

xdg-settings set default-url-scheme-handler mailto evolution.desktop

✨ AUTHOR ✨

Mike Mammarella β€” Author. 🫢


Copyright Β© 2009-2011


✨ NOTES ✨

  1. MIME applications associations specification http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/

and that's a wrap bestie!! this was xdg-utils 1.1.0, dated 12/06/2025, and you just read the XDG-SETTINGS(1) page. go forth and set your defaults. slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from