Greg Peterson

Technical notes, mostly on CentOS and applications.
Jan 5, 2014

Software updates 2014-01-05

I'm updating software before university classes resume on January 6th. Updates go in /usr/local/share on my machines.

CentOS-6-i686 Applications

pkgs/coreutils -> coreutils-8.22
pkgs/emacs -> emacs-24.3.50-20140104
pkgs/grep -> grep-2.16
pkgs/Python27 -> Python-2.7.6
pkgs/R -> R-3.0.2
pkgs/racket -> racket-5.3.6

Common files

fonts/SourceSansPro_FontsOnly-1.050

java-site/pkgs/apache-ant -> apache-ant-1.9.3
java-site/pkgs/apache-maven -> apache-maven-3.1.1
java-site/pkgs/apache-maven2 -> apache-maven-2.2.1
java-site/pkgs/fop -> fop-1.1
java-site/pkgs/kawa/kawa.jar -> kawa-1.14.jar
java-site/pkgs/pdfbox/pdfbox-app.jar -> pdfbox-app-1.8.3.jar
java-site/pkgs/saxonhe9 -> saxonhe9-5-1-2j
java-site/pkgs/tika/tika-app.jar -> tika-app-1.4.jar

xml/docbook/5.1RC2
xml/html5 -> bitbucket.org/validator/syntax
xml/jats/1.1/  (Article Authoring {dtd,rng,xsd} - generated rnc with trang
xml/tei -> tei-2.5.0-xsl-7.6.0

Comments on common files

All workstations and servers that I use run either GNU/Linux or Mac OS X, and all of them use the same Emacs lisp code, Java programs, and XML schema and stylesheets. Application software packages such as GNU Emacs and some utility programs are compiled separately on each operating system, but they are configured to use common files. For example, my GNU Emacs load-path and site-start.el are the same on all machines, so my software environment remains the same across machines. I use as many as nine different computers in a week. Each has its idiosyncracies, but I never have to struggle with different configurations of locally installed application software.

I use five operating systems: CentOS-6-i686, CentOS-6-x86_64, Fedora 20 (one laptop to test software), Mac OS X, and Red Hat enterprise Linux. I use the same software at home and at my university. My CentOS-6-i686 shared files are installed on a Red Hat Enterprise Linux application server and mounted on 82 CentOS-6-i686 student workstations (/usr/local/).

The RHEL and CentOS machines at the university are maintained by our vendor, so operating system updates often fall behind; however, they are close enough that I have never had trouble running software compiled on my personal systems.

END

Jan 4, 2014

Old scriptogram files lost?

UPDATE 2014-01-11

I restored my old files from Time Machine on my MacBook. I could not find them anywhere on Dropbox. Scriptogram admin did not reply to my comment.

Original post 2014-01-04

Today I logged in to scriptogr.am after a long absence. I was treated as a new user, although I have some posts from last year ad before. What happened?

Jun 23, 2013

Chromium on CentOS-6

Replace Google Chrome with Chromium

I replaced Google Chrome with Chromium on CentOS. This proceedure uses the yum packaging system. It is based on work by Johnny Hughes, package maintainer for CentOS. He explains how to install Chromium in a reply to a blog post, No more support for chrome/chromium on rhel6.

Quit Google Chrome

1. Edit yum repository files.

Disable /etc/yum.repos.d/google-chrome.repo moved to google-chrome.repo-OLD):

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=0
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

Create /etc/yum.repos.d/chromium-el6.repo:

[chromium-el6]
name=CentOS-$releasever - Chromium EL6
baseurl=http://people.centos.org/hughesjr/chromium/6/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Testing-6

2. Replace Google Chrome with Chromium:

# yum remove google-chrome
# yum install chromium

3. Run scripts to setup extras (see Johnny's blog post). Run as root:

# sh ./chrome_libpdf_copy.sh
# sh ./chrome_pepperflash_copy.sh

4. As a user run chromium. Setup accounts, desktop, etc.

Warning! I logged into my Google account and used my Google Chrome settings, which worked fine. They remained remained in the system after I replaced Google Chrome with Chromium. Several of my computers use Google Chrome. This might not work for users with one CentOS system and no other Google Chrome installations. In that case first backup the Google Chrome settings (~/.config/google-chrome/Default/ ).

In addition to the steps for yum package replacement, I set Chromium as the preferred Web browser and made a launcer icon for the Gnome2 (Cinnamon) panel. These files were generated:

File: ~/.gconf/desktop/gnome/applications/browser/%gconf.xml

<?xml version="1.0"?>
<gconf>
        <entry name="needs_term" mtime="1331463315" type="bool" value="false"/>
        <entry name="exec" mtime="1371964572" type="string">
                <stringvalue>/opt/chromium/chrome-wrapper</stringvalue>
        </entry>
        <entry name="nremote" mtime="1331463315" type="bool" value="true"/>
</gconf>

File: ~/.local/share/applications/preferred-web-browser.desktop

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Chromium
GenericName=Web Browser
Exec=/opt/chromium/chrome-wrapper %U
Terminal=false
Icon=/opt/chromium/product_logo_48.png
Type=Application
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;
X-Panel-Monitor=true
NoDisplay=true

Why Replace Google Chrome on CentOS?

Google Chrome is a branded version of Chromium. It runs consistently across many platforms, enabling users to easily maintain bookmarks, passwords, etc. in a shared database on Google servers. I have been using Google Chrome as my default browser on an Android tablet, iPhone, MacOS X, and CentOS-6.

Beginning with version 26 Google Chrome is no longer supported on CentOS. A list of supported Linux operating systems as of Google Chrome version 28 is shown on Stable Channel Update. I prefer CentOS to other Linux distributions. I also like to have common bookmarks and other data, so I decided to replace Google Chrome with Chromium.

END

Mar 23, 2013

CentOS-6-686: Maintaining Local Shared Libraries

Rationale

Red Hat Enterprise Linux and CentOS system administrators may install and maintain software that is not included in vendor-supported repositories. Such software should be installed outside the base system, especially if the operating system is supported by a vendor. For example, /usr/local/share/ is suitable for an application server when client machines that run the same operating system mount /usr/local/share/ via NFS.

Linux computers use shared object libraries (*.so files) that are loaded as necessary by the dynamic linker, ld.so(8) or ld-linux.so(8). Configuration of this system is done by editing /etc/ld.so.conf and files in the /etc/ld.so.conf.d/ directory. The configuration can be installed and updated with the ldconfig(8) command.

Local shared libraries can be maintained by adding one line to /etc/ld.so.conf. This small modification works well in enterprise environments where vendors maintain the base Red Hat Enterprise Linux or CentOS system and enterprise system administrators maintain local software. Local software installation may be done without any further changes to the vendor-supported system.

Procedures

At Kyoto Notre Dame University I maintain some local software on a vendor-supported application server. The following steps have worked well with Red Hat Enterprise Linux

In order to use add shared library files in /usr/local/share/ directories, I use this method (username and hostname have been changed for this document):

  1. Edit system configuration for ldconfig(8) in /etc/ld.so.conf (I did this when our current application server was installed in 2011)

      greg@gold% ls -l /etc/ld.so.conf
      -rw-r--r-- 1 root root 77 Oct  2  2011 /etc/ld.so.conf
      greg@gold% cat /etc/ld.so.conf
      include ld.so.conf.d/\*.conf
      include /usr/local/share/etc/ld.so.conf.d/*.conf
    
  2. Create a *.conf file for each directory in /usr/local/share/:

      greg@gold% ls -l /usr/local/share/etc/ld.so.conf.d/
      total 16
      -rw-r--r-- 1 root root  38 Oct  2  2011 ImageMagick.conf
      -rw-r--r-- 1 root root  29 Feb  5  2012 lib-centos6.conf
      -rw-r--r-- 1 root root  34 Oct  2  2011 R.conf
      -rw-r--r-- 1 root root 286 Oct  2  2011 README
      greg@gold% cat /usr/local/share/etc/ld.so.conf.d/lib-centos6.conf
      /usr/local/share/lib-centos6
    
  3. I compiled GNU Emacs on a CentOS-6.4 machine with the latest libraries A successful installation of the latest version of GNU Emacs required a newer version of libjpeg.so than we had on our application server. The JPEG library in /usr/lib/ is older, so I copied a newer library from another machine (latest version of CentOS-6-i686) to a local directory:

      greg@gold% ls -l /usr/local/share/lib-centos6/ | grep jpeg
      lrwxrwxrwx 1 root root      17 Mar 21 14:12 libjpeg.so -> libjpeg.so.62.0.0*
      lrwxrwxrwx 1 root root      17 Mar 21 14:12 libjpeg.so.62 -> libjpeg.so.62.0.0*
      -rwxr-xr-x 1 root root  291256 Feb 22 07:49 libjpeg.so.62.0.0*
    
  4. Each time we add a library (*.so file), "root" must update /etc/ld.so.cache:

      root@gold ~]# ldconfig
      [root@gold ~]# ldconfig -p | grep libjpeg
          libjpeg.so.62 (libc6) => /usr/local/share/lib-centos6/libjpeg.so.62
      libjpeg.so.62 (libc6) => /usr/lib/libjpeg.so.62
      libjpeg.so (libc6) => /usr/local/share/lib-centos6/libjpeg.so
      libjpeg.so (libc6) => /usr/lib/libjpeg.so
      [root@gold ~]#
    
  5. Client machines that mount /usr/local/share/ must update /etc/ld.so.cache as well. This can be done by running ldconfig(8) if necessary. At our university all client machines are dual-boot Windows 7 and CentOS computers. Students and instructors who use Linux start from cold boot or reboot from Windows 7.

$Id: 20130323-shared-object-libraries.md,v 1.4 2013/03/23 06:40:38 peterson Exp $

Feb 29, 2012

LibreOffice on CentOS

Why LibreOffice?

LibreOffice is a fork of OpenOffice.org a free office suite derived from Star Office. Both are excellent replacements for Microsoft Office or other expensive products. LibreOffice developers created the new project after Oracle took over OpenOffice.org from Sun. Now LibreOffice development is in the lead.

OpenOffice is packaged with CentOS, but for LibreOffice we need to work a little hearder. Some people say it's worth the effort.

Remove old local installation

I had LibreOffice 3.4, registered with yum, but it was local (/usr/local/share/pkgs/) and not integrated with the desktop.

Remove yum installation:

sudo yum remove `yum search libreoffice | cut -d: -f1 | grep '^lib' | xargs`

Go to local package directory:

cd /usr/local/share/pkgs

Remove the old package

rm -rf LibO_3.4.2rc3_Linux_x8/

Remove old package symlinks:

rm -f libreoffice*

Remove symlinks from /usr/local/share/bin/ (sbase scalc sdraw simpress smath soffice spadmin swriter unoinfo unopkg):

rm -f `ls -l | grep libre | sed "s/  */ /g" | cut -d" " -f9 | xargs`

Download

LibreOffice is not in the CentOS packaging system, so I followed proceedures by Antoine on Pastebin.com (download method differs from his).

First I downloaded several packages (http://download.documentfoundation.org/libreoffice/stable/3.5.0/rpm/x86/):

 LibO_3.5.0_Linux_x86_helppack-rpm_en-US.tar.gz
 LibO_3.5.0_Linux_x86_install-rpm_en-US.tar.gz
 LibO_3.5.0_Linux_x86_langpack-rpm_ja.tar.gz

Install

I unpacked each .tar.gz file (tar zxvpf LibO*tar.gz) into its own directory */RPMS directory, then installed the RPM files.

 greg@localhost:RPMS$ sudo yum install *.rpm

There were 53 packages in the main install set, 1 in the helppack, and 7 in the Japanese language pack (langpack-rpm_ja).

Desktop integration:

 cd LibO_3.5.0rc3_Linux_x86_install-rpm_en-US/RPMS/desktop-integration/
 sudo yum install libreoffice3.5-freedesktop-menus-3.5-13.noarch.rpm

Some errors were reported by yum in this installation:

 Install       1 Package(s)

 Total size: 1.5 M
 Installed size: 1.5 M
 Is this ok [y/N]: y
 Downloading Packages:
 Running rpm_check_debug
 Running Transaction Test
 Transaction Test Succeeded
 Running Transaction
   Installing : libreoffice3.5-freedesktop-menus-3.5-13.noarch 1/1 
 /usr/bin/update-desktop-database
 /usr/bin/update-mime-database
 Unknown media type in type 'all/all'
 Unknown media type in type 'all/allfiles'
 Unknown media type in type 'uri/mms'
 Unknown media type in type 'uri/mmst'
 Unknown media type in type 'uri/mmsu'
 Unknown media type in type 'uri/pnm'
 Unknown media type in type 'uri/rtspt'
 Unknown media type in type 'uri/rtspu'
 Unknown media type in type 'fonts/package'
 Unknown media type in type 'interface/x-winamp-skin'
 mkdir: cannot create directory 
    `/usr/share/icons/hicolor/icon-theme.cache': Not a directory
 mkdir: cannot create directory 
    `/usr/share/icons/hicolor/index.theme': Not a directory
 /usr/bin/gtk-update-icon-cache
 /usr/bin/gtk-update-icon-cache
 /usr/bin/update-desktop-database
 /usr/bin/update-desktop-database

 Installed:
     libreoffice3.5-freedesktop-menus.noarch 0:3.5-13

 Complete!

Installation seems okay. Now Gnome Applications/Office menu shows LibreOffice Base, Calc, Draw, Impress, Printer Administration, and Writer. As far as I can tell, LibreOffice (LibO_3.5.0rc3_Linux_x86*) runs fine on CentOS-6-i686.

Post-install configurations

Create a launcher for the Gnome-2 Panel:

Desc: LibreOffice Start Center 
Prog: /opt/libreoffice3.5/program/soffice
Icon: /usr/share/icons/hicolor/256x256/apps/libreoffice3.5-startcenter.png

Create symbolic links tin a local ${PATH} directory (/usr/local/share/bin) for command-line use of these programs: sbase scalc, sdraw, simpress, smath, soffice, spadmin, and swriter:

greg@romeo:program$ pwd                       
/opt/libreoffice3.5/program
greg@romeo:program$ ln -sf `pwd`/sbase /usr/local/share/bin
greg@romeo:program$ ln -sf `pwd`/scalc /usr/local/share/bin

END

Feb 24, 2012

CentOS laptop temperature sensor

Fan error on boot

Today my ThinkPad X61 failed to boot. As the system came up, “Fan error” appeared in the upper left corner of the display, and then the machine shut itself off. It will boot if I press “Esc” at that time.

Package “lm_sensors”

I was worried about overheating, so I searched for a way to monitor temperatures. This package seems to work:

lm_sensors.i686 : Hardware monitoring tools

I installed it and then ran “sudo sensors” on the command line. The command showed some errors on STDERR, probably because there are no sensors for some measurements. Temperautres were okay, but the machine was still cool. It showed Fan 2 not running (0 RPM), which is bad news.

Fan connections

Following instructions in the X61 Hardware Maintenance Manual, I pulled out the battery and removed the keyboard. Fan 2 sits in the upper left corner as you look at the display. I traced the cables and tightened two screws a little.

With the keyboard still attached to the motherboard, I put in the battery and started the X61. Then fan began to spin, then stopped, and the machine booted with no error messages. I shut it down, replaced the keyboard, and booted again. No errors appeared.

Temperature monitoring

I ran “sudo sensors” on the command line again. This time it showed both fans running, and temperatures looked good. Now, after running several hours, installing some updates, and doing other normal work the STDOUT looks like this:

acpitz-virtual-0
Adapter: Virtual device
temp1:       +47.0°C  (crit = +127.0°C)                  
temp2:       +39.0°C  (crit = +99.0°C)                  

thinkpad-isa-0000
Adapter: ISA adapter
fan1:       3414 RPM
fan2:       7449 RPM
temp1:       +47.0°C                                    
temp2:       +46.0°C                                    
temp3:       +46.0°C                                    
temp4:       +42.0°C                                    
temp5:       +32.0°C                                    
temp6:       +50.0°C                                    
temp7:       +30.0°C                                    
temp8:       +32.0°C                                    
temp9:       +46.0°C                                    
temp10:      +40.0°C                                    
temp11:       +0.0°C                                    
temp12:       +0.0°C                                    
temp13:       +0.0°C                                    
temp14:       +0.0°C                                    
temp15:       +0.0°C                                    
temp16:       +0.0°C                                    

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +43.0°C  (high = +105.0°C, crit = +105.0°C)  
Core 1:      +44.0°C  (high = +105.0°C, crit = +105.0°C)  

Those temperatures look okay,

END

Feb 20, 2012

Comparing Software Package Lists on CentOS

Sometimes we want to compare lists of software packages on CentOS, Fedora, or Red Hat Enterprise Linux computers. These systems use a common package management system: yum(8). We can compare packages on different computers or on one computer at different times.

Below is a little script that compares yum(8) installations. It takes two arguments, filenames OLDLIST and NEWLIST, and shows packages that are in NEWLIST but not in OLDLIST.

yum-compare-installations.sh

 #!/bin/sh
 # Compare two lists of installed yum packages on CentOS|Fedora|RHEL.
 # INPUT :  Two text files, output from "yum list installed > FILE
 # INPREP:  Strip versions and repository info, keep package names.
 # OUTPUT: diff -y --suppress-common-lines *sum
 diffpar="-y --ignore-blank-lines --suppress-common-lines"
 prog=$0
 if [ $# -lt 2 ]; then
     echo "---------------------------------------------------------"
     echo "  Name     : ${prog}"
     echo "  Synopsis : ${prog} OLDLIST NEWLIST"
     echo "           : Compare two lists of YUM installed packages"
     echo "  Arguments: OLDLIST NEWLIST (from \"yum list installed\")"
     echo "  Process 1: cut -d' ' -f1 OLDLIST > TMPF1"
     echo "  Process 2: cut -d' ' -f1 NEWLIST > TMPF2"
     echo "  Process 3: diff ${diffpar} TMPF1 TMPF2"
     echo "  Process 4: rm -f TMPF1 TMPF2"
     echo "  Output   : Package names in NEWLIST not in OLDLIST"
     echo "  Use case : List packages to install on OLDLIST PC."
     echo "---------------------------------------------------------"
     exit 99
 fi
 list1="list1-${$}-${1}"
 list2="list2-${$}-${2}"
 if [ -f ${list1} ]; then rm -f ${list1}; fi
 if [ -f ${list2} ]; then rm -f ${list2}; fi
 cut -d' ' -f1 ${1} > ${list1}
 cut -d' ' -f1 ${2} > ${list2}
 echo "Compare \"${1}\" left and \"${2}\" right"
 echo "-------------------------------------------------------------"
 diff ${diffpar} ${list1} ${list2} | sed 's/^[\t ]*//g' | grep -v '<'
 echo "-------------------------------------------------------------"
 rm -f ${list1} ${list2}
 echo "END"
 exit 0
 # END

Caveats

Do not run this script as root.

This script is just quick-and-dirty hack that helps me identify packages that I might want to add to new installations of CentOS or Fedora. I run it only as a normal user in temporary directories that I remove after I finish using it. Do not run this script as root!

END

Feb 7, 2012

Google Chrome on CentOS-6

I followed instructions at If-Not-True-Then-False

Remove old google-chrome if necessary

My ThnkPad X61 had an old google-chrome (version 13) package, but yum did not show it in any repository. Before installing from the Google Chrome repository, I removed the old one:

greg@localhost:cmc$ sudo yum remove google-chrome
[sudo] password for greg: 
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package google-chrome-stable.i386 0:13.0.782.112-95650 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================
Package                 Arch  Version            Repository     Size
=====================================================================
Removing:
 google-chrome-stable   i386  13.0.782.112-95650 installed       97 M
=====================================================================
Transaction Summary

Remove        1 Package(s)

Installed size: 97 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing    : google-chrome-stable-13.0.782.112-95650.i386     1/1 
Removed:
 google-chrome-stable.i386 0:13.0.782.112-95650    

Complete!
greg@localhost:cmc$ cd

Edit /etc/yum.repos.d/google.repo

[google-chrome]
# Google chrome
# See http://www.if-not-true-then-false.com/2010/\
install-google-chrome-with-yum-on-fedora-red-hat-rhel/
name=google-chrome - 32-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

Check repositories

greg@romeo:introduction$ yum search google-chrome            
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: ftp.nara.wide.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.nara.wide.ad.jp
 * rpmforge: fr2.rpmfind.net
 * updates: ftp.nara.wide.ad.jp
google-chrome         |  951 B     00:00     
google-chrome/primary | 1.4 kB     00:00     
google-chrome                            3/3
========== N/S Matched: google-chrome ==========
google-chrome-beta.i386 : Google Chrome
google-chrome-stable.i386 : Google Chrome
google-chrome-unstable.i386 : Google Chrome

Name and summary matches only, use "search all" for everything.
greg@romeo:introduction$ 

Install (romeo: unstable, tpx61a: stable)

sudo yum install google-chrome-unstable
\[sudo\] password for greg: 
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: rsync.atworks.co.jp
 * epel: ftp.iij.ad.jp
 * extras: rsync.atworks.co.jp
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: rsync.atworks.co.jp
google-chrome          |  951 B     00:00     
google-chrome/primary  | 1.4 kB     00:00     
google-chrome                             3/3
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Package google-chrome-unstable.i386 0:18.0.1025.3-120234 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================
Package                 Arch  Version            Repository     Size
=====================================================================
Installing:
google-chrome-unstable  i386  18.0.1025.3-120234  google-chrome  38 M

Transaction Summary
=====================================================================
Install       1 Package(s)

Total download size: 38 M
Installed size: 107 M
Is this ok [y/N]: y
Downloading Packages: 
google-chrome-unstable-18.0.1025.3-120234.i386.rpm   |  38 MB     00:13     
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
Retrieving key from https://dl-ssl.google.com/linux/linux_signing_key.pub
Importing GPG key 0x7FAC5991:
Userid: "Google, Inc. Linux Package Signing Key
<linux-packages-keymaster@google.com>
From  : https://dl-ssl.google.com/linux/linux_signing_key.pub
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
   Installing : google-chrome-unstable-18.0.1025.3-120234.i386  1/1

Installed: 
  google-chrome-unstable.i386 0:18.0.1025.3-120234

Complete!
greg@romeo:introduction$ 

Execute

greg@romeo:introduction$ google-chrome
/usr/bin/google-chrome: /lib/libz.so.1: no version information available (required by /usr/bin/google-chrome)
/usr/bin/google-chrome: /lib/libz.so.1: no version information available (required by /usr/bin/google-chrome)
/opt/google/chrome/chrome: /lib/libz.so.1: no version information available (required by /opt/google/chrome/chrome)
/opt/google/chrome/chrome: /lib/libz.so.1: no version information available (required by /opt/google/chrome/chrome)
[0207/181141:ERROR:nss_util.cc(89)] Failed to create /home/greg/.pki/nssdb directory.
LaunchProcess: failed to execvp:
/opt/google/chrome/nacl_helper_bootstrap
[2:2:23555894787:ERROR:nacl_fork_delegate_linux.cc(104)] Bad NaCl helper startup ack (0 bytes)
[6203:6203:23556489875:ERROR:browser_main_loop.cc(138)] GLib-GObject: gsignal.c:2270: signal `preedit-changed' is invalid for instance `0xb857b0f8'
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
[6203:6269:23598916835:ERROR:x509_certificate_nss.cc(926)] CERT_PKIXVerifyCert for www.google.com failed err=-8181
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/libz.so.1: no version information available (required by /proc/self/exe)

(exe:6378): Gdk-WARNING **: XID collision, trouble ahead
...

Sign in at Google

I signed in with my Google account, and then Chrome added my bookmarks, etc. It seems to be okay, although I'm seeing system error messages.

- gp

Feb 7, 2012

Markdown mime type for XDG

To make xdg-utils(1) use a Markdown mime-type for ".md" files, use [instrustions at Code Craft] (http://codecraft.io/2011/07/18/ubuntu-markdown-files-mime-type-and-association/ "Ubuntu - Markdown files, MIME type and .md association")

Make a mime type file

emacs ~/.local/share/mime/packages/x-web-markdown.xml

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="text/x-web-markdown">
        <sub-class-of type="text/plain"/>
        <comment>Markdown Markup</comment>
        <glob pattern="*.md"/>
        <glob pattern="*.mkd"/>
        <glob pattern="*.markdown"/>
    </mime-type>
</mime-info>

Register the mimetype

xdg-mime install --novendor ~/.local/share/mime/packages/x-web-markdown.xml

Check it

greg@tpx61a:Desktop$ xdg-mime query filetype 20120207s01.md
text/x-web-markdown

Logged in via ssh(1) to romeo, I got:

greg@romeo:posts$ pwd
/home/greg/Dropbox/Apps/scriptogram/posts
greg@romeo:~$ xdg-mime query filetype 20120207s01.md
text/plain; charset=us-ascii

It seems okay on local the Desktop later, though:

greg@romeo:posts$ pwd
/home/greg/Dropbox/Apps/scriptogram/posts
greg@romeo:posts$ xdg-mime query filetype 20120207s01.md
text/x-web-markdown

That’s a mystery.

Change properties on Desktop

  1. Select a file with ".md" filename, select Properties,
  2. Set “Open with” to emacs.
  3. Test it.

- gp

Feb 7, 2012

Tape backups in the 1990s

Recently I read a discusion about the us of GNU tar and compressions tape backups on the centos mailing list. I replied with this paragraph:

My experience with tapes ended shortly after DAT tape appeared (used 1/4" then 8mm), so this may be out of date; however, I associate tape backups of disk partitions with dump(8), restore(8), rmt(8), along with cpio(1) for data files. Some shared software used to come on 1/4" tape in tar format. The only compression I recall (vaguely) was standard ("POSIX" on GNU/Linux) compress(1P). I would never put non-standard compression on tape.

A little history

When I was doing tape backups many years ago, I used dump(8), restore(8), and rmt(8) for disk partitions. For data files I've also used cpio(1L) and uncompressed tar or GNU tar. None ever failed, but I always felt most confident with dump/restore. Feedback is okay, dump works well with multiple tapes, and incremental backup is easy. System disk backups were always done at dump level 0 for quick recovery.

Conclusion

I think it's vital to plan for disaster recovery and to test backups. We put printed restore instructions in the tape boxes when we ran our own systems (now vendors do it), so we knew what to do when they were needed. Documentation included how to replace and partition hard disks and how to boot up with a minimal OS that included restore(8). (Disk partitioning in those days was done with dump/restore in mind. We separated filesystems, so "/" was very small; and "/home", "/usr", "/usr/local", "/tmp", and "/var" had their own partitions.)

- gp