Slackware update
#358 Henry, Friday, 11 May 2018 3:52 PM (Category: Linux)
(Tags: slackware linux)

A large Slackware update came down the pipeline on my work desktop this morning. One major change in it was that the Xorg server had been upgraded significantly. I found this out after rebooting and then typing startx to fire up X Windows. The screen went black, it switched to graphical mode, and then I got an unmoving underline symbol at top left and that was it. It was locked up hard. Ctrl-Alt-Backspace did nothing.

I had to power the computer down and then restart it. I tried a few things but they all resulted in the same lockup. I needed to get some work done, so I opted for a brutal solution. The /var/log/X logs indicated that it was trying to load device drivers for mouse or keyboard and they were missing so it was locking up. I was fairly sure that my xorg.conf was wrong. It pre-dated the new Xorg server, so was probably the culprit. I renamed the xorg.conf file, and started X without one. And it worked. I was able to get X up, open my windows and get to work.

Except it looked awful. Images were low quality, fonts were thin and reedy. It was ugly. Probably low depth and default fonts. In the afternoon, I had some spare time so I revisited the problem.

I ran xorgsetup, answered a few questions, and created a new xorg.conf. I edited it by setting the horizontal and vertical refresh rates for the monitor, and then the modes for the display. I have one very large ViewSonic monitor that is basically a television set. It needs special sizes and settings. Once I added that data to xorg.conf, I restarted X and it was all beautiful again.

These things keep me on my toes and keep my troubleshooting skills honed.

No comments
File recovery
#357 Henry, Monday, 23 April 2018 11:01 AM (Category: Apple)
(Tags: ibooks apple ipad)

Here is the saga of the lost files.

I have been in the habit of using the Safari feature on my iPad to "Save PDF to iBooks" for articles that I want to preserve.

They are the only files stored in iBooks.

When I did my backup and restore to my new iPad, all those files did not get backed up and restored.

I had in the past used iExplorer to extract the PDFs from iBooks. They ended up stored in the system /Applications directory on my MacBook Air. I don't know why they ended up there. I found the user interface of iExplorer to be really unhelpful. So I ended up doing the wrong thing. My mental model of things is based on the Unix way, not the Macintosh way, and this got me into trouble twice in this saga.

Yesterday, while trying to get the files out, I moved them from the /Applications directory to a temp directory. Well, I wanted to do a Move, but Finder wouldn't do a Move, probably because it was from a system directory, so I copied the files to the temp directory. I checked them, viewed them, great. I transferred them to a USB stick. Then I deleted them from the /Applications directory. And then, stupidly, assuming that they were safe on the USB stick, I emptied Trash.

When I copied them from the USB stick to my Linux desktop, I checked them once more and found that I had a whole bunch of small files that were aliases. They were aliases to the original PDF files that had been on my MacBook Air, in /Applications, which I had just now deleted and then erased from Trash. Gone, gone, gone.

Today, I took my MacBook Air to work and plugged in my Time Machine drive, and checked to see if I had done a backup after using iExplorer. Amazingly, I had. I restored all the PDFs to a temporary directory, then copied them to a USB stick, and moved them to my Linux desktop. And yes, I had the real files, the PDFs, not aliases.

So now I have got back 400+ of my PDFs. I am probably missing about 10 files that I saved since that backup. I have the links to them, so I can recreate them. I won't delete the files from my MacBook Air just yet. I'll leave them there for a while, and let Time Machine back them up again. Just in case. I can clean things up next week when I am well settled in with the new iPad.

I am much happier today. Going forward, I will not use iBooks any more for this. I will use Readdle PDF Converter which will save to DropBox.

No comments
iPad Mini 4
#356 Henry, Sunday, 22 April 2018 1:37 PM (Category: Apple)
(Tags: apple ipad)

I have been using a 64 gig iPad Air (first generation) for a long time. It's been great. I've been really happy with it. But lately, it has seemed a little slow. And I'm going on a trip soon, and the iPad Air is a little large and unwieldy. I tried Anne's iPad Mini and it seemed okay. The screen is a little small and I'll need glasses to see it properly, but my eyes recently downgraded and I need glasses to see the iPad Air now, so going to the smaller size iPad would be okay. I decided to switch to an iPad Mini. I prevaricated, and looked at trade-ins and other options.

Finally yesterday, I took the plunge. I did a full password backup onto my MacBook Air. Then we went to the Apple Store and did the deal.

Trade In And Purchase

First step was the trade-in of my existing iPad Air. The Apple guy tested it, made sure it worked and was in good condition, made sure I owned it, and then offered me $120 for it. Good enough. The Apple website had indicated $130 some of the time, and $120 some of the time, so I was prepared to take $120. The advantage is that I don't have to make the effort to sell it on the open market. I might have got a bit more money, but this way I don't have to deal with Craigslist people or potential eBay cheats, and the deal happens immediately. So I accepted the offer.

The next step was getting the new device. I got a 128 gig iPad Mini 4. With Anne's educational discount, and the $120 off, it came to $412 after tax was applied. That's a good enough deal.

They switched the SIM Card from my iPad Air to the iPad Mini and my cellular connection came up immediately. Then we erased the iPad Air and they took it away. I was sad to see it go. It was a great device and had given great service. It worked perfectly.

And then we were done. The old iPad was gone, I had the new iPad Mini in my hands, and all that was left to do was get it restored. Although I was excited to get home and get the restore process started, Anne was not. So we had a cup of coffee and took our time. I did fiddle with the Mini. I got it started, and got my Apple ID into it. The iPad Mini 4 has fingerprints, so I set up my fingerprint. I also switched to a six-digit passcode. My setup on the iPhone is to use the passcode to get in to the iPhone and then use fingerprints inside it. I set the Mini up the same way.

Restore From Backup

Finally, the ordeal of coffee was over, and we went home. I started the restore from the backup. It refused. I had to upgrade the Mini to iOS 11.3 first. I went through the upgrade process and that took a long time. Then I did the restore. It worked. Mostly.

The apps were not saved with the backup. The data from the apps was mostly saved. After the restore, the apps had to be loaded from the app store. That took hours. The icons were in the right place, but they were grayed out. Some icons remained a pattern, and when I tapped them I was told that the app had been deleted from the App Store and was no longer available to me. Only thing I could do was delete them. I lost about six apps, mostly older games. They had been upgraded to 64 bit, but since that appocalypse, they had been abandoned.

I lost a lot of games in the big appocalypse when iOS forced the 64 bit change. Good thing I still have an old iPad 2 that can't be upgraded to 64 bit. I still have all the old apps on it, and I play them on it. It was worth $0 as a trade-in, so I kept it. I have an old iPad and a new iPad. Anne has an old iPad Mini 1, and a new iPad Mini 4. Her old one is worth $60 as a trade-in, but it's worth more to Anne to be able to play the older abandoned games.

I found that the new fingerprint and six digit passcode remained through the restore. I was curious about that, and now I know. So some settings remain through a restore.

A lot of apps required resetting and entering passwords. Apple Pay and my primary credit card wanted the CV code again. A lot of apps wanted the password entered but would then allow me to switch to touch id and fingerprint.

Bad Apps With Data

Some apps were really crappy and threw away all data. The two apps that irritated me the most were ComicFlow and iBooks.

ComicFlow is a comics reader. It threw everything away during the restore. My other comics reader - Chunky - preserved all its comics. These aren't subscription comics, these are scanned and preserved comics that I load into the apps. On the other hand, it's very easy to get comics back into ComicFlow in bulk, and I have loaded all the Sandman back in, and it's up and running again. Next time I upgrade, I must note that I must check ComicFlow.

iBooks (not to be trusted)

The big offender is iBooks. I knew it would happen, but I hoped it wouldn't. My hopes were dashed. I have had this happen before, so I should have been prepared.

iBooks assumes that all the files in it have come from the Apple Book Store, or you have them loaded into iTunes. And it assumes that after an upgrade you can load them all back again. So after a backup and restore, it throws away all books inside it and you are expected to reload them.

After the last time this happened to me, couple of years ago, I stopped using iBooks to read books. I use Marvin, which is a trustworthy app that will preserve the books inside it through a backup/restore, and GoodReader for PDFs. GoodReader also preserves its PDFs through a backup/restore. I will no longer read books in iBooks because of this inherent untrustworthiness. However, I had started using one facet of iBooks. When I am browsing, I sometimes come across articles I want to preserve. Once upon a time, I would save the link. But after thirty years of Internetting, you come to learn that links don't last forever. Blogs move, articles get deleted, articles get locked behind paywalls, websites just go away. If I want to preserve an article, I had started using an iPad feature in Safari. If you load the article in Safari, then tap on the export symbol, you can save the article to iBooks as a PDF. I had been doing this. I had hundreds of PDFs saved. They didn't exist in the Apple Store, they didn't exist in iTunes. They only existed in iBooks. And after the upgrade, they didn't exist at all.

When I started doing this "save to iBooks as PDF", it was hard to get these PDFs out of iBooks. I experimented a lot and eventually found two ways I could get the PDFs out of iBooks. First, I could email each of them out, one by one. I started doing that, but what a tedious task. That soon got abandoned.

Then I bought iExplorer, a Mac program that will let you pull some data out of your iPad. It's not bad, but the interface is a bit rough and it will shove the files wherever it can. I had made several backups of these PDFs. The latest backup I made put all the PDFs in with the Aplications on my Mac. That was a struggle to move them out. I have no idea what I did wrong. I should have made another backup with iExplorer before I traded in the iPad Air. Lesson learnt.

Readdle PDF Converter

So that finishes it for me. I won't use iBook at all ever again. It is inherently untrustworthy. I have recently bought an app called Readdle PDF Converter and it does much the same thing, but will export the PDF to Dropbox. So it's easier to get the PDFs out of the iPad. It's not as easy to create the PDFs.

With Safari, you can load a page then go to Reader View, and all the navigation and ads are stripped out and you get left with the core article. Then you can save as PDF to iBooks. That creates very clean article-only PDFs. The Readdle PDF Converter won't do that. If you are in Reader View, it will save the original page with all horrible junk attached. Their help pages show that you can strip it out by selecting only the text you want and then saving that as PDF. It works well enough.

I did go back to my latest backup of the PDFs but between what the Mac does as aliases and what is missing, I think I have lost them all.


So now I have my iPad Mini 4 all set up. I have an enormous amount of spare space, so I can load it up with more books and comics. It is slightly faster than my iPad Air was. The screen quality is about the same, I think. It's smaller and will travel much better. I have ordered an inCase soft case for it, just like the ones I have for the iPad 2 and the iPad Air. Everything is set up the way I want, it's working really well. I expect to get years of service out of it. The only downer is that the battery doesn't last as long. Physically smaller battery, I presume. I use

And best of all, I can now play Civilization VI on it. That wouldn't play on the older iPad Air.

All in all, very happy with my purchase.

No comments
iPod Touch
#355 Henry, Wednesday, 07 February 2018 11:18 AM (Category: Apple)
(Tags: ipod)

Our project manager left. He did FIRE, especially the last part of that - Retire Early.

The day before he flew to Mexico for an extended stay, he delivered a box of gadgets to me. He ran out of time to sell the stuff on eBay or hand it to friends and family, so he dumped it on me, and I was glad to get it.

There were Apple Lightning cables, and converters and dongles. There was an Apple USB modem. I haven't seen anything like that in years, and I can't even test it, not having a land line at home. There were two portable USB DVD Burners, and a portable USB 3.5" floppy disk drive.

Best of all, there were two iPods. One was an 8 gig iPod Nano, same as the one I already have. Best part of these iPods is that they pick up FM radio. I will sell this iPod. And there was an 8 gig iPod Touch. I had one of these a long time ago, but sold it. The batteries on both work just fine, and last a good time.

I started using the iPod Touch and have been enjoying it greatly. I love the smaller size of it. I have an iPhone 6S and I thought the size of that was pretty good, but now I have the iPod Touch to play, I realise that I like the smaller size much more. Perhaps the next work phone I get should be an iPhone 5.

I also came to realise that I liked the older versions of the iOS operating system more than I like the current version. I deeply dislike gestures. I don't like the more modern look of the iPhones either. It might suit young people with good eyesight, but to me it does not look good. I've been upgrading steadily on my iPhone, and it's like the fable of the frog in the pot of heating water. The irritations come very slowly, and I adapt to them. But that gets disrupted when I get a glimpse of what it was like when iOS was pretty good.

I think when I retire and hand back my work phone, I won't get one for myself. I can live without a phone.

And I am deeply disappointed in my iPad. I wish I could take back the latest upgrade. The latest upgrade really sucked. It continues to suck for me. I don't think I will get another iPad. I use it mostly for reading, so I think I will devolve to a good ereader, and that won't be a Kindle. It will be a tablet of some sort that handles epubs that I supply. A Kindle is a lock-in marketing device.

Every year that passes reinforces my belief that every app and application and device will be upgraded until it is no longer useful for its original purpose.

iPod Touch

No comments
Reading ebooks on the command line
#354 Henry, Tuesday, 06 February 2018 3:34 PM (Category: Books)
(Tags: ebook epub acroread calibre)

I live on the command line. I live in xterms almost all the time. I mostly use a GUI desktop to manage a whole slew of xterms. I do use graphical tools when they are needed, but mostly I spawn them off from the command line, and shut them down when done, and return to the command line. I am more efficient this way. Your mileage no doubt will vary, but this is how I do it.

I have been processing a lot of books lately, and this has introduced me to a number of irritations.

I use two viewers of ebooks - acroread for PDFs, and ebook-viewer for almost everything else. Ebook-viewer is a part of Calibre, and it works very nicely inside Calibre, but you can also run it from the command line. There is one irritating aspect with both of these, when I run them from the command line. If I get the filename wrong, they both start up, both display an error that the file cannot be found, and I have to click on that error dialog box, and then shut down the program. Far too many clicks to recover from a typing problem. This usually happens when I use tab-completion on the command line and there are multiple files that match the starting criteria.

This became irritating enough that I decided to stop it. First, I created two small shell scripts. I used ev for ebook-viewer, and ao for acroread (ac and ar are existing programs in Linux and I didn't want to overload them). They would check if the file exists, and stop if it isn't. If it does exist, they would fire up acroread or ebook-viewer.



if [ -f "$F" ]; then
  /usr/bin/acroread "$F"
   echo "$F does not exist"

As many of the books I am processing use spaces in the filename, I had to make sure I used quotes around $F in the scripts.

That worked very nicely for a time. And then I thought why don't I combine them and make a single script that can be used to read any book, and it decides what to use to view it. So I amalgamated them and came up with this script, which I called br (book-reader):



if [ ! -f "$F" ]; then
   echo "$F does not exist"

case $F in
  *.pdf)    /usr/bin/acroread "$F" ;;
  *.epub)   /opt/calibre/ebook-viewer "$F" ;;
  *.mobi)   /opt/calibre/ebook-viewer "$F" ;;
  *.azw)    /opt/calibre/ebook-viewer "$F" ;;
  *.azw3)   /opt/calibre/ebook-viewer "$F" ;;
  *.txt)   /usr/bin/view "$F" ;;
  *)        echo "'$F' cannot be viewed";;

I threw in txt files too, and view them with the read-only version of Vim.

But once I did that, and looked at the man page for acroread, and the help for ebook-viewer, I realised that I could solve some other irritations.

Acroread, no matter what I do, is going to display errors about files not existing even when they do. I could get rid of this rubbish by redirecting stdout and stderr to /dev/null.

If I have a PDF open, and then in another xterm in another window, I open another PDF, then the two PDFs appear in the one acroread screen in tabs. And if I go to shut it down, then it complains about shutting down multiple PDFs. And if I avoid that trap and just close the PDF I no longer want, the remaining PDF is in the wrong window. I am able to solve this whole mess by using -openInNewInstance on the command line and each PDF would get its own instance and things would work the way I want them to work.

Another irritation is opening a PDF and finding that it is scaled down to 20% and it's unreadable, or scaled up to 300% and equally unreadable. This was solved by using /a "zoom=100" on the command line. And because when I am checking books for the correct names and authors I always want to start at the beginning and not where acroread last left off or where the author wants me to start reading the book, I can force it to open on page 1 too, by expanding the /a option to /a "zoom=100 & page=1".

Ebook-viewer has less start up options, probably because there are less things irritating me, so the only thing I wanted to do with it was force it to start at page 1 too, and that is done with --open-at=1.

So I added these options to my br script and ended up with something that works really well for me.



if [ ! -f "$F" ]; then
   echo "$F does not exist"

case $F in
  *.pdf)    /usr/bin/acroread -openInNewInstance /a "page=1 & zoom=100" "$F" > /dev/null 2>&1 ;;
  *.epub)   /opt/calibre/ebook-viewer --open-at=1 "$F" > /dev/null 2>&1 ;;
  *.mobi)   /opt/calibre/ebook-viewer --open-at=1 "$F" > /dev/null 2>&1 ;;
  *.azw)    /opt/calibre/ebook-viewer --open-at=1 "$F" > /dev/null 2>&1 ;;
  *.azw3)   /opt/calibre/ebook-viewer --open-at=1 "$F" > /dev/null 2>&1 ;;
  *.txt)   /usr/bin/view "$F" ;;
  *)        echo "'$F' cannot be viewed";;

If I learn new tricks, I can easily expand this script. It's a good start, and my irritation level is seriously reduced, but more importantly, I am much more efficient using this script. I can process books very quickly now.

No comments