View previous topic :: View next topic |
Author |
Message |
russK l33t


Joined: 27 Jun 2006 Posts: 648
|
Posted: Mon Jul 31, 2017 3:32 am Post subject: gnome forgot file type associations? [solved] |
|
|
I'm running gnome-3.22.
When I double-click an item in nautilus it does not know how to open it, it tries to open everything in the editor. I end up with binary nonsense in the text editor whenever I double-click on an image file or other media files.
Also .desktop files don't open right, they just go into the editor too.
Anyone know how to fix?
Thanks
Last edited by russK on Tue Aug 08, 2017 12:38 am; edited 1 time in total |
|
Back to top |
|
 |
sebB l33t

Joined: 02 Mar 2011 Posts: 802 Location: S.O. France
|
Posted: Mon Aug 07, 2017 11:34 am Post subject: |
|
|
What happen if you right click on the item?
Can you choose the default program?
Gnome select the last program used by default |
|
Back to top |
|
 |
Fitzcarraldo Veteran


Joined: 30 Aug 2008 Posts: 1877 Location: United Kingdom
|
Posted: Mon Aug 07, 2017 12:03 pm Post subject: |
|
|
russK,
As I still have GNOME 3 in a VirtualBox VM after investigating a different GNOME problem for another user, I checked the locations of the file-association files:
Code: | $ locate mimeapps.list
/etc/skel/.local/share/applications/mimeapps.list
/home/fitzcarraldo/.local/share/applications/mimeapps.list
/usr/share/applications/gnome-mimeapps.list
/usr/share/gdm/greeter/applications/mimeapps.list
$ locate defaults.list
$ |
The files ~/.local/share/applications/mimeapps.list and /etc/skel/.local/share/applications/mimeapps.list have very few entries, and the long list of default applications are defined in the file /usr/share/applications/gnome-mimeapps.list, so do you still have that main file or has it somehow been deleted? _________________ Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 648
|
Posted: Mon Aug 07, 2017 9:00 pm Post subject: |
|
|
Thanks for the replies
When I right-click on an icon, even image files (they do not show as thumbnails), I get "Open With Text Editor" and "Open With Other Application" as the first 2 entries. The rest of the menu is just copy, paste, etc.
If I choose "Other Application" and choose an image viewer, it does not remember any association next time.
Fitzcarraldo, I have this: Code: | $ ls -ltr $(locate mimeapps.list defaults.list)
-rw-r--r-- 1 root root 14293 Aug 8 2015 /usr/portage/mate-base/mate-session-manager/files/defaults.list
-rw-r----- 1 russ russ 237 Feb 29 2016 /home/russ/russ-first-nvme/.local/share/applications/mimeapps.list
-rw-r--r-- 1 root root 18178 Dec 4 2016 /usr/portage/gnome-base/gnome-session/files/defaults.list-r3
-rw-r--r-- 1 root root 906 Apr 21 16:37 /usr/share/gdm/greeter/applications/mimeapps.list
-rw-r--r-- 1 root root 65 Jul 23 01:07 /usr/share/applications/defaults.list
-rw-r--r-- 1 russ russ 396 Jul 30 22:35 /home/russ/.local/share/applications/mimeapps.list
-rw-r--r-- 1 root root 18178 Aug 6 01:24 /usr/share/applications/gnome-mimeapps.list
|
I also tried this: Code: | # equery b mimeapps.list
* Searching for mimeapps.list ...
gnome-base/gdm-3.22.3-r1 (/usr/share/gdm/greeter/applications/mimeapps.list)
# emerge -1 gnome-base/gdm |
To no avail. I'm tempted to do a 'emerge -e @world' but it seems a waste and it may not help. |
|
Back to top |
|
 |
Fitzcarraldo Veteran


Joined: 30 Aug 2008 Posts: 1877 Location: United Kingdom
|
Posted: Mon Aug 07, 2017 10:32 pm Post subject: |
|
|
Is the problem limited to GNOME, or does it happen on the command line too?
Code: | $ xdg-mime query filetype hammock_stand.png
image/png
$ xdg-mime query filetype ntp-client.txt
text/plain
$ xdg-mime query filetype speech.sh
application/x-shellscript |
_________________ Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
 |
russK l33t


Joined: 27 Jun 2006 Posts: 648
|
Posted: Tue Aug 08, 2017 12:35 am Post subject: |
|
|
Ah, now we're onto something: Code: | $ xdg-mime query filetype picture.png
text/plain
|
I presume my magic number database was somehow corrupted.
I did this: Code: | # emerge -1 shared-mime-info |
Like magic it all started working again.
Thanks for the help!! |
|
Back to top |
|
 |
Fitzcarraldo Veteran


Joined: 30 Aug 2008 Posts: 1877 Location: United Kingdom
|
Posted: Tue Aug 08, 2017 1:06 am Post subject: |
|
|
Glad to return the favour!  _________________ Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
 |
|