From: Daniel L. <dan...@gm...> - 2004-08-25 14:53:25
|
E.L. Willighagen wrote: > On Wednesday 25 August 2004 12:17, Jan Reichert wrote: > > E.L. Willighagen wrote: > > >(cc: others that use Jmol or JChemPaint on a KDE or Gnome desktop) > > >For Jmol, this would be: > > > > > >[Desktop Entry] > > >Encoding=UTF-8 > > >MultipleArgs=false > > >Terminal=0 > > >Exec=/usr/bin/jmol %f > > >Type=Application > > >MimeType=chemical/x-cif;chemical/x-cml;chemical/x-gaussian-input;chemical/ > > >x-mdl-molfile;chemical/x-mmcif;chemical/x-pdb;chemical/x-xyz Name=Jmol > > >Comment=Jmol > > > > I would suggest adding a MIME type for Jmol scripts, too, like > > RasMol/Chime scripts > > > > Exec=/usr/bin/jmol --script %f > > MimeType=application/x-jmol > > (at the moment there is no use to extend this application/x-jmol with > > the RasMol/Chime MIME types application/x-rasmol;application/x-spt > > because Jmol didn't honor the > > load pdb inline > > RasMol script command, which is typically used in application/x-rasmol > > scripts from e.g. OCA, SCOP, Image Library.) > > Good idea... > > > I've tried installing application/x-jmol on SUSE with a .desctop file in > > my user home DIR, but failed JFTP: It must be .desktop. In Debian (KDE 3.2) the right path to install <app>.desktop is ~/.kde/share/applnk/<categories> and for <mime-type>.desktop ~/.kde/share/mimelnk/? > I think they really have to go somewhere into /usr/share, and not into $HOME... but I do not > know the exact locations for SUSE systems... > > > using the gnome and kde surface tools, I was able to associate *.JMZ > > files e.g. saved from: > > http://www.imb-jena.de/cgi-bin/rascript.exe?CODE=2fdn&TYPE=Jmol > > with jmol --script {needing a shell}. > > > > this seemed to be independent from what Mozilla used, Mozilla need a > > separate shell script with the content > > java -jar Jmol.jar --script $1 > > to fire up Jmol on an application/x-jmol link. > > Yes, Daniel did some more research, and today I've incorporated his changes and uploaded > a new chemicalMIME tar.gz to the CDK SF page... Gnome and Mozilla should now be > supported too... but that does only define the mime types... I saw it. A new Debian-package will be available soon. > Binding the mime type to a program is a second step, and Daniel has these now to make a > few formats go with JChemPaint... and for Jmol they should be similar (this is on a Debian > testing system): > > $ more /usr/share/applnk/Edutainment/Science/jchempaint.desktop [snipped] > $ more /usr/share/application-registry/jchempaint.applications [snipped] > $ more /usr/lib/mime/packages/jchempaint > chemical/x-cml; jchempaint %s; edit=jchempaint '%s'; nametemplate=%s.cml; test=test "$DISPLAY" != ""; description="Chemical Markup Language"; priority=5 > chemical/x-daylight-smiles; jchempaint %s; edit=jchempaint '%s'; nametemplate=%s.smi; test=test "$DISPLAY" != ""; description="Smiles Format"; priority=5 > chemical/x-mdl-molfile; jchempaint %s; edit=jchempaint '%s'; nametemplate=%s.mol; test=test "$DISPLAY" != ""; description="MDL Molfile"; priority=5 > chemical/x-mdl-rxnfile; jchempaint %s; edit=jchempaint '%s'; nametemplate=%s.rxn; test=test "$DISPLAY" != ""; description="MDL Reaction Format"; priority=5 > chemical/x-mdl-sdfile; jchempaint %s; edit=jchempaint '%s'; nametemplate=%s.sd; test=test "$DISPLAY" != ""; description="MDL Structure Data File"; priority=5 > > The first file is for KDE, and the second for Gnome. I'm not completely sure, if we need the .keys and .mime-file (/usr/share/(gnome/)mime-info/*) too, for Gnome. But I will test it. For the moment, they are included in the Debian jchempaint-package. > It is described in the README in the chemicalmime-2.tar.gz on the CDK SF download > page... > > Daniel, what is the third file used for? Is that for the ROX desktop? The third file updates /etc/mailcap (part of the mime-support package), a configuration-file for the metamail-program, which determines how to display non-text at the local site (see man mailcap and man metamail). This is used by e.g. mutt and IMHO mozilla-firefox. It works on Debian. If someone can test it on SuSE or any other linux distribution, this would be great. The shared MIME-info database is AFAIK part of ROX-desktop. So the chemicalMIME.xml can also be used for ROX-desktop. But I don't know, if this is enough to make ROX-filer recognize the chemical MIME types (there are AFAIK only out-of-date Debian-packages for ROX, so I can't test it). One thing: The /etc/mime.types (also part of mime-support) does only contain x-pdb and x-xyz. So I will write to the maintainers of mime-support, if they can add all the mime-types in the chemicalMIME-package. To make it easier for them, I will uploaded a patch-file. I don't know, if SuSE or RH or any other linux distribution also provides such a package. So this is only for Debian at the moment. Regards, Daniel -- |