News for hackers. Stuff that matters.
Re:Show HN: TUI for managing XDG default applications by sourcegrift on Sunday January 25, 2026 @07:53AM (#46753701)
No one on earth has so far managed to get xdg default apps work on Linux. I've been failing since 19 years personally. If you've really succeded then congratulations!
Re:Show HN: TUI for managing XDG default applications by nickjj on Sunday January 25, 2026 @08:19AM (#46753866)
> No one on earth has so far managed to get xdg default apps work on Linux.

I've only been using Linux for a few weeks but what am I missing here?

I set a bunch of mime types in `~/.config/mimeapps.list` which are assigned to desktop apps and they all open perfectly with `xdg-open` or when I launch them through a file manager.

It is documented in the XDG specification https://specifications.freedesktop.org/mime-apps/latest/file....

Re:Show HN: TUI for managing XDG default applications by forgotpwd16 on Sunday January 25, 2026 @08:56AM (#46754108)
For me currently, when trying to open a `text/markdown` file, there's a disassociation between what my file manager (Caja) runs (own bin/emacs script; was under the impression it was auto-creating a .desktop file), what mimeapps.list have (emacs.desktop), and what `xdg-open` runs (Firefox for some reason).
Re:Show HN: TUI for managing XDG default applications by TingPing on Sunday January 25, 2026 @01:12PM (#46756497)
Older desktops don’t follow the specs and xdg-open does different things based on the desktop, so they indeed can get out of sync.

I’d have to look into your specific case but `gio mime` and `gio open` do the right things.

Re:Show HN: TUI for managing XDG default applications by sam_lowry_ on Sunday January 25, 2026 @01:10PM (#46756469)
> what am I missing here?

There are gotchas, for instance Chrom,{e,ium} insists on XDG_DESKTOP_DIR != XDG_DOWNLOAD_DIR.

See this bug report from a confused user: https://issues.chromium.org/issues/41076564

Re:Show HN: TUI for managing XDG default applications by mikkupikku on Sunday January 25, 2026 @02:02PM (#46757052)
> also of note, we (mostly) don't allow ~/Desktop as the download dir for security reasons

This isn't an XDG issue. It's a chromium engineers being silly pricks that think they know better than the power users who obviously went out of their way to create such a configuration. Also I bet it would work if you set your XDG_DESKTOP_DIR to ~/Download/

Re:Show HN: TUI for managing XDG default applications by flexagoon on Monday January 26, 2026 @02:15PM (#46770166)
This is XDG base directories, not XDG default applications. They're two different freedesktop specifications.
Re:Show HN: TUI for managing XDG default applications by mitjafelicijan on Sunday January 25, 2026 @09:57AM (#46754552)
I probably haven't. :) They are a nightmare indeed. But it does help a little.
Re:Show HN: TUI for managing XDG default applications by saturn_vk on Sunday January 25, 2026 @11:28AM (#46755477)
Great. I must be living on the moon then. I guess gnome work great there since it manages this part
Re:Show HN: TUI for managing XDG default applications by mitjafelicijan on Sunday January 25, 2026 @11:40AM (#46755590)
Gnome has done an amazing job at this, I agree. You don't even notice this issue.
Re:Show HN: TUI for managing XDG default applications by t-3 on Sunday January 25, 2026 @02:49PM (#46757500)
It's when I want to use a non-systemd, no-DE environment that xdg-stuff becomes very annoying, but that's usually because applications assume a certain setup rather than any fault of xdg. eg. Wayland is very stupid about requiring a certain xdg setup to run at all.