如何禁用 evince-thumbnailer

如何禁用 evince-thumbnailer

我想禁用 evince-thumbnailer,因为日志文件的容量不断增加。

让我知道如何禁用 evince-thumbnailer。

答案1

要在系统范围内禁用它,请注释掉以下Exec=/usr/share/thumbnailers/evince.thumbnailer

sudo sed -i 's/^Exec=/# &/' /usr/share/thumbnailers/evince.thumbnailer
user@user-X550CL ~/tmp % sudo sed -i 's/^Exec=/# &/' /usr/share/thumbnailers/evince.thumbnailer
user@user-X550CL ~/tmp % cat /usr/share/thumbnailers/evince.thumbnailer
[Thumbnailer Entry]
TryExec=evince-thumbnailer
# Exec=evince-thumbnailer -s %s %u %o
MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-xzpdf;application/x-ext-pdf;application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;application/x-ext-ps;application/x-ext-eps;application/x-dvi;application/x-bzdvi;application/x-gzdvi;application/x-ext-dvi;image/vnd.djvu;application/x-ext-djv;application/x-ext-djvu;image/tiff;application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/x-ext-cb7;application/x-ext-cbt;application/oxps;application/vnd.ms-xpsdocument

要重新启用它,请再次取消注释:

sudo sed -i 's/^# \(Exec=\)/\1/' /usr/share/thumbnailers/evince.thumbnailer
user@user-X550CL ~/tmp % sudo sed -i 's/^# \(Exec=\)/\1/' /usr/share/thumbnailers/evince.thumbnailer
user@user-X550CL ~/tmp % cat /usr/share/thumbnailers/evince.thumbnailer
[Thumbnailer Entry]
TryExec=evince-thumbnailer
Exec=evince-thumbnailer -s %s %u %o
MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-xzpdf;application/x-ext-pdf;application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;application/x-ext-ps;application/x-ext-eps;application/x-dvi;application/x-bzdvi;application/x-gzdvi;application/x-ext-dvi;image/vnd.djvu;application/x-ext-djv;application/x-ext-djvu;image/tiff;application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/x-ext-cb7;application/x-ext-cbt;application/oxps;application/vnd.ms-xpsdocument

答案2

只需sudo apt-get remove evince安装 okular。这可以帮助我可怜的 ThinkPad 不再死机。

答案3

kos 的答案是正确的。但是,实现起来可能更简单。只需:

cd /usr/share/thumbnailers
sudo nano evince.thumbnailer 
# enter superuser password
# then uncomment the Exec line by entering a # sign as the first character in the line
# exit nano with Ctrl-X, press y, press Enter, DONE!

相关内容