Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_894 / install / instalador-gvSIG-lin / Notas_asociaciacion_archivos.txt @ 10309

History | View | Annotate | Download (3.92 KB)

1
PARA KDE: dejar un fichero '.desktop' en el directorio $HOME/.kde/share/mimelnk/application
2
como este:
3

    
4
[Desktop Entry]
5
Comment=
6
Hidden=false
7
Icon=/x/apps/gvSIG_0.1_856/bin/ico-gvSIG.png
8
MimeType=application/gvSIG
9
Patterns=*.gvp;*.GVP
10
Type=MimeType
11

    
12

    
13
y apadir a fichero $HOME/.kde/share/config/profilerc algo asi:
14

    
15
[application/gvSIG - 1]
16
AllowAsDefault=true
17
Application=kde-gvSIG.sh-3.desktop
18
GenericServiceType=Application
19
Preference=1
20
ServiceType=application/gvSIG
21

    
22
y el el fichero de menu ($HOME/.kde/share/applnk/.../gvSIG*.desktop)
23
la entrada 'MimeType' debe estar 'IGUAL' que en el fichero que
24
hemos dejado en $HOME/.kde/share/mimelnk/application
25

    
26

    
27

    
28
Para GNOME:
29

    
30
POR Estudiar
31

    
32
Para FIREFOX:
33

    
34
POR Estudiar
35

    
36

    
37

    
38
Los archivos usados para la asociacion estan en ./resources/mime
39
y los scripts que los manejan son ./resources/postinstall.sh y
40
./resources/unistall.sh
41

    
42

    
43

    
44

    
45

    
46

    
47

    
48

    
49

    
50
**************************************************************
51
URL's y recortes:
52

    
53

    
54

    
55

    
56
http://www.ces.clemson.edu/linux/fc4_desktop.shtml
57
*********************************************************************
58
File Association. At the top of the context menu for a file in Nautilus is found the 'Open with "Preferred Application" menu item. Next, is found the 'Open with' menu item, which lists all other applications which can open the file. These menu items are controlled respectively by the following files:
59

    
60
  /usr/share/applications/defaults.list
61
  /usr/share/applications/mimeinfo.cache
62

    
63
Each line in defaults.list contains a desktop file followed by a mimetype. For example, the line
64

    
65
  application/postscript=evince.desktop
66

    
67
shows that Evince is the preferred application for opening postscript files. Each line in mimeinfo.cache contains a desktop file followed by a list of mimetypes. For example, the line
68

    
69
  image/gif=gthumb.desktop;gimp-2.2.desktop;
70
      gnome-eog.desktop;
71

    
72
shows the list of applications available for opening gif files. Gnome constructs the mimeinfo.cache file by processing the mimetypes recorded in the desktop files. Gnome comes with a pre-built system-wide defaults.list. At the user level there are parallel files
73

    
74
  ~/.local/applications/defaults.list
75
  ~/.local/applications/mimeinfo.cache
76

    
77
Users can add lines to these files as follows.
78

    
79
  In a Nautilus window, right click on a file
80
  Select Properties
81
  Select the 'Open With' tab
82
  To add to the current 'Open With' list
83
  Hit Add and select an application
84
  Hit Add again
85
  Select the preferred application radio button
86
   
87
************************
88

    
89
http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
90
************************
91

    
92
<MIME> = /usr/local/share/mime
93
<MIME> = /usr/share/mime
94

    
95

    
96
Each application that wishes to contribute to the MIME database will install a single XML file, named after the application, into one of the three <MIME>/packages/ directories (depending on where the user requested the application be installed). After installing, uninstalling or modifying this file, the application MUST run the update-mime-database command, which is provided by the freedesktop.org shared database[SharedMIME].
97

    
98
update-mime-database is passed the mime directory containing the packages subdirectory which was modified as its only argument. It scans all the XML files in the packages subdirectory, combines the information in them, and creates a number of output files. 
99

    
100

    
101

    
102
Here is an example source file, named diff.xml:
103

    
104
<?xml version="1.0"?>
105
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
106
  <mime-type type="text/x-diff">
107
    <comment>Differences between files</comment>
108
    <comment xml:lang="af">verskille tussen l?ers</comment>
109
    ...
110
    <magic priority="50">
111
      <match type="string" offset="0" value="diff\t"/>
112
      <match type="string" offset="0" value="***\t"/>
113
      <match type="string" offset="0" value="Common subdirectories: "/>
114
    </magic>
115
    <glob pattern="*.diff"/>
116
    <glob pattern="*.patch"/>
117
  </mime-type>
118
</mime-info>
119

    
120
********************
121

    
122

    
123