Monday, July 09, 2018

Tweaking the Thinkpad's TrackPoint settings in Linux Mint 19

With the update to Linux Mint 19 Cinnamon, the sliders controlling the trackpoint's accelleration and speed on my Thinkpad T560 and T500 don't work any more.  I expect it will get fixed soon.  Meanwhile, as root I  can manually edit the parameters in the filesin the directory
  • /sys/devices/platform/i8042/serio1/serio2
The above directory is found by
  • find /sys/devices/platform/i8042 -name name | xargs grep -Fl TrackPoint | sed 's/\/input\/input[0-9]*\/name$//'
Settings are reset at reboot.  :-(

I like sensitivity 125 and speed 80 on the T560; 190 and 90, inertia 10, on the T500.

Update


I found this solution (X1 parameters) that automates everything and survives reboot :-)

Friday, June 08, 2018

nice historiographical point

From a review of a history book:

"Written more in the tradition of Burckhardt and Braudel than Marx and Hobsbawm, the book is an exercise in seeing rather than storytelling."

Tuesday, May 08, 2018

Photo of Prof. Robert Charles Zaehner

Photos of Prof. Robert Charles Zaehner are rare.  One was published in his obituary in the journal Iran 13 (1975):



Wednesday, May 02, 2018

Etymology is not Lexicography

To find the meaning of a word, one must examine many sentences and then think about the use of that word in many contexts. 
 
See Franklin Edgerton, "Etymology and Interpretation," Proceedings of the American Philosophical Society, 1938 , 705-14.  http://www.jstor.org/stable/984947

Wednesday, April 25, 2018

Online issues of Indological journals

I repeatedly find my self searching for back issues of journals, and between searches I forget what I learned the first time.  Here are some notes to myself, to remind myself what can be found online.  I'm writing this in April 2018, so moving walls will have moved in future years.
  • Philosophy East and West 1951-2014 JSTOR
  • Wiener Zeitschrift für die Kunde Süd- und Ostasiens
    1957-1983 private
    1991-2013 JSTOR , five-year moving wall.
  • Zeitschrift der Deutschen Morgenländischen Gesellschaft
    1847-2017 JSTOR

Tuesday, April 17, 2018

Improving PDFs

I sometimes  do some processing on PDFs if I think they are important, or I want to read them more conveniently.  I was trying to explain my techniques to my students, recently, and I realized that I use a mixture of tools that are not at all obvious or easy to explain to someone not familiar with Unix.
So I'm going to write down here what I do, so that at least the information is available in one place.  I assume a general knowledge of Linux and an ability to work with command-line commands.

If I receive a PDF that is a scanned book, with 1 PDF page = one book opening, I want to chop it up so that 1 PDF page = 1 book page.
  • make a working directory
  • use pdftk to unpack the PDF into one file per page:
    > pdftk foobar.pdf burst
  • I now have a directory full of one-page PDFs.  Nice.
  • convert them into jpegs using pdf2jpegs, a shell script that I wrote that contains this text:
    #!/bin/bash
    # convert a directory full of pdfs into jpegs
    for i in *.pdf; do pdftoppm -jpeg -r 400 "$i" >"$i.jpg"; done
  • I now have a directory full of jpegs, one jpeg per page.
  • Start the utility scan-tailor and use it to
    • separate left and right pages into separate files
    • straighten the pages
    • select the text area of each page
    • create a margin around the text
    • finally, write out the resulting new pages
     
  • I now have a directory (../out) full of TIFF files, one page per file, smart.
  •  Combine the TIFFs into a single PDF using my shell script tiffs2pdf:
    #!/bin/bash
    # Create a PDF file from all the .tiff files in the current directory.
    # The argument provides the name of the output file (with .pdf appended).
    echo "Created a PDF from a directory full of .tif files"
    echo "Single argument - the filename of the output PDF (no .pdf extension)"
    tiffcp *.tif "/tmp/${1}.tiff"
    tiff2pdf "/tmp/${1}.tiff" > "${1}.pdf"
    echo "Created ${1}.pdf"
    rm "/tmp/${1}.tiff"
    echo "Removed temporary file /tmp/${1}.tiff"

    # thanks to http://ubuntuforums.org/showthread.php?t=155628
     
  • I now have a nice PDF that has one smart page per PDF page. 
  • If I want it OCRed, then I usually use Adobe Acrobat, a commercial program. But if I'm uploading to Archive.org, that isn't necessary because Archive.org does the OCR work using Abbyy.


That's all, folks!

Sunday, February 04, 2018

My personal protest withdrawal from USA academic conferences

I regret to say that I am cancelling my visit to this year's USA conferences.  Several USA conferences are among my favourite academic gatherings, and I will sorely miss the occasions.  I have made this difficult decision for political and personal reasons.

Like many, I am deeply dismayed by the statements and policies of current USA governance.  The statements and decisions that have been issued from the USA government over the last year, including the disgracefully vulgar, racist statements just last month, have been increasingly repellent.

I have been torn about whether to travel to the USA to work with and support all my liberal, educated, humanitarian friends there, or whether to take a moral stand to treat the USA as a pariah State.  I still do not feel certain about this matter.  Perhaps it is better to go to the USA and support my embattled friends and colleagues?  Last year, after soul-searching, I went to the American Oriental Society conference in LA.   But after a year of thinking about these issues, I have decided that I will take a different stand at this time, and stay away

My thinking on these issues was nudged forward decisively by a recent report that I heard on the BBC World Service from an Indian lady journalist who described the surprise, compulsory biometric facial scanning that she was subjected to at Dulles, on attempting to exit from the USA.  She was told that it was mandatory for non-USA citizens and that she could be detained in the USA if she did not comply.  The USA's Department of Homeland Security has recently introduced this biometric face-scanning technology at many airports for departing passengers (see here). The technology has been shown to be deeply flawed technically, morally and legally (see NY Times report of Dec 21, and the Georgetown University Law School report).  Amongst other profound problems, the software over-targets women and people with dark skin colour, producing 4% of false-positives in these cases.  As the Georgetown report finds,

Innocent people may be pulled from the line at the boarding gate and subjected to manual fingerprinting at higher rates as a result of their complexion or gender.
The technology being compulsorily applied to all non-USA citizens is demeaning, invasive and violates an individual's right to privacy.
USA Immigration already has assumed the right to require all social media passwords and to review up to five years of past social media postings, and copy all data from mobile phones or laptops [1, 2, etc. etc.].  This again violates individual privacy rights.  It also requires individuals to violate the terms of their contracts with service providers who require login details not to be shared.  In the case of university staff such as myself, it also violates the University's terms of use of my laptop, that contains or may refer to private information concerning my students.  I am required by the University of Alberta to keep my laptop and phone encrypted and I may not share the data with anyone outside the University.

Canada recently agreed, under Bill C-23, that the USA immigration authorities can arrest people while still in Canada, when they go through the USA immigration process while still at Canadian ports (1, 2, 3, etc. etc.).

I am a British Citizen and a European Citizen living as a resident in Canada.  I have no criminal record, nor any specific reason to expect difficulty entering  or leaving the USA.  While I am ashamed by the need to assert it, I am a white, Caucasian, male university professor.  From the point of view of USA governance, I am almost as good as a Norwegian.  But I am acutely aware that many good people in the USA, or entering and leaving the USA, including now my Indian friends, do not have the same automatic advantages of skin colour, gender or citizenship.  Families are being split up, people are being forced to travel to war-torn countries or otherwise being denied the American promise of safety symbolized since 1875 by the Statue of Liberty.  All international travellers are routinely being subjected to threatening, invasive and demeaning procedures.

For all these reasons, I have decided that I wish protest the USA governance and USA immigration policies and procedures.  This is done both in solidarity with my friends, and also as a matter of personal choice, because I do not wish to expose myself personally to the USA immigration service's demeaning and threatening procedures.


I am extremly uncertain about this decision. Perhaps all the above reasons should rather drive me to visit my colleagues in the USA and offer them friendship and collegiality in difficult times. I don't know what the right answer is. Last year, I had many of the same misgivings, but I decided to visit the USA. On this occasion I'm taking the opposite decision, and staying away.

I apologize to my friends in the USA and I look forward to happier times.  I only hope my protest contributes in a small way to encouraging good people in the USA to vote wisely and to lobby their representatives energetically.