Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wrong default application file browser
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Sun Nov 19, 2017 9:16 am    Post subject: wrong default application file browser Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sun Nov 19, 2017 2:05 pm    Post subject: Re: wrong default application file browser Reply with quote

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
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Mon Nov 20, 2017 8:48 am    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Nov 20, 2017 9:13 am    Post subject: Reply with quote

dasPaul wrote:
Thank you but that article describes only how to assign firefox itself to various filetypes.

What I meant to say is you need to have a look in Firefox' preferences: https://wiki.gentoo.org/images/7/77/Firefox%27_file_associations.png
Back to top
View user's profile Send private message
amair
n00b
n00b


Joined: 12 Aug 2003
Posts: 61

PostPosted: Tue Nov 21, 2017 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Tue Nov 21, 2017 2:17 pm    Post subject: Reply with quote

charles17 wrote:
What I meant to say is you need to have a look in Firefox' preferences: https://wiki.gentoo.org/images/7/77/Firefox%27_file_associations.png


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
View user's profile Send private message
amair
n00b
n00b


Joined: 12 Aug 2003
Posts: 61

PostPosted: Tue Nov 21, 2017 2:47 pm    Post subject: Reply with quote

dasPaul wrote:
charles17 wrote:
What I meant to say is you need to have a look in Firefox' preferences: https://wiki.gentoo.org/images/7/77/Firefox%27_file_associations.png


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):
Code:
mimeopen -d /tmp


Best regards,
Andreas
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Nov 21, 2017 3:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 541
Location: Germany

PostPosted: Thu Nov 23, 2017 7:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum