Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Sep 2014, 12:19
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to make a new MIME type?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: 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
View user's profile Send private message 
ttuuxxx


Joined: 05 May 2007
Posts: 10753
Location: Ontario Canada,Sydney Australia

PostPosted: 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 Smile
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: 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
View user's profile Send private message 
ttuuxxx


Joined: 05 May 2007
Posts: 10753
Location: Ontario Canada,Sydney Australia

PostPosted: 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 Smile
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8252

PostPosted: 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
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: 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
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: 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... Smile
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8252

PostPosted: Tue 12 Jan 2010, 16:32    Post subject:  

Well I have had xfilemount in puppy 2 for ever Smile 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 Laughing ...just blame the snow.

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0527s ][ Queries: 12 (0.0037s) ][ GZIP on ]