I don’t like installing stuff on my system I don’t need but do find that being able to take screenshots useful – particularly when writing up articles for this blog. However while the screenshot utility used to be a separate package in earlier versions of Debian if you are using the MATE desktop environment it is part of the ‘mate-utils’ package which includes several other utilities I don’t use.
Since I don’t want the extra utilities I tend to install the whole package, backup up the files needed for ‘mate-screenshot’ and then remove the package from my system before restoring just the files needed for ‘mate-screenshot’.
First you need to install ‘mate-utils’.
# apt-get install mate-utils Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmatedict6 mate-utils-common The following NEW packages will be installed: libmatedict6 mate-utils mate-utils-common 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 1,000 kB of archives. After this operation, 7,991 kB of additional disk space will be used. Do you want to continue? [Y/n] : : : Processing triggers for libc-bin (2.19-18) ... #
Then backup the files needed for ‘mate-screenshot’.
# cd / # tar -cvpf mate-screenshot-amd64.tar \ > usr/share/man/man1/mate-screenshot.1.gz \ > usr/bin/mate-screenshot \ > usr/share/glib-2.0/schemas/org.mate.screenshot.gschema.xml \ > usr/share/mate-screenshot/mate-screenshot.ui usr/share/man/man1/mate-screenshot.1.gz usr/bin/mate-screenshot usr/share/glib-2.0/schemas/org.mate.screenshot.gschema.xml usr/share/mate-screenshot/mate-screenshot.ui #
Before removing all the packages installed with ‘mate-utils’…
# apt-get purge mate-utils mate-utils-common libmatedict6 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: libmatedict6* mate-utils* mate-utils-common* 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. After this operation, 7,991 kB disk space will be freed. Do you want to continue? [Y/n] : : : #
When that is done you just need to restore the files backed up earlier, and re-compile the schemas.
# tar -xvpf mate-screenshot-amd64.tar usr/share/man/man1/mate-screenshot.1.gz usr/bin/mate-screenshot usr/share/glib-2.0/schemas/org.mate.screenshot.gschema.xml usr/share/mate-screenshot/mate-screenshot.ui # /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ #
It may seem like a lot of work for just 8 MB of disk space but my first hard disk was the same size as that!