You are not logged in.

#1 2017-01-25 15:46:50

jon.reeve
Member
Registered: 2013-04-29
Posts: 22

[SOLVED] How can I set a default application?

I'm trying to get Synapse running correctly in i3. It works, but when I try to open a directory, nothing happens. On the command-line, Synapse complains that "No application is registered as handling this file."

To fix this, I'm trying to follow the instructions in the Default Applications wiki page for querying and setting default applications. Here's what I've been running, and the output of each command:

$ xdg-mime query filetype ~/Documents
inode/directory

$ xdg-mime query default inode/directory
nautilus.desktop

$ xdg-open ~/Documents
gvfs-open: /home/jon/Documents: error opening location: No application is registered as handling this file

$ xdg-mime default nautilus.desktop inode/directory

$ xdg-open ~/Documents                             
gvfs-open: /home/jon/Documents: error opening location: No application is registered as handling this file

Since I'm running i3, I figure this might be a problem related to what the wiki says:

If no desktop environment is detected, MIME type detection falls back to using file which—ironically—does not implement the XDG standard. If you want xdg-utils to work properly without a desktop environment, you will need to install #perl-file-mimeinfo or another xdg-open alternative.

I've installed perl-file-mimeinfo, but that doesn't seem to have had any effect. (And doesn't actually provide the commands that the wiki says it provides, by the way.)

How can I get directories to open as expected using default methods, so that Synapse correctly opens directories?

Last edited by jon.reeve (2017-02-01 15:20:24)

Offline

#2 2017-01-29 18:05:38

jon.reeve
Member
Registered: 2013-04-29
Posts: 22

Re: [SOLVED] How can I set a default application?

I have a feeling this problem was caused by installing ranger as a file manager. Ranger took over as the default file manager, i.e. handler of inode/directory MIME types, and then when I uninstalled it, it didn't manage to replace the the previous default file manager. I've since tried uninstalling/reinstalling nautilus, and installing/uninstalling ranger again, both to no avail. Any ideas?

Offline

#3 2017-01-30 03:22:23

gnox
Member
Registered: 2013-05-18
Posts: 81

Re: [SOLVED] How can I set a default application?

Edit ".config/mimeapps.list" and replace what you need , I dont know why xdg-mime saves in .local/share/applications/mimeapps.list if is "deprecated" according to Wiki .

Offline

#4 2017-02-01 15:20:10

jon.reeve
Member
Registered: 2013-04-29
Posts: 22

Re: [SOLVED] How can I set a default application?

Thanks! That does the trick. Marking as solved.

Offline

Board footer

Powered by FluxBB