4 # Copyright © 2007 VideoLAN team
6 # Authors: http://forum.videolan.org/viewtopic.php?f=13&t=40560
7 # Rafaël Carré <funman@videolanorg>
9 # Sets VLC media player the default application for video mime types
10 # on a freedesktop compliant desktop
13 MIME_FILE
=~
/.local
/share
/applications
/defaults.list
15 if [ ! -f $MIME_FILE ]
16 then echo "[Default Applications]" > $MIME_FILE
17 else grep -v 'video/' $MIME_FILE > /tmp
/vlc.defaults.list.tmp
18 mv /tmp
/vlc.defaults.list.tmp
$MIME_FILE
21 ls /usr
/share
/mime
/video
/* |
sed -e 's@/usr/share/mime/@@' -e 's/\.xml/=vlc.desktop/' >> $MIME_FILE