-
-
Save m-bartlett/c2db302fe272276022bd0047c2408fc8 to your computer and use it in GitHub Desktop.
Remove wine file associations. https://askubuntu.com/questions/323437/how-to-prevent-wine-from-adding-file-associations
This file contains hidden or 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 | |
# Prevent the wine to add mime file association. | |
# Implements https://askubuntu.com/questions/323437/how-to-prevent-wine-from-adding-file-associations | |
set -o xtrace | |
rm -f ~/.local/share/mime/packages/x-wine* | |
rm -f ~/.local/share/applications/wine-extension* | |
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension* | |
rm -f ~/.local/share/mime/application/x-wine-extension* | |
sudo sed -i 's/winemenubuilder.exe -a -r/winemenubuilder.exe -r/g' /usr/share/wine/wine.inf | |
if [[ "$WINEPREFIX" = "" ]]; then | |
WINEPREFIX="$HOME/.wine" | |
fi | |
if [[ -f "$WINEPREFIX/system.reg" ]]; then | |
sed -i 's/winemenubuilder.exe -a -r/winemenubuilder.exe -r/g' "$WINEPREFIX/system.reg" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment