Help - Search - Members - Calendar
Full Version: Mime Types
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Zaurus Distro Support and Discussion > Sharp ROMs
How to modify mime types in the system?
For example mplayer can play 3gp, but if I select them from the file manager, they aren't associated to mplayer.
And how can open img or other files ftom tree!explorer qt? Every file is open in tree!text.
Your best bet is to search these forums for "mime". you'll find much info about it.
here's one thread that describes howto associate mimetypes.
There is also a howto on the oesf wiki about mimetypes.

Also in that thread is mention of a script that was never included on the Zaurus that handles mimetypes for you. qtopia-addmimetype
I was curious, and googled for that script, and found it.
I'll paste it here, in case someone can use it.

if [ -z "$NEWTYPE" -o -z "$EXT" ]
   echo >&2 "Usage: $0 <mimetype> <extension>"
   echo >&2 " eg. $0 application/foobar foo"
   exit 1

# Can ash do this? If not, use sed.

grep -w $EXT $QPEDIR/etc/mime.types |
   read TYPE EXTS
   if [ -z "$TYPE" ]
       if grep -q "^$NEWTYPE[ ]" $QPEDIR/etc/mime.types || grep -q "^$NEWTYPE$" $QPEDIR/etc/mime.types
           if sed -e '/^'$T"\\/"$S'[ ]/ s/$/ '$EXT'/' <$QPEDIR/etc/mime.types >$QPEDIR/etc/ ||
              sed -e '/^'$T"\\/"$S'$/ s/$/ '$EXT'/' <$QPEDIR/etc/mime.types >$QPEDIR/etc/
               mv $QPEDIR/etc/ $QPEDIR/etc/mime.types
               exit 0
               echo >&2 "Internal MIME type update error"
               exit 1
           echo "$NEWTYPE $EXT" >>$QPEDIR/etc/mime.types
           exit 0
   elif [ "$TYPE" = "$NEWTYPE" ]
       #echo "Already done"
       exit 0
       echo >&2 "$EXT already assigned to $TYPE"
       exit 1

I also found this Japanese mimetype tool, but never figured out how to use it.
All the dialogs, etc. are in Japanese. I have attached it here
Mimetypetool requires Ruby be installed in Sharp/Cacko.


Install ruby-qte_0.5.1-1_arm.ipk first to avoid dependency warning when installing ruby_1.8.0-1_arm.ipk

For your Tree!Explorer question, you have to have the registered version for images and files to be launched from it's interface.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.