Created
September 29, 2011 14:41
-
-
Save flying-sheep/1250868 to your computer and use it in GitHub Desktop.
A bug exists for ages in Kubuntu (and afaik only there) that can be fixed by removing a superfluous file and rebuilding the MIME DB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROOT_UID=0 | |
FIX_JAR_MIME="rm -vf /usr/share/mime/packages/sun-java*-jre.xml | |
update-mime-database /usr/share/mime" | |
if [ "$UID" -ne "$ROOT_UID" ]; then | |
kdesudo -c "$FIX_JAR_MIME" | |
kbuildsycoca4 #only possible if run as underprivileged | |
else | |
"$FIX_JAR_MIME" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment