Created
December 24, 2020 20:47
-
-
Save ailtonbsj/377f6707db9666ced22c170aa073537d to your computer and use it in GitHub Desktop.
This script fix PDF Thumbnails on Lubuntu
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 | |
armorFile="/etc/apparmor.d/usr.bin.evince" | |
hadWxFixed=$(cat $armorFile | grep "WinuniX") | |
if [ "$hadWxFixed" == "" ]; then | |
NUM=$(cat $armorFile | grep 'owner /tmp/evince-thumbnailer\*/{,\*\*} rw,' -n | cut -d':' -f1) | |
sed -i $(($NUM+1))"i\ \ # WinuniX added this line" $armorFile | |
sed -i $(($NUM+2))"i\ \ owner /home/\*/.cache/thumbnails/\*/\*.\* rw," $armorFile | |
apparmor_parser -r $armorFile | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment