安装 Adobe Reader 后,
Home 会出现奇怪的档案名叫 C\:\\nppdf32Log\\debuglog.txt
解决方法:
$ cd ~
$ gedit fix_nppdf.py
---------------------------------------------------------------
#! /usr/bin/python3
#
# Save and Run as:
# "sudo ./fix_nppdf.py /opt/Adobe/Reader9/Browser/intellinux/nppdf.so"
#
import mmap, sys
target = br'C:\nppdf32Log\debuglog.txt'
replacement = br'/dev/null'
replacement += b'\0' * (len(target) - len(replacement))
with open(sys.argv[1], 'r+') as f:
m = mmap.mmap(f.fileno(), 0)
offset = m.find(target)
assert offset != -1
m[offset:offset+len(target)] = replacement
---------------------------------------------------------------
2. 再将这文档赋予执行权限
$ chmod +x fix_nppdf.py
3. 运行..
$ sudo ./fix_nppdf.py /opt/Adobe/Reader9/Browser/intellinux/nppdf.so
没有评论:
发表评论