Skip to content

Instantly share code, notes, and snippets.

@CzBiX
Last active June 6, 2021 07:25
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CzBiX/e64256b23687bb13da02 to your computer and use it in GitHub Desktop.
Save CzBiX/e64256b23687bb13da02 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Author: CzBiX
# URL: https://gist.github.com/CzBiX/e64256b23687bb13da02
# Support only Ubuntu 16.04
DEST_PACKAGE="libglib2.0-0"
DEST_VERSION="2.48.1-1~ubuntu16.04.1"
DEST_FILE="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1"
PATCH_DATA="f626c: eb"
SUCCESS_MSG="Please quit nautilus with 'nautilus -q' to make sure patch worked."
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'."
echo $PATCH_DATA | sudo xxd -r - $DEST_FILE || failed "patch failed."
echo $SUCCESS_MSG
@mohicanb
Copy link

Hello, with Ubuntu 16.04.1 the package was updated to version 2.48.1-1-ubuntu16.04.1
So I guess I can't use your patch.
Any news from the devs ?

@mcg
Copy link

mcg commented Aug 24, 2016

@CzBiX Can you update to 16.04.1? Nuts that this is still broken.

@CzBiX
Copy link
Author

CzBiX commented Aug 29, 2016

@mohicanb @mcg Just updated for Ubuntu 16.04.1. Please try it.

@mcg
Copy link

mcg commented Oct 11, 2016

@CzBiX Never saw that you had updated to 16.04.1, but I updated to 16.10 hoping it was fixed and it's still broken. AARGH...

@Sadi58
Copy link

Sadi58 commented Oct 24, 2016

Unfortunately the problem has got worse in Ubuntu 16.10 with Nautilus 3.20.3: nothing can be moved to the "Rubbish Bin" anywhere (accessed directly or via symlink) in an NTFS partition on an internal hard disk now (the reason given for this is "Unable to find or create wastebasket directory" and manually creating such a directory leads to nothing) although no such problem exists for removable media such as USB hard disks.

I wish I knew how to compile libglib from source (https://launchpad.net/ubuntu/+source/glib2.0/2.50.0-1) excluding that patch apparently causing this annoying side effect: https://sources.debian.net/patches/glib2.0/2.50.1-1/0001-Fix-trashing-on-overlayfs.patch/

Maybe you can also include step-by-step instructions for this???

@AntoniosHadji
Copy link

This worked on my install of 16.04.01. How can I make this change in code instead of using the binary patch?

@CzBiX
Copy link
Author

CzBiX commented Nov 11, 2016

@Sadi58 Sorry, but the steps are hard to teach if you are not developer.
@AntoniosHadji compile source without debian/patches/0001-Fix-trashing-on-overlayfs.patch.

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