Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How to change the default app for opening directories in Gnome?

I don't use Gnome, but I'm guessing it relies on xdg-open to figure out what program to use. Your first step would be to do xdg-open ~ to see if it uses the same incorrect program. If so, great - ...

posted 9mo ago by matthewsnyder‭  ·  edited 9mo ago by matthewsnyder‭

Answer
#2: Post edited by user avatar matthewsnyder‭ · 2023-08-14T23:34:15Z (9 months ago)
  • I don't use Gnome, but I'm guessing it relies on `xdg-open` to figure out what program to use.
  • Your first step would be to do `xdg-open ~` to see if it uses the same incorrect program. If so, great - you can troubleshoot xdg-open. If not, Gnome decided to write their own file association resolver to use on top of xdg-open, so it's a Gnome-specific thing.
  • When troubleshooting, you can use `xdg-mime` to check how the filetype is being resolved. You can also use it to set associations. The Arch wiki has [some tips](https://wiki.archlinux.org/title/XDG_MIME_Applications#Troubleshooting).
  • You can also try `handlr` which is an alternative to `xdg-utils`. I think it edits the same MIME databases but has a "better" UI. I find `xdg-utils` to have atrocious usability, so perhaps `handlr` might be less unpleasant.
  • I don't use Gnome, but I'm guessing it relies on `xdg-open` to figure out what program to use.
  • Your first step would be to do `xdg-open ~` to see if it uses the same incorrect program. If so, great - you can troubleshoot xdg-open. If not, Gnome decided to write their own file association resolver to use on top of xdg-open, so it's a Gnome-specific thing. Based on comments, this does not appear to be the case here - you say that `xdg-open` behaves consistently with Gnome GUI.
  • When troubleshooting, you can use `xdg-mime` to check how the filetype is being resolved. You can also use it to set associations. The Arch wiki has [some tips](https://wiki.archlinux.org/title/XDG_MIME_Applications#Troubleshooting).
  • Something to keep in mind: There is a **cache** for the MIME types, so simply setting an association with `xdg-mime` may not be enough. You may also have to update the cache using the program `update-mime-database` ([man page](https://man.archlinux.org/man/update-mime-database.1)). I think the cache is supposed to be a file called `mime.cache` under XDG dirs (my Arch install doesn't have it). There is also a related `~/.config/mimeapps.list` although I'm not sure if this is also generated by programs like `xdg-mime`.
  • You can also try `handlr` which is an alternative to `xdg-utils`. I think it edits the same MIME databases but has a "better" UI. I find `xdg-utils` to have atrocious usability, so perhaps `handlr` might be less unpleasant.
#1: Initial revision by user avatar matthewsnyder‭ · 2023-08-14T06:54:57Z (9 months ago)
I don't use Gnome, but I'm guessing it relies on `xdg-open` to figure out what program to use.

Your first step would be to do `xdg-open ~` to see if it uses the same incorrect program. If so, great - you can troubleshoot xdg-open. If not, Gnome decided to write their own file association resolver to use on top of xdg-open, so it's a Gnome-specific thing.

When troubleshooting, you can use `xdg-mime` to check how the filetype is being resolved. You can also use it to set associations. The Arch wiki has [some tips](https://wiki.archlinux.org/title/XDG_MIME_Applications#Troubleshooting).

You can also try `handlr` which is an alternative to `xdg-utils`. I think it edits the same MIME databases but has a "better" UI. I find `xdg-utils` to have atrocious usability, so perhaps `handlr` might be less unpleasant.