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 Fri 31 Oct 2014, 03:41
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 Posts_count  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5039
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?

Edited_time_total
Back to top
View user's profile Send_private_message 
ttuuxxx


Joined: 05 May 2007
Posts: 10839
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_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
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: 10839
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_website 
mikeb


Joined: 23 Nov 2006
Posts: 8393

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: 5039
Location: Arizona, U.S.A.

PostPosted: Tue 12 Jan 2010, 15:41    Post_subject:  

Double post, dang the slow forum !
Edited_time_total
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
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: 8393

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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