X
X
xdg-utils
1 like
xdg-utils is a set of tools that allows applications to easily integrate with the desktop environment of the user, regardless of the specific desktop environment that the user runs.
Cost / License
- Free
- Open Source (MIT)
Platforms
- Linux


Comments and Reviews
Don't forget about file:// protocol when working with xdg-open: xdg-open file:///usr/share/dict
Useful read for advanced users and developers: https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.1.html.
Defaults with
Ubuntu 20.04.4 LTS desktop:
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=x11
Use these commands in order to get name of .desktop file.
xdg-mime query default $(xdg-mime query filetype "path")