You are not logged in.

#1 2008-05-19 08:07:22

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

just a question...

i was wondering where can we edit on gconf or a file the file association used by pcmanfm or thunar...i cannot seem to find it...


Its a sick world we live in....

Offline

#2 2008-05-19 11:18:50

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: just a question...

~/.local/share/applications/defaults.list


global stuff is "saved"(?) in /usr/share/applications/mimeinfo.cache

Last edited by robmaloy (2008-05-19 11:24:38)


☃ Snowman ☃

Offline

#3 2008-05-19 11:20:39

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: just a question...

Right-click the file, go to 'Properties' and then the "Open With" tab... I had the same question not long ago big_smile

Offline

#4 2008-05-19 11:51:04

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

Re: just a question...

fukawi2 wrote:

Right-click the file, go to 'Properties' and then the "Open With" tab... I had the same question not long ago big_smile

i was hoping not to use that metod...how about gconf?


Its a sick world we live in....

Offline

#5 2008-05-19 11:52:07

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

Re: just a question...

robmaloy wrote:

~/.local/share/applications/defaults.list


global stuff is "saved"(?) in /usr/share/applications/mimeinfo.cache

awesome...thanks a lot.


Its a sick world we live in....

Offline

#6 2008-06-08 00:19:24

fede
Member
Registered: 2007-06-29
Posts: 126

Re: just a question...

I don't have a defaults.list in /usr/share/applications nor in ~/.local/share/applications...  Shouldn't there be a defaults.list there? Is there a "proper" way of generating such a file?

I have edited /usr/share/applications/mimeinfo.cache and the changes seem to be reset upon reboot.
The properties / open with method (appart from being impractical sometimes) seems to save changes to ~/.local/share/applications/mimeapps.list, but still there is no defaults.list, which makes me suspect something's missing from my system!

Thanks!

Offline

#7 2008-06-08 11:22:14

_Marco_
Member
Registered: 2008-04-21
Posts: 242

Re: just a question...

I think "defaults.list" is not a necessary file...
I have it but it only contains this:

[Default Applications]
image/jpeg=feh-usercreated.desktop

I suppose the only important files are the .desktop one
(I'm using pcmanfm as file manager FYI)

Offline

#8 2008-06-16 00:29:59

fede
Member
Registered: 2007-06-29
Posts: 126

Re: just a question...

I've solved my problem:

The info on the recognized file types is stored in the mime databases. This is neatly documented in the gnome help, with links to the relevant freedesktop.org specs. Mime types only store info about file types, and each apps's .desktop file specifies wich mime types it is capable of handling. No info on system or user preferred apps is stored in the mime database

Preferred applications are stored in defaults.list. This is stored in the .desktop file directories, which is /usr/share globally and ~/.local/share/applications for current user. The defaults.list file format is simple:

1. a [Default Applications]  group header
2. a list of a mimetype=preferred application for that mimetype .desktop file.

The example given by the gnome manual:

Example 5-4 A User's defaults.list file

[Default Applications]
application/pdf=evince.desktop
text/html=epiphany.desktop
text/plain=gedit.desktop
image/jpeg=eog.desktop
image/png=eog.desktop
text/xml=gedit.desktop

My current defaults.list:

[Default Applications]
application/csv=calc.desktop
application/excel=calc.desktop
application/msexcel=calc.desktop
application/msword=writer.desktop
application/ogg=banshee.desktop
application/pdf=evince.desktop
application/postscript=evince.desktop
application/rtf=writer.desktop
application/tab-separated-values=calc.desktop
application/vnd.lotus-1-2-3=calc.desktop
application/vnd.ms-excel=calc.desktop
application/vnd.ms-word=writer.desktop
application/vnd.rn-realmedia=banshee.desktop
application/vnd.sun.xml.calc=calc.desktop
application/vnd.sun.xml.calc.template=calc.desktop
application/vnd.sun.xml.draw=draw.desktop
application/vnd.sun.xml.draw.template=draw.desktop
application/vnd.sun.xml.math=math.desktop
application/vnd.sun.xml.writer=writer.desktop
application/vnd.sun.xml.writer.template=writer.desktop
application/vnd.sun.xml.writer.global=writer.desktop
application/vnd.oasis.opendocument.formula=math.desktop
application/vnd.oasis.opendocument.graphics=draw.desktop
application/vnd.oasis.opendocument.graphics-template=draw.desktop
application/vnd.oasis.opendocument.presentation=impress.desktop
application/vnd.oasis.opendocument.presentation-template=impress.desktop
application/vnd.oasis.opendocument.spreadsheet=calc.desktop
application/vnd.oasis.opendocument.spreadsheet-template=calc.desktop
application/vnd.oasis.opendocument.text=writer.desktop
application/vnd.oasis.opendocument.text-template=writer.desktop
application/vnd.oasis.opendocument.text-web=writer.desktop
application/vnd.oasis.opendocument.text-master=writer.desktop
application/vnd.sun.xml.impress=impress.desktop
application/vnd.sun.xml.impress.template=impress.desktop
application/vnd.stardivision.calc=calc.desktop
application/vnd.stardivision.draw=draw.desktop
application/vnd.stardivision.impress=impress.desktop
application/vnd.stardivision.math=math.desktop
application/vnd.stardivision.writer=writer.desktop
application/mspowerpoint=impress.desktop
application/vnd.ms-powerpoint=impress.desktop
application/vnd.wordperfect=writer.desktop
application/wordperfect=writer.desktop
application/x-123=calc.desktop
application/x-abiword=abiword.desktop
application/x-applix-spreadsheet=calc.desktop
application/x-ar=file-roller.desktop
application/x-arj=file-roller.desktop
application/x-bzip-compressed-tar=file-roller.desktop
application/x-bzip=file-roller.desktop
application/x-cd-image=vlc.desktop
application/x-compressed-tar=file-roller.desktop
application/x-compress=file-roller.desktop
application/x-dos_ms_excel=calc.desktop
application/x-ear=file-roller.desktop
application/x-excel=calc.desktop
application/x-extension-m4a=banshee.desktop
application/x-extension-mp4=banshee.desktop
application/x-flac=banshee.desktop
application/x-glade=glade-2.desktop
application/x-gnumeric=gnumeric.desktop
application/x-gtar=file-roller.desktop
application/x-gzip=file-roller.desktop
application/x-gzpostscript=evince.desktop
application/xhtml+xml=firefox.desktop
application/x-jar=file-roller.desktop
application/x-java-archive=file-roller.desktop
application/x-lha=file-roller.desktop
application/x-lhz=file-roller.desktop
application/xls=calc.desktop
application/x-lzop=file-roller.desktop
application/x-matroska=vlc.desktop
application/x-mps=calc.desktop
application/x-ms-excel=calc.desktop
application/x-msexcel=calc.desktop
application/x-ogg=banshee.desktop
application/x-oleo=calc.desktop
application/x-perl=gedit.desktop
application/x-planperfect=calc.desktop
application/x-quattropro=calc.desktop
application/x-rar-compressed=file-roller.desktop
application/x-rar=file-roller.desktop
application/x-rpm=file-roller.desktop
application/x-sc=calc.desktop
application/x-shockwave-flash=vlc.desktop
application/x-sylk=calc.desktop
application/x-tar=file-roller.desktop
application/x-war=file-roller.desktop
application/x-xbase=calc.desktop
application/x-xls=calc.desktop
application/x-zip-compressed=file-roller.desktop
application/x-zip=file-roller.desktop
application/x-zoo=file-roller.desktop
application/zip=file-roller.desktop
audio/mpeg=banshee.desktop
audio/mpegurl=banshee.desktop
audio/vnd.rn-realaudio=banshee.desktop
audio/x-flac=banshee.desktop
audio/x-m4a=banshee.desktop
audio/x-mp3=banshee.desktop
audio/x-mpeg=banshee.desktop
audio/x-mpegurl=banshee.desktop
audio/x-ms-asf=banshee.desktop
audio/x-ms-asx=banshee.desktop
audio/x-ms-wax=banshee.desktop
audio/x-pn-aiff=banshee.desktop
audio/x-pn-au=banshee.desktop
audio/x-pn-realaudio-plugin=banshee.desktop
audio/x-pn-realaudio=banshee.desktop
audio/x-pn-wav=banshee.desktop
audio/x-pn-windows-acm=banshee.desktop
audio/x-real-audio=banshee.desktop
audio/x-scpls=banshee.desktop
audio/x-wav=banshee.desktop
image/bmp=eog.desktop
image/gif=eog.desktop
image/jpeg=eog.desktop
image/jpg=eog.desktop
image/pjpeg=eog.desktop
image/png=eog.desktop
image/svg+xml=eog.desktop
image/tiff=eog.desktop
image/vnd.rn-realpix=vlc.desktop
image/x-bmp=eog.desktop
image/x-gray=eog.desktop
image/x-icb=eog.desktop
image/x-ico=eog.desktop
image/x-png=eog.desktop
image/x-portable-anymap=eog.desktop
image/x-portable-bitmap=eog.desktop
image/x-portable-graymap=eog.desktop
image/x-portable-pixmap=eog.desktop
image/x-psd=gimp-2.2.desktop
image/x-xbitmap=eog.desktop
image/x-xpixmap=eog.desktop
inode/directory=nautilus-folder-handler.desktop
misc/ultravox=banshee.desktop
multipart/x-zip=file-roller.desktop
text/abiword=abiword.desktop
text/comma-separated-values=calc.desktop
text/csv=calc.desktop
text/html=firefox.desktop
text/plain=gedit.desktop
text/richtext=abiword.desktop
text/rtf=writer.desktop
text/spreadsheet=calc.desktop
text/tab-separated-values=calc.desktop
text/x-comma-separated-values=calc.desktop
text/x-chdr=gedit.desktop
text/x-csrc=gedit.desktop
text/x-dtd=gedit.desktop
text/x-java=gedit.desktop
text/mathml=gedit.desktop
text/x-python=gedit.desktop
text/x-sql=gedit.desktop
text/xml=firefox.desktop
video/dv=vlc.desktop
video/mp4=vlc.desktop
video/mpeg=vlc.desktop
video/msvideo=vlc.desktop
video/quicktime=vlc.desktop
video/vnd.rn-realvideo=vlc.desktop
video/x-anim=vlc.desktop
video/x-avi=vlc.desktop
video/x-flc=vlc.desktop
video/x-fli=vlc.desktop
video/x-mpeg=vlc.desktop
video/x-ms-asf=vlc.desktop
video/x-msvideo=vlc.desktop
video/x-ms-wmv=vlc.desktop
video/x-nsv=vlc.desktop
x-directory/normal=nautilus-folder-handler.desktop
x-content/blank-cd=nautilus-cd-burner.desktop
x-content/blank-dvd=nautilus-cd-burner.desktop
x-content/blank-bd=nautilus-cd-burner.desktop
x-content/blank-hddvd=nautilus-cd-burner.desktop
x-content/video-dvd=vlc.desktop
x-content/video-vcd=vlc.desktop
x-content/video-svcd=vlc.desktop
x-content/video-blueray=vlc.desktop
x-content/video-hddvd=vlc.desktop
x-content/audio-cdda=rhythmbox.desktop
x-content/audio-dvd=rhythmbox.desktop
x-content/audio-player=rhythmbox.desktop
x-content/image-dcf=f-spot.desktop
x-content/image-picturecd=f-spot.desktop
zz-application/zz-winassoc-xls=calc.desktop

User preferences override system preferences. When you modify a mimetype's preferred app via nautilus' gui (ie right click > open with), the preference is added to ~/.local/share/applications/mimeinfo.list, which overrides local preference in defaults.list for that app. In my experience it seems that you need to have a defaults.list somewhere for this to work, otherwise the info on mimeinfo.list doesn't seem to be parsed by the system.

Offline

Board footer

Powered by FluxBB