![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
kvncviewer - next iteration of kindlevncviewer
I used some spare time to hack a bit on the VNC viewer I published here before, KindleVNCviewer (https://www.mobileread.com/forums/sho...d.php?t=150434).
It is a major rework. It's not tested on Kindle 2, 3, DX, but it hopefully still works on those devices. It is however tested on Kindle PW1 and will probably run on K4, K5 (KT), KPW1 and KPW2. Also, a version for Kobos is available (announced in the Kobo developer forum). Thus, I decided a slight rename: It is now known as "kvncviewer" :-) Source code is available on github in the old place: http://github.com/hwhw/kindlevncviewer As it is a major redesign, I opened this new thread. For some scenarios, people might want to continue to use the old code. The new code brings some new options. It is written in Lua, and that I took a bit further than with the old codebase, which used Lua for configuration, too. The new code is implemented using LuaJIT. It re-uses the framebuffer code from Koreader and is quite versatile. It allows for rotation options, b&w dithering on all devices, configurable refresh timeouts (though this won't make your screen faster than the hardware can do, but you might want to fiddle with the options and report your experiences here) and some more things I forgot about. Attached is the compiled version for Kindles. |
![]() |
![]() |
![]() |
#2 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Works perfectly on PW1, Hans! And no more inverted colors! Beautiful work, thank you!
|
![]() |
![]() |
![]() |
#3 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Argh, annoying problem... after using it for some time it hangs all the kindle
![]() |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
OK, so back to more testing....
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 40393
Join Date: May 2012
Device: Kindle Touch
|
My KT have hanged after using rotateFB 90 even though it has been in landscape mode. Without rotating, it works well.
More: It doesn't fit KT screen, there is still a gap between vncviewer window and main window. Last edited by ppoo; 12-02-2013 at 09:32 PM. |
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
It most probably is not the fault of rotating. There is a race condition in the timer code I've yet to investigate. At least here, rotating by (steps of) 90 degrees works fine. Well, I certainly didn't test on KT (I don't have one), but I don't see where it would be different there. Hang on a bit and test when the bug is fixed.
What do you mean with "doesn't fit KT screen"? You will, in any case, run a VNC server offering a display exact the size of the eink device's screen in order to really "fit" one to another. Easy to do using a virtual display like "Xvnc" on Linux, possibly a bit more fiddly when exporting a Desktop screen. |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 40393
Join Date: May 2012
Device: Kindle Touch
|
I thinking of some kinds of "overflow" because of mismatch size or when I rotate, vnc screen spread to outside frame buffer.
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
What do you mean with "screen spread to outside framebuffer"? A framebuffer is a region of memory. How do you determine that it spread outside that region?
Or are you just talking about a cropped display, i.e. some part of the exported desktop does not show? If so: this is intended behaviour! kvncviewer does _not_ scale the screen in any way! (And I guess it would look pretty ugly if it did.) |
![]() |
![]() |
![]() |
#9 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11
Karma: 34114
Join Date: Mar 2011
Device: PRS-350
|
Thanks for this. I tested on a 3.2.1 dxg, but was unsuccessful. luajit seems to be using some glibc 2.7 functions:
[root@kindle kvncviewer]# ./luajit ./luajit: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./luajit) |
![]() |
![]() |
![]() |
#10 | |
Junior Member
![]() Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
|
Tested on Kindle DX, not working
Quote:
I cloned your git repo today, and built kvncviewer. Though it builds successfully, when I try to run it (or more accurately, when I try to run luajit) I get the following terse error: "-sh: ./luajit:not found" It has the executable permissions set properly. Only similar error I find online is here: https://www.mobileread.com/forums/sho...d.php?t=228168, and their solution was a software update. Obviously I understand older devices aren't a priority, though I'm happy to test or help debug if I can. Going to report this an issue on GitHub now. Last edited by langelgjm; 01-23-2014 at 12:04 PM. |
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
I think it will have to be compiled with an older toolchain (or sysroot, that is) in order to work on these devices. I don't have one ready here, unfortunately. And I'm desperately missing free time to work on these projects of mine.
|
![]() |
![]() |
![]() |
#12 | |
Junior Member
![]() Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
|
Fix to rely only on GLIBC 2.4
Quote:
This will get you binaries that do not rely on glibc 2.7 (they rely on 2.4, and at least on my Kindle DX it has glibc 2.5). The relevant lines should read as follows: Code:
CFLAGS?="-D_GNU_SOURCE=1" LIBVNCCLIENT_CFLAGS=-D_GNU_SOURCE=1 -fPIC -shared \ Code:
CC= gcc -D_GNU_SOURCE=1 If you want to know why this is happening, the following link explains that the problem is a conflict between glibc and the C99 standard over scanf and related functions: http://stackoverflow.com/questions/2...some-platforms This explains why -D_GNU_SOURCE works: http://stackoverflow.com/questions/8...se-it-and-when And this was helpful in debugging the offending function: http://stackoverflow.com/questions/4...ation-coverage This does not solve my problem, which I am still working on. |
|
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
|
Probably going to try older version
As it turns out my problem (sh not finding a file) was due to the luajit binary pointing to a non-existing program interpreter.
This was solved by linking /lib/ld-linux-armhf.so.3 to /lib/ld-linux.so.3 (which itself was already linked to /lib/ld-2.5.so). However, now when attempting to run luajit I get a segmentation fault, which is probably going to be beyond my ability to debug, so I think I may try the older version. |
![]() |
![]() |
![]() |
#14 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Also, don't build anything with a hard float toolchain if you're targeting the Kindle. softfp is the best we can do, even for the PW2.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
KindleVNCviewer hack: full screen display? | bbhuston | Amazon Kindle | 0 | 04-28-2012 11:19 PM |