Author |
Message |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Tue 12 Jan 2010, 00:15 Post subject:
How to make a new MIME type? |
|
I added a new mime file to both these paths:
/root/.config/rox.sourceforge.net/MIME-types/application_conf
/root/Choices/MIME-types/application_conf
The file: " application_conf " has this in it:
Code: | #! /bin/sh
exec confpath "$1" |
I want a file with extension ".conf " to run the script: /root/my-applications/bin/confpath
Typing aaa.conf into rxvt just gives the error:
bash: aaa.conf: command not found
So the mime type for the file extension isn`t picking it up properly.
I found the file: /etc/mime.types , but it`s for the apache web server.
I`ve tried to change default mime handling in the past with no luck.
Can anyone tell me how to make the mime system work?
Last edited by sunburnt on Tue 12 Jan 2010, 01:24; edited 1 time in total
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 11193 Location: Ontario Canada,Sydney Australia
|
Posted: Tue 12 Jan 2010, 00:49 Post subject:
Re: How to make a new MIME type? |
|
sunburnt wrote: | I added a new mime file to both these paths:
/root/.config/rox.sourceforge.net/MIME-types/application_conf
/root/Choices/MIME-types/application_conf
The file: " application_conf " has this in it:
Code: | #! /bin/sh
exec confpath "$1" |
I want a file with extension ".conf " to run the script: /root/my-applications/bin/confpath
Typing aaa.conf into rxvt just gives the error:
bash: aaa.conf: command not found
So the mime type for the file extension isn`t picking it up properly.
I found the file: /etc/mime.types , but it`s for the apache web server.
I`ve tried to change default mime handling in the past with no luck.
Can anyone tell me how to make the mime system work?[/code] |
you need to add it to /usr/share/mime/globs or /usr/share/mime/globs2
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games 
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Tue 12 Jan 2010, 01:24 Post subject:
|
|
Thanks ttuuxxx; I thought there had to be another file that listed the extensions.
Barry`s note says not to edit the file, but I did anyway ( made a backup ).
It still didn`t work but I assume I have to reboot, tomorrow my PC will be free...
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 11193 Location: Ontario Canada,Sydney Australia
|
Posted: Tue 12 Jan 2010, 01:44 Post subject:
|
|
here is the example I did for docX-abiword and puppy 4.2 http://www.murga-linux.com/puppy/viewtopic.php?p=291564#291564
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games 
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 11104
|
Posted: Tue 12 Jan 2010, 12:55 Post subject:
|
|
Yo...I was banging my head against that brick wall too yesterday...added reiserfs to filemnt but was stuck on that part
mike
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Tue 12 Jan 2010, 15:41 Post subject:
|
|
Double post, dang the slow forum !
Last edited by sunburnt on Tue 12 Jan 2010, 15:46; edited 1 time in total
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Tue 12 Jan 2010, 15:45 Post subject:
|
|
Thanks ttuuxxx; I`ll be checking it out soon.
mikeb; I`m glad to see your getting some use out of my old app...
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 11104
|
Posted: Tue 12 Jan 2010, 16:32 Post subject:
|
|
Well I have had xfilemount in puppy 2 for ever but gave it a revamp so now handles spaces in names and paths, unmounts regardless of path depth, added reiserfs image files, opens qemu images and unpacks and packs initrd.gz's ok...oh and works correctly on full installs too (no loops devices on there)...so wanted to pass a few things onto puppy 4.
I had a week of scripting and gtkdialog ...just blame the snow.
mike
|
Back to top
|
|
 |
|