View previous topic :: View next topic |
Author |
Message |
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Sun Nov 19, 2017 9:16 am Post subject: wrong default application file browser |
|
|
Hi there
My wm is openbox.
I have a problem with the default application setting for the file browser.
The problem is if I downloaded something in firefox and I click "open containing folder"
audacious pops up but not my desired thunar file browser.
Then I searched for directory in:
Code: | #grep -r "directory" /usr/share/applications
/usr/share/applications/exo-file-manager.desktop:X-XFCE-MimeType=inode/director;x-scheme-handler/trash;
/usr/share/applications/Thunar-folder-handler.desktop:MimeType=inode/directory;
/usr/share/applications/mimeinfo.cache:inode/directory=audacious.desktop;Thunar-folder-handler.desktop;
/usr/share/applications/audacious.desktop:MimeType=application/ogg;application/x-cue;application/x-ogg;application/xspf+xml;audio/midi;audio/mp3;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/x-flac;audio/x-it;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-s3m;audio/x-scpls;audio/x-stm;audio/x-vorbis+ogg;audio/x-wav;audio/x-xm;inode/directory;x-content/audio-cdda; |
and I have this in ~/.local:
Code: | .local/share/applications/mimeapps.list:inode/directory=thunar.desktop |
The problem is /usr/share/applications/mimeinfo.cache, if I delete the audacious entry it readds itself somehow.
What I am doing wrong? _________________ -=human without Windows®=-
sorry for my bad english! |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sun Nov 19, 2017 2:05 pm Post subject: Re: wrong default application file browser |
|
|
dasPaul wrote: | Hi there
My wm is openbox.
I have a problem with the default application setting for the file browser.
The problem is if I downloaded something in firefox and I click "open containing folder"
audacious pops up but not my desired thunar file browser. |
See https://wiki.gentoo.org/wiki/Firefox#XDG_integration |
|
Back to top |
|
|
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Mon Nov 20, 2017 8:48 am Post subject: |
|
|
Thank you but that article describes only how to assign firefox itself to various filetypes.
Even the other link to "XDG file associations" was not that enlightening as it describes only things I already did.
xdg-mime query default inode/directory
xdg-mime default thunar.desktop inode/directory
As last option I simply unmerged audacious because it was rarely used and recently masked anyway.
Problem gone. _________________ -=human without Windows®=-
sorry for my bad english! |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
amair n00b
Joined: 12 Aug 2003 Posts: 61
|
Posted: Tue Nov 21, 2017 8:20 am Post subject: |
|
|
Hi,
once I found a solution that fits my needs:
I emerged "dev-perl/File-MimeInfo" which bring the "mimeopen" CLI tool.
Whenever FF shows the wrong associated application for a download I simply use "mimeopen -d <downloaded file>" to set the default application to use.
Best regards,
Andreas |
|
Back to top |
|
|
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Tue Nov 21, 2017 2:17 pm Post subject: |
|
|
That was the very first place where I looked but there you simply cant set an association for a directory, its only for filetypes. _________________ -=human without Windows®=-
sorry for my bad english! |
|
Back to top |
|
|
amair n00b
Joined: 12 Aug 2003 Posts: 61
|
Posted: Tue Nov 21, 2017 2:47 pm Post subject: |
|
|
dasPaul wrote: |
That was the very first place where I looked but there you simply cant set an association for a directory, its only for filetypes. |
You can try "mimeopen" (see my previous posting):
Best regards,
Andreas |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Tue Nov 21, 2017 3:18 pm Post subject: |
|
|
dasPaul wrote: | That was the very first place where I looked but there you simply cant set an association for a directory, its only for filetypes. |
Sorry, I've got wrong about the real problem. I know that within Firefox prefs it only refers to file types (or mime types?).
Only now, I checked pseudo url about:config for the string mime.
Here it returns some output for helpers.global_mime_types_file and helpers.private_mime_types_file
Do you know if there is a mime type which could be used for directory ? |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Thu Nov 23, 2017 7:30 am Post subject: |
|
|
The MIME type for a directory is "inode/directory".
According to XDG documentation, which is supported by most desktops (I've tested GNOME, KDE and Firefox the association between application and MIME type is set using /usr/share/applications/mimeapps.list (system-wide) or via
$HOME/.local/share/applications/mimeapps.list (see https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html for details).
So, in working with this stuff the package x11-misc/xdg-utils is very helpful. For example, to see which application is used by default to open directories, one can issue command:
Code: |
xdg-mime query default inode/directory
|
To change the default application for directory, use following command:
Code: |
xdg-mime default Thunar-folder-handler.desktop inode/directory
|
This creates appropriate entry in $HOME/.local/share/applications/mimeapps.list |
|
Back to top |
|
|
|