Monday, November 14, 2016

Kernel error after update centos 7 3.10.0-327.36.3.el7

Kernel error after update centos 7 3.10.0-327.36.3.el7

For installed system:
  - boot with the initcall_blacklist=clocksource_done_booting kernel parameter added  (or reboot on previous kernel)
  - once booted, add the same parameter at the end of the GRUB_CMDLINE_LINUX=" .." line , in the  file /etc/default/grub - as root, run "grub2-mkconfig -o /etc/grub2.conf" 

For a system you want to install:
  - start the kernel/boot media with the initcall_blacklist=clocksource_done_booting kernel
 parameter added
  - when you reboot, add the solution above (for installed system) if not already applied to
 the default grub config

Thursday, October 13, 2016

Gimp 2.8 antialiasing error

Gimp 2.8 antialiasing error (fedora 24 and other linux distributions).

echo "<fontconfig>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>none</const>
    </edit>
  </match>
</fontconfig>" > /etc/gimp/2\.0/fonts.conf
 
Ref.
https://bbs.archlinux.org/viewtopic.php?pid=1486825#p1486825 

Thursday, October 6, 2016

Editing scantofile

I'm editing the scantofile for my new Brother DCP Scanner.  Hard Work searching the information.

----------
#! /bin/sh
set +o noclobber
#
#   $1 = scanner device
#   $2 = friendly name
#

#  
#       100,200,300,400,600
#
resolution=200
device=$1
BASE=$HOME/Documents/BrScan
mkdir -p $BASE
if [ "`which usleep  2>/dev/null `" != '' ];then
    usleep 1000000
else
    sleep  0.01
fi
output_tmp=$BASE/$(date +"%Y-%m-%d_%Hh%M")

echo "scan from $2($device)"
scanimage --device-name "$device" --resolution $resolution --batch="$output_tmp"_%04d.tiff  --format=tiff -x 210 -y 297

for tifffile in $(ls "$output_tmp"*)
do
   tiffcp -c lzw "$tifffile" "$tifffile".lzw.tiff
   tiff2pdf "$tifffile".lzw.tiff > "$tifffile".pdf
   rm -f "$tifffile"
   rm -f "$tifffile".lzw.tiff
done

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile="$output_tmp".pdf $output_tmp*.pdf

rm -f "$output_tmp"*tiff*
----------

Ref.
http://www.jduck.net/blog/2008/01/05/ocr-scanning/
https://gist.github.com/sunix/3263040
http://stackoverflow.com/questions/2507766/merge-convert-multiple-pdf-files-into-one-pdf