01-11-2021, 11:20 AM | #1 |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
KoBox, or how to run X.org and Firefox on your Kobo
Hi,
As some of you probably saw in the Developers' corner, I started to make a preinstalled image of Alpine Linux with Xorg and Firefox in it to install it on a Kobo effortlessly. I'm now here with a first release candidate of KoBox. It is *not* perfect, even the install process could not work (though it won't brick your Kobo, I'm fairly sure). Here's a video: https://www.youtube.com/watch?v=jICSx2SxzNM You can find it here: https://sourceforge.net/projects/xorg-kobox/ Direct download: https://sourceforge.net/projects/xor...x.txz/download The file is approx. 500 MB in size, so depending on the speed of your connection it could take a while to download. What.... what is this file......? If you didn't recognize the .txz extension, to put things simple, it's essentially similar to .zip files, only compressed (much) more. What you'll want to do is to install 7-Zip and that will uncompress it for you. How do I install this? The process is similar to NiLuJe's one-click packages for Plato/KOReader. You'll have to decompress the archive in the root of the KOBOeReader partition (after plugging in your Kobo, of course), not anywhere else. Then, be *sure* to properly eject it (if it says "can't eject the device, *wait*) and it should work after "updating" a little. Caution: This being a RC-1, it sure comes with a few caveats that I'd like to have had cleared off before uploading this to SourceForge on my 150KB/s upload connection That being said: If you already uncompressed the archive in KOBOeReader, you're not lost. Really, you only have to uncompress whats inside the "kobox" folder in the archive. At the end you shouldn't have any "kobox" folder in the root of your KOBOeReader partition. Just new icons and a new .adds folder (if you didn't install anything else before, like Plato or KOReader). How to launch this? Normally, if all is correct and you extracted the contents of the kobox folder in your KOBOeReader partitions, you should see a thing called "NickelMenu" in the bottom-right of your Kobo's home screen. (BTW, thanks @geek1011). Ensure you're connected on Wi-Fi, then tap on it, and you should see something called "KoBox". Take a deep breath and click on it. Things should start to show on the screen. If you make it to the tiles wallpaper, you can already be pretty sure that it will work. Touch may not work right away. If the screen orientation is bad or touch is working strangely, do this on an SSH session to your Kobo (this will change in the future): Code:
echo 1 > /sys/class/graphics/fb0/rotate I can't shutdown! Open gnome-terminal (Applications/System Tools/Terminal) and type: Code:
sync poweroff Will this erase/brick my Kobo? 99% sure not. Basically, the Xorg server runs in a chroot on a disk image. If you don't understand what I just said, well you could think of it as a very secure and containerized environment. *But* I can't guarantee anything and I strongly recommend that you make a backup of your books before you try anything of this. And if it breaks, I'm not to be considered responsible of this situation. Spec sheet/miscellanous Tested models Kobo Libra H2O, Kobo Glo HD Programs included (not exhaustive): firefox, geany, xterm, uxterm, gnome-terminal, mate-panel, x11vnc, feh, idle3.8, python3, obconf, pcmanfm, nautilus, vim, nano, htop, onboard Installable via apk (package manager), including, but not limited to: gcc, g++, clang, qmake, falkon, midori, epiphany You'll *want* to install another web browser. Although Firefox is OK for short-term sessions, it has a preponderance to crash when used for a longer period of time. I recommend Falkon or Midori, or you can build Luakit from source if you're brave enough. Example: Code:
apk add falkon Things forgotten/to fix/to add/improve - Fonts (Noto Sans Mono in Firefox is strange) - Onboard keyboard - Shutdown button - Multitouch input Credits Thanks @NiLuJe, @geek1011 for NickelMenu, @Elektron for the name (@hobnail too, finally I decided to take KoBox instead of Xobo, but good one indeed!), schuhumi (from GitHub) who originally developed fbink-xdamage Last edited by NiMa; 01-27-2021 at 06:05 PM. |
01-11-2021, 07:01 PM | #2 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
EPIC!!!
Can I run Chrome (I see Firefox is working, not sure)? Also apologies, I was too busy this weekend to install this So still no way to return to nickel other than shut down and restart? Edit: Also sidenote: Discord account experiencing some issues so hopefully I'll be back online in a few weeks at the latest if support gets back to me Last edited by Elektron; 01-11-2021 at 07:06 PM. |
Advert | |
|
01-11-2021, 07:37 PM | #3 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
I'm currently trying to compile it on my Raspberry Pi (armv7l) which I could then transfer the compiled programs from to the Kobo. Code:
[4903/42486] Compiling CXX object (...) Last edited by NiMa; 01-13-2021 at 09:21 AM. |
|
01-11-2021, 09:51 PM | #4 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
Alright got it. So I think I'll get my other microSD card from my desk drawer and get Alpine up and running within the week!!
|
01-11-2021, 10:04 PM | #5 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
Hypothetically you could just flash the armv7l Alpine image directly to the MicroSD but that would mean no nickel, right?
|
Advert | |
|
01-12-2021, 12:02 AM | #6 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
Maybe I would've tried this if I got into hacking Kobos in ~2015, but now with Kobo moving to soldered eMMC storage, I strongly prefer staying in the chroot/disk image fashion. But to answer your question, you're right. It'd take a proper flash of the kernel/bootloader/initrd files in the first sector of the MicroSD (not in any partition, just raw data on the card), and the Kobo would've to be compatible with them. Maybe we could use the ones that are preinstalled and just reorganize the partition scheme, but I haven't tried that yet. |
|
01-12-2021, 12:47 AM | #7 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
Oh ok. But if I did brick it, then I could take the SD out and flash the factory image to the Kobo and it'd be as good as new. I guess I can experiment a bit and see how it goes.
|
01-12-2021, 11:30 AM | #8 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
Lucky you (though my half-destroyed Glo HD stills "works" with its internal SD card slot) |
|
01-12-2021, 03:17 PM | #9 |
Wizard
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
kexec should work to test new kernels and initrds safely (just reboot if it goes wrong), but I haven't tried it myself. If it works, you should be able to pass kernel arguments to "boot" into a disk image and keep everything else untouched.
Also, I think this thread belongs to the developer sub-forum since it isn't part of Nickel. Last edited by geek1011; 01-12-2021 at 03:22 PM. |
01-12-2021, 04:04 PM | #10 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
Moderators, feel free to move this if you also think that that should belong to the devs' forum. I put it there because I thought that some people probably don't like the default web browser of Nickel, and thus providing Firefox/Falkon as a replacement and easy-to-do thing is what I've done (or at least, tried to). |
|
01-13-2021, 04:31 AM | #11 |
Connoisseur
Posts: 93
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Hi, A little question: What I do inside KoBox disappears when I restart? For example, if I download a book from firefox, where does it save it? Does nickel recognize it when I reboot? Can I save it in / mnt / onboard / My_books, for example?
Perhaps my question is very obvious, but for me it is an important question. |
01-13-2021, 06:18 AM | #12 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
Your question is a very good one indeed. KoBox runs in a chroot jail, which means it is (mostly) hidden the from Koboˋs root filesystem. All lives in /mnt/user when mounted and you can take a look at the shell scripts in /mnt/onboard/.adds/kobox/ and in /mnt/user/kobox.sh (when mounted) to know exactly what it does. I added a commented line (in /mnt/onboard/.adds/kobox/kobox-boot.sh I think, otherwise it'd be in /mnt/user/ when KoBox is running) which allows you to bind-mount your /mnt/onboard partition to the /mnt/user/mnt mountpoint (/mnt in KoBox) TL;DR yes it is possible. Should you decomment this line? It's your choice. All that you do in KoBox that'd be an erasing operation could potentially touch your books if you aren't careful. But to simply download a book to the /mnt/onboard partition, yeah that's the method I use also (Though I recommend Falkon instead of Firefox because Firefox has lots of bugs in the package that we currently have that cause it to often crash. Falkon is a very good browser too, desktop-class, you could use it for a full replacement of Chrome on your main computer, it's that good, yes ). I just don't keep it on every time... Last edited by NiMa; 01-13-2021 at 09:25 AM. |
|
01-13-2021, 08:38 AM | #13 | |
Connoisseur
Posts: 93
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Quote:
Programs included (not exhaustive): firefox, geany, xterm, uxterm, gnome-terminal, mate-panel, x11vnc, feh, idle3.8, python3, obconf, pcmanfm, nautilus, vim, nano, htop, onboard Installable via apk (package manager), including, but not limited to: gcc, g++, clang, qmake, falkon, midori, epiphany What is the difference?. If I install Falkon, will it dessapear when I restart because KoBox runs in a chroot jail, which means it is (mostly) hidden the Koboˋs root filesystem? |
|
01-13-2021, 09:02 AM | #14 | |
Evangelist
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
|
Quote:
There are three partitions on the eMMC/MMC: /dev/mmcblk0p1 # rootfs /dev/mmcblk0p2 # recoveryfs /dev/mmcblk0p3 # onboard Here's the essential of the mounts at boot: /dev/mmcblk0p1 : / (root) /dev/mmcblk0p3 : /mnt/onboard KoBox is a disk image R/W that you can add/modify things on. I think that on the one I uploaded, you have about 800MB of free space when you start. This disk image is mounted like this: /mnt/onboard/.adds/kobox/kobox.img : /mnt/user So no, unless it's specific circumstances, a chroot jail is writable, like your hard disk. It's like a Linux system in another Linux system. If you install Falkon, it won't touch anything of your /mnt/onboard partition, and it will only install in /mnt/user. You can always return to Nickel by rebooting the device: Code:
sync && reboot Though I still recommend you to make a backup before you try this. Last edited by NiMa; 01-13-2021 at 09:25 AM. |
|
01-17-2021, 06:12 PM | #15 |
Junior Member
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: none
|
Running on Kobo Aura H2O 2 v2
First of all, this is quite impressive!
I tried running it on my Kobo Aura H20 2 v2. It boots fine. However, the display is upside-down (reverse portrait), and touch input is rotated 90 degrees counterclockwise from the visual display. The value of /sys/class/graphics/fb0/rotate is 3 and attempts to change it have no effect. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[HOWTO][WIP] Run Xorg on your Kobo + full-blown Firefox | NiMa | Kobo Developer's Corner | 57 | 07-27-2023 05:33 PM |
Archive.org book on Kobo question | cpl625 | Kobo Reader | 4 | 10-28-2011 06:41 AM |
Portable Firefox (Run it off a USB Drive) | Colin Dunstan | Lounge | 3 | 11-22-2004 07:42 PM |