Skip to content

Instantly share code, notes, and snippets.

@CzBiX
Last active November 5, 2017 05:52
Show Gist options
  • Save CzBiX/8608f3520b92a77c79e0 to your computer and use it in GitHub Desktop.
Save CzBiX/8608f3520b92a77c79e0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Author: CzBiX
# URL: https://gist.github.com/CzBiX/8608f3520b92a77c79e0
DEST_PACKAGE="unity"
DEST_VERSION="7.3.2+15.10.20151016-0ubuntu1"
DEST_FILE="/usr/lib/compiz/libunityshell.so"
DEST_FILE_HASH="d1be69f0dc23f8a69441359b9aea27f4"
PATCH_DATA="341b76: 909090909090"
SUCCESS_MSG="Please log out to make patch work."
function failed {
echo >&2 $1;
exit 1;
}
[ $(arch) == 'x86_64' ] || failed "only support x86_64."
type xxd >/dev/null 2>&1 || failed "xxd not found, please install vim."
[ $(apt-cache policy $DEST_PACKAGE | grep Installed | cut -d ' ' -f 4) == $DEST_VERSION ] || failed "$DEST_PACKAGE version not match with '$DEST_VERSION'."
[ $(md5sum $DEST_FILE | cut -d ' ' -f 1) == $DEST_FILE_HASH ] || failed "dest file hash not match"
echo $PATCH_DATA | sudo xxd -r - $DEST_FILE || failed "patch failed."
echo $SUCCESS_MSG
@Hitechcomputergeek
Copy link

After running this for a few days (I have rebooted since I installed this), I have noticed that it seems to work sometimes - however, for some reason, now occasionally (for no clear reason) when I click the Files icon, it will open a new Files window - EVEN IF I only have a location/locations open that are inside my home directory. It has also done this for when the Trash is open. Is this a bug in the patch?

Also, I'm not going to revert this for now (the problem above is less annoying than the problem this patch was designed to fix), but I would suggest adding a line to the script to echo information on how to remove this if you need to.

@ankurk91
Copy link

ankurk91 commented Feb 1, 2016

Thanks, worked like charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment