At first I thought it was going to be some kind of solution to force all linux apps to adhere to the XDG Base Directory Specification, until I realized this related to a different specification altogether (XDG MIME Applications specification).
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!
> 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.
> 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/
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).
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.
Ackchyually XDG default applications aren't set via env vars but through the `${XDG_CONFIG_HOME}/mimeapps.list` file manipulated (either via text editor if track desktop files yourself or, better) via `xdg-mime {query|default}` tool. This TUI is a replacement (doesn't wrap it) to this tool for this functionality, with twist that does multiple-defaults category-wise rather one-by-one ("word processor documents" rather odt/doc/docx).
Compared to what slopcalypse has brought, this one (project; vibe coded maybe, certainly not slop) at very least is useful (also is quite short; within a sea of thousand LOC generated in 1s this is refreshing).
Nice, but problem with all these AI coded TUI's is we will have hundreds of them, best to stick to the built in linux commands, add aliases/abbreviations (fish) if required, do you need a TUI for everything? Sometimes the answer to "Should I write this?" Is no
I do agree with some of your sentiment. But by that logic, nothing would ever be made.
The same goes with aliases. Why not just use the actual commands. You give it your best shot, and sometimes something good comes out. And sometimes it's crap. That's life.
And I made it for fun and to learn something. And it wasn't AI coded. It's like 200 lines. I wanted to learn termbox2.h a bit more than I already had.
I absolutely fail to see the problem and I think the whole "best to stick to built in linux commands" is an utterly dinosaur-esque take that can, and will, and should, go extinct in the age of AI-assisted coding.
It is interesting that somehow every conversation now pivots to LLM's. It's almost like people are paranoid or something. I have no issue with AI. But it should be used carefully when learning/working so you don't miss the little details that usually make a big difference later. But to each their own.
It is just getting tiring that people assume more and more that things were written with AI for everything. It's like, OMG, can you stop it for a second. And who cares, really. Do your due diligence, check the code and decide for yourself. But maybe, this is just projection. Or a nice way of insulting/dismissing people, which I find quite funny.
And like you said, the age of AI-assisted coding is already here. There is beauty in piping core utils together and being really productive with them. No doubt about it. But there are also new ways of computing emerging, and we should learn about that too.
Bravo!
the startup time is crazy, you can start writing as soon as you hit the command
(I don't use codex, just noticed that it's crazy fast)
I always alias open to xdg-open, it’s so useful to open a file directly from the terminal.
edit: https://soc.me/standards/defending-home
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....
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
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/
I’d have to look into your specific case but `gio mime` and `gio open` do the right things.
Either way, why don't you show us some of the stuff you've made.
Compared to what slopcalypse has brought, this one (project; vibe coded maybe, certainly not slop) at very least is useful (also is quite short; within a sea of thousand LOC generated in 1s this is refreshing).
The same goes with aliases. Why not just use the actual commands. You give it your best shot, and sometimes something good comes out. And sometimes it's crap. That's life.
And I made it for fun and to learn something. And it wasn't AI coded. It's like 200 lines. I wanted to learn termbox2.h a bit more than I already had.
It is just getting tiring that people assume more and more that things were written with AI for everything. It's like, OMG, can you stop it for a second. And who cares, really. Do your due diligence, check the code and decide for yourself. But maybe, this is just projection. Or a nice way of insulting/dismissing people, which I find quite funny.
And like you said, the age of AI-assisted coding is already here. There is beauty in piping core utils together and being really productive with them. No doubt about it. But there are also new ways of computing emerging, and we should learn about that too.