How to make a new MIME type?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

How to make a new MIME type?

#1 Post by sunburnt »

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: Select all

#! /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, 05:24, edited 1 time in total.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

Re: How to make a new MIME type?

#2 Post by ttuuxxx »

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: Select all

#! /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 :)

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#3 Post by sunburnt »

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...

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#4 Post by ttuuxxx »

here is the example I did for docX-abiword and puppy 4.2 http://www.murga-linux.com/puppy/viewto ... 564#291564
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Yo...I was banging my head against that brick wall too yesterday...added reiserfs to filemnt but was stuck on that part

mike

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#6 Post by sunburnt »

Double post, dang the slow forum !
Last edited by sunburnt on Tue 12 Jan 2010, 19:46, edited 1 time in total.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

Thanks ttuuxxx; I`ll be checking it out soon.

mikeb; I`m glad to see your getting some use out of my old app... :)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#8 Post by mikeb »

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 :lol: ...just blame the snow.

mike

Post Reply