Gnome Compatibility

Here is a quick tip (from Guillaume Millet) to synchronize the ROX and Gnome file associations automatically. Just create the following script and save it in ~/.config/rox.sourceforge.net/MIME-types/ as "application", "video", "audio" and "image".

These are the fallback handlers for each of the basic MIME-types. If a more specific handler is defined it will override these, so you can maintain some differences if it is so desired.

#!/bin/sh
app=$(gnomevfs-info -s "$1" | grep "Default app" | sed 's/.*\: //')
if [ -e ~/.local/share/applications/$app ] ; then
	exec $(grep "^Exec" ~/.local/share/applications/$app | sed 's/Exec=//;s/%[a-zA-Z]//') "$@"
fi
if [ -e /usr/share/applications/$app ] ; then
	exec $(grep "^Exec" /usr/share/applications/$app | sed 's/Exec=//;s/%[a-zA-Z]//') "$@"
fi

Don't forget to make the script executable (chmod +x filename).