View Single Post
Old 04-15-2013, 12:12 AM   #393
inedible
Junior Member
inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.inedible is not intimidated by interfenestral monkeys.
 
Posts: 8
Karma: 26290
Join Date: Apr 2013
Device: Kindle PW
Played around with getting this running on my PW today. I've got to say I'm impressed with the greyscale and the refresh rate. I never expected an eink display might actually make a very practical and useful vnc client!
So, to get this up and running, of course the paperwhite's display doesn't refresh automatically, so I needed to add eips in a while loop, but no one ever really mentioned how to implement this.
The way I did it is by adding the eips loop, with an ampersand after it, to the *top* of /mnt/us/kindlevncviewer/kvncviewer.sh like so:
Code:
#!/bin/sh
cd $(dirname "$0")
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
while :; do eips ''; usleep 80000; done &
lipc-set-prop com.lab126.powerd preventScreenSaver 1
./kindlevncviewer -config config.lua "$@"
lipc-set-prop com.lab126.powerd preventScreenSaver 0
(I removed the "send menu twice to refresh" bit at the end, because the PW has no menu key, nor /proc/keypad)
Now, launching this from kterm overlays the vnc window on top of the terminal, and they compete for the foreground. So, ideally we should launch it from KUAL. For this I edited /mnt/us/extensions/vncviewer/menu.json like so:
Code:
{	"items": [	{"name": "VNC Connection", "priority": 1, "action": "/mnt/us/kindlevncviewer/kvncviewer.sh -password mypassword 10.0.0.2:1"}	]
}
With that in place, I can now launch vncviewer from KUAL and it connects successfully, with the following caveats:
  • The colors are inverted. As a workaround, in windows vista/7/8 you can use the magnifier tool to invert the colors. I assume a fix requires a recompile since this is a viewer setting, not a server one.
  • It launches in portrait mode, and the PW's 5.3.4 firmware only allows landscape mode while reading a book. As a workaround, open a book, set it to landscape, then launch kvncviewer.sh from a SSH shell (while the book is still open in landscape on your screen). I don't know of any fix to this. There's bound to be a way to set orientation from the command line, but I'll be damned if I can find info for the paperwhite. My google-fu fails me here.
  • If launched from kterm, it fights with kterm over who should write to the display, so every event that gets logged overwrites the vnc window. A workaround is to launch from KUAL or SSH. I don't expect there to be a fix to this.
  • No input. Touching anywhere on the screen sends an event, but it's always the same event, and it doesn't seem to affect the remote system. I assume this will require a recompile and/or a new config.lua.
  • The wifi drops out somewhat frequently. I'm going to have to re-read this thread because I recall there's an existing workaround for this.
  • I can't set windows server 2012 under esx to use a 1024x758 resolution no matter what I try. I've tried setting it in vmware, I've tried setting it in the windows registry, I've tried setting it from powershell, I've tried setting it from third party utilities like PowerStrip, but I'm not sure it can be done. This has nothing to do with the VNC viewer, but beware if you're planning to use this to administer or monitor a server, you will be missing 10 pixels along the bottom and therefore it will be impossible to click the start menu or charms menu. EDIT: See two posts down for workaround if you happen to have a linux machine handy.
  • Note: To exit, hold the power button for 8 seconds until it goes to a white screen. Press power again to turn it back on.
So, all in all, I'm really impressed this works at all, let alone as well as it does. I cannot wait until hawhill has some time to look at implementing the proper PW/Touch API calls for refreshing / input.
On that note, hawhill, if you're willing to accept a modest donation towards development, I have 0.1 bitcoins I'd like to donate. (Worth $24 last week, currently worth something like $9) Just provide a bitcoin address to send to, and I'd be happy to send a tip your way.

Last edited by inedible; 04-15-2013 at 03:33 PM.
inedible is offline   Reply With Quote