Sunday, July 18, 2010

Logitech MX 5500 on Linux in USB mode

So, I didn't want to use the Bluetooth mini receiver, and wanted to use my wireless keyboard and mouse in the USB mode (no OS bluetooth support needed; everything is done in hardware). All I had to do was comment out the lines related to Logitech devices in:
/lib/udev/rules.d/70-hid2hci.rules

After that, I was able to use mx5000-tool to change a few of the LCD screen views. Not to mention, I can remap CAPS LOCK to CTRL and it won't beep each time I press it. Whatever.

Friday, July 9, 2010

manipulating pdfs with pdftk

I've been downloading some PDF articles that I wanted joined together for duplex printing purposes. While Ghostscript can join PDFs quite well, pdftk is a great tool for removing pages that I didn't want to keep (before joining). Linux.com has a good article to get started.

I specifically wanted to remove the last page of each of my documents. To remove the last page, I needed to know how long the document was:

$ pdftk article.pdf dump_data output | grep NumberOfPages
NumberOfPages: 132

Then I can use the "cat" function of pdftk to create a new PDF minus the last page. Then, I can merge all the documents. I should probably write a bash script for this.