In the slow thread of trying to use FreeBSD as my 'daily driver', I'm working on getting some of the more edge cases up and running. Previously I setup my scanner and now I also want my eReader to work. It's not difficult, but I'll leave this note to myself when I inevitably forget.
I'm currently on FreeBSD 14.2-RELEASE-p1, running XFCE as an X11 desktop environment.
Setting Up USB Access
The first thing to do is make sure we can access the USB device as a regular user, so we can then later sync the books with Calibre. This requires adding a rule to devfs(8). All of the following steps are done as root. The rule added here is part of the scanner ruleset, so if that's already configured you can skip this bit.
Create the following rule in /etc/devfs.rules (the number in the [] may be different, depending on what other rules you already have, the numbers should be unique.
[usb=12]
add path 'usb/*' mode 0660 group usbThis assumes you have a group usb existing, and your intended user is a member. If not add them with:
pw groupmod usb -m yourusername
To load these new rules, add the following to /etc/rc.conf:
devfs_system_ruleset="usb"Then, restart devfs to apply the new rules:
service devfs restart
Reviving the Kobo Touch
I bought a Kobo Touch in around 2011-12 time, and have been using it on and off since. In lots of ways I prefer eBooks to paper books - they're more portable, easier to search and saves having to cut down a load of trees.
It is sadly one system where DRM seems to have crippled a lot of the possibilities., like easy lending of a book to a friend to try out, like you can do with any paperback. In the last couple of years I've been using an old Kindle my brother has given/lent to me, and while the backlight is nice, the fact you're stuck in Amazon's walled garden is a big limitation and I'd prefer to be independent of that. I also can't use it with the library's eBook lending system, and I'm hoping I can do that with this Kobo (but that's a project for another day).
Luckily there are places you can buy DRM free eBooks, or some authors, like Jeff Geerling and Michael W Lucas sell their books directly without DRM. Additionally Project Gutenberg has thousands of classic, out of copyright, books you can also download.
When I plugged the Touch in for the first time, in a long time, it seemed to have reset itself to factory settings, probably because the battery was completely empty. On starting up it wanted me to register an account. I'd prefer not to. Luckily Lee Yingtong Li spent some time 'hacking' a Kobo Clara HD, and described a way of avoiding having to sign in and so not have your personal data lying on another company's servers, waiting to be breached.
I Connect the Kobo Touch with USB, selected 'connect to computer' and mount the onboard memory (there can also be an SD card that appears). It appeared in the side bar of the file manager (Thunar) and clicking it mounted it at /media/KOBOeReader.
Inside that directory is a hidden .kobo directory that contains a KoboReader.sqlite database we want to edit. Using SQLite:
sqlite3 KoboReader.sqlite
Then we need to add some values into the user table, so once at the SQLite prompt run:
INSERT INTO user(UserID,UserKey) VALUES('1','');
(Here the Kobo Touch and Clara HD appear to behave identically.)
Once that's done, eject the eReader. It'll now drop you at the (mostly empty) home screen and no longer bother you about registration. I did connect mine to the WiFi, so I could download a more recent firmware update, that doesn't require any registration. (There's also an archive of Kobo firmware should that not work.)
Syncing with Calibre
The I installed Calibre via pkg as a binary (currently version 7.23, released December 2024).
The rest can now all be done as your regular user. On launching Calibre I set the library directory to the one I'd copied over from my other computer.
With the Kobo connected, you can then use the 'Connect to Folder' option under the 'Connect/Share' menu item in Calibre to select the Kobo folder, and sync the library. After that's complete and you eject the Touch, it'll update the files and you should see all the books.