01-04-2021, 02:25 PM | #1 |
Evangelist
Posts: 479
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
|
[HOWTO][WIP] Run Xorg on your Kobo + full-blown Firefox
This is meant to be a continuation of the previous thread, "Create your own native development environment for your Kobo". I decided to separate Xorg from it because the title was not reflective of the contents of the post. I'll post more tips on here, and all my new Xorg-on-Kobo updates will be there instead.
Hi, So after a little bit of tinkering with Alpine Linux on my Kobo (https://www.mobileread.com/forums/sh...d.php?t=336175), I really wanted to get Xorg up and running. So I got down the rabbit hole of Xorg config and video drivers, and came up with a working solution. I ended up with a working Xorg display on the eInk screen of the Kobo, with Openbox or Fluxbox and a full-blown Firefox (which worked really well) + an x11vnc session that you can access with common VNC software on your main computer. Touch input is supported! If you don't want to use that, you could opt for these methods instead: 1. Use xdotool to control mouse/keyboard from Linux CLI 2. Control the system from a VNC client. I also tried to watch YouTube from a VNC client and it was kind of... well ugly (0.5 fps in fact). Here's a video with the new speed improvement (instructions below): https://youtu.be/qOQt6Fxew2s Tested devices : Kobo Glo HD, Kobo Libra H2O *If this works on your device, please let me know, and I'll add it on the list!* Kobo Libra H2O Overall experience very good, Firefox is able to (slowly) play mobile YouTube videos! Tested Reddit, Old Reddit, Mobileread, all pretty good! Touch experience fairly reliable, albeit very limited. Kobo Glo HD Overall experience pretty good, Firefox is slower comparatively to the Libra H2O. You may find useful installing Midori or Falkon instead. Touch tested, reliable and working. How do I do this? First, head over there and make your steps through, but don't install GCC/G++/Clang if you don't want to. TL;DR: stop at step 13, then come back here again. Note: You may want to enable Landscape mode system-wide for a better experience: Code:
.kobo/Kobo/Kobo eReader.conf ---- [DeveloperSettings] ForceAllowLandscape=true Dumping the script (xorg-kobo-touch.py) to root storage via SSH/SCP Do this on your host machine: Code:
scp <path of script> root@<kobo ip>:/mnt/user/home Code:
scp xorg-kobo-touch.py root@192.168.2.2:/mnt/user/home 0. Kill nickel, fickel, etc. with this (ensuring you're still connected to Wi-Fi): Code:
export DBUS_SESSION_BUS_ADDRESS NICKEL_HOME WIFI_MODULE LANG WIFI_MODULE_PATH INTERFACE sync killall -TERM nickel hindenburg sickel fickel fmon 2>/dev/null Code:
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories Code:
apk update Code:
apk add alpine-sdk xorg-server-dev libx11-dev libxdamage-dev libxfixes-dev xorg-server git xf86-video-dummy xvfb font-noto openbox fluxbox xterm firefox-esr matchbox-keyboard onboard scrot imagemagick xdotool geany tint2 python3 evtest bash pcmanfm x11vnc xf86-video-fbdev Code:
mv /usr/share/fonts/noto/NotoSansMono*.ttf /usr/share/fonts/noto/NotoSerif*.ttf /home Code:
mkdir /home/root && cd /home/root Code:
git clone --recurse-submodules https://github.com/schuhumi/fbink-xdamage Code:
cd fbink-xdamage Code:
KINDLE=1 Code:
KOBO=1 Code:
make 6. When all is finished and it did not exit with an error code: Code:
X -dpi 150 & 7. Launch fbink-xdamage (this displays X's screen updates on your eInk display with FBInk: Code:
cd /home/root/fbink-xdamage && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/root/fbink-xdamage/FBInk/Release/; env DISPLAY=:0 ./fbink_xdamage & 7. Export the DISPLAY environment variable: Code:
export DISPLAY=:0 Code:
export HOME=/home/root 8. Launch openbox: Code:
openbox & Code:
tint2 & Code:
cat > /home/root/dpi.sh << EOF #!/bin/bash XFT_SETTINGS=" Xft.antialias: 1 Xft.autohint: 0 Xft.dpi: 175 Xft.hinting: 1 Xft.hintstyle: hintfull Xft.lcdfilter: lcddefault Xft.rgba: rgb " echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1 EOF 10. Launch xterm and run a command: Code:
xterm -e "/home/root/dpi.sh;sh" & Code:
onboard & 12. Enable touch support: Code:
cd /home Code:
cd /home && evtest --grab /dev/input/event1 > evtest-log & Code:
while true; do python3 xorg-kobo-touch.py ; done & 13. You're done! You may want to first fire up x11vnc (see below) to set up some things like the position & theme of onboard keyboard with a computer where you can properly drag things. Those settings will stay accross reboots. Want to start this automatically with NickelMenu? Here are my launch scripts. They *may* not work. Just look at them and adjust the scripts depending on your needs. Spoiler:
x11vnc To start the VNC server, open a new prompt/window, SSH your Kobo again, *don't* close the other SSH sessions, then type: Code:
x11vnc -display :0 Then ... experiment Here are some screenshots... Cheers! Searching the old method? I archived it below. Note that I'll probably no longer provide support for it. Spoiler:
Special thanks to @NiLuJe and schuhumi (GitHub) for providing tips and tools during the making of this project. Now all that's left is to develop a multi-touch driver for capacitive touchscreens! Disclaimer: I am not responsible if you brick your Kobo with this technique, or if you lose files. Last edited by NiMa; 01-09-2021 at 01:49 AM. Reason: Added the fast way! |
01-04-2021, 03:45 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
|
Woah! Awesome!
|
Advert | |
|
01-04-2021, 04:14 PM | #3 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
|
01-04-2021, 04:25 PM | #4 |
Evangelist
Posts: 479
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
|
|
01-04-2021, 04:44 PM | #5 |
Resident Curmudgeon
Posts: 76,513
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is there any way to run a full browser on a Kobo without the need for a VNC?
|
Advert | |
|
01-04-2021, 04:47 PM | #6 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
Possibly the old Debian thread made by MarekGibek could help?
|
01-04-2021, 04:50 PM | #7 | |
Evangelist
Posts: 479
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:
In fact, you can run Firefox without VNC (I'll post a video soon); combine that with InkVT (small terminal + tactile keyboard), and resize the on-screen image a little bit by changing the resolution parameters passed to FBInk, and you'll have a (primitive) touch experience that you can pass touch/mouse inputs with xdotool via InkVT. But I hope that I'm going to be able to register touch inputs; it would be so awesome! At this point, you'd just have to add a virtual keyboard program for X and you'd be good to go... Just an entire operating system on your Kobo, wouldn't that be absolutely amazing? I'm working on it... |
|
01-04-2021, 05:29 PM | #8 |
Evangelist
Posts: 479
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
|
Progress!
I've successfully found a way to obtain touchscreen touch coordinates : evtest. It gives me the X/Y position of my finger on the screen and then I can pass those coordinates to xdotool, (mousemove), and then click. More coming soon !!!!!! |
01-04-2021, 06:23 PM | #9 |
Grand Sorcerer
Posts: 12,774
Karma: 75003038
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Might |I suggest that this (and your other HowTo) would be well suited for the MobileRead wiki....
|
01-04-2021, 06:25 PM | #10 |
Evangelist
Posts: 479
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
|
|
01-04-2021, 06:33 PM | #11 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
How do you add a page to the wiki?
Last edited by Elektron; 01-04-2021 at 06:38 PM. |
01-04-2021, 07:42 PM | #12 |
Evangelist
Posts: 479
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
|
This is quite difficult, I took several minutes just searching this.
You have to type an URL!!! https://wiki.mobileread.com/wiki/Kobo_Glo_H This will redirect you to an empty page. You can then choose to edit it. Choose the right category though BTW touch is working |
01-04-2021, 09:32 PM | #13 |
Evangelist
Posts: 479
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
|
Added TOUCH support!
Well... this was quite faster than what I would have thought this would take me time to do! But it is there! Check it out in the main post!
Sure, it's not multitouch, you can't do scrolling, but it's better than nothing I think. And with PgUp/PgDn in the virtual keyboard, scrolling webpages is not that bad I think. If you try it, please report if it worked or not, I'd like to know! |
01-04-2021, 10:09 PM | #14 |
Banned
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
|
Yay!!!
|
01-04-2021, 11:43 PM | #15 |
Evangelist
Posts: 479
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
|
|
Tags |
kobo, linux, xorg |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PW3 Can run full blown Chromium browser on up-to-date Alpine Linux | schuhumi | Kindle Developer's Corner | 59 | 06-11-2024 05:45 AM |
Native [WIP]replacement firmware for Kindle/Kobo? | zaoqi | Kindle Developer's Corner | 0 | 03-03-2019 05:38 AM |
X apps run on native touch Xorg. | geekmaster | Kindle Developer's Corner | 88 | 05-14-2014 08:58 AM |
Kobo Support Nightmare: Aura with Blown Pixels | geekspertise | Kobo Reader | 23 | 12-09-2013 11:25 PM |
Portable Firefox (Run it off a USB Drive) | Colin Dunstan | Lounge | 3 | 11-22-2004 08:42 PM |