Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2012, 02:12 PM   #151
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
I had for a while a display on the Kindle from the Pi using:
x11vnc -rfbport 5901 -forever
but could not get the:
xinit /usr/bin/openbox -- /usr/bin/Xvnc :1 -geometry 1200x824 -depth 16 -dpi 160 -alwaysshared -lazytight
to work.
Now I just have instabilities with usbnet, xorg and don't seem to be able to even get that far. startx just seems to stop the usbnet from communicating with the Kindle.
It was promissing but couldn't get the xinit to get the optimal resolution and unless I can get the usbnet and Xorg stability back I can't go any further on the Pi.
:-(
sunnydev is offline   Reply With Quote
Old 07-12-2012, 03:52 PM   #152
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
OK we’re back on with the Kindle-Pi. :-)
I rolled back the archlinux config as I must have changed something adversely affecting the stability.
The story so far…

In trying the command (from an Xterm):

xinit /usr/bin/openbox -- /usr/bin/x11vnc :1 -geometry 1200x824 -depth 16 -dpi 160 -alwaysshared –lazytight

I just get errors depending on which x device I try to connect to:

:0 fatal IO error 11 (Resource temporarily unavailable) on X server “;0”
:1 unable to connect to X server: Connection refused

I’ve had more success with (from an Xterm):

x11vnc –fbport 5901 –geometry 800x600 –shared -forever

but unrecognised options were: -depth 16 –dpi 16 –lazytight

Now I have a complete rendering of the RPi screen on the Kindle … but, its far too small to be of practical use as my monitor is 1824x984 so scaled to 800x600 it looks small.

Some questions:

1. How can I reduce the size of the X desktop to improve the scaling?
2. Can I start the X as a “virtual” console at an 800x600 res?
3. If I want to automate the start up of Xorg so that it and x11vnc starts on boot.
4. Can I rotate the screen in the vncviewer? I think I recall an earlier post saying No.
5. How do I quit from vncviewer? E.g. if I forget to rotate the Kindle screen first, then need to quit vncviewer to rotate and then go back.

The aim eventually is to be able to have the option boot the Pi and use the Kindle as the console without the HDMI Monitor, only connecting my the monitor when needed.

Thanks for any advice offered.
sunnydev is offline   Reply With Quote
Old 07-12-2012, 04:48 PM   #153
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Well, that scenario is what I thought you wanted to do in the first place. Thus the X server (!) used in the xinit command in the OP - it's a pure VNC<->X server. Xvnc is *not* x11vnc. The latter provides a *running* X server display via VNC. The further however is an X server on its own, as well as being a VNC server. Thus the start-up on another port.

Just install (e.g.) tightvnc, it will provide the Xvnc binary.

As for the list of questions:
1. has nothing to do with all this. Look this up for the default raspi X server, whatever that might be.
2. Xvnc is what you're searching for, I think.
3. You want to automate the start of Xvnc. Just use that xinit line suggested in the OP in your system startup scripts, e.g. /etc/rc.local on Arch Linux.
4. Hm, I think it should adapt to the orientation the framebuffer currently has, but that's it.
5. Via launchpad: shift-V-Q. Or adapt the config.lua file, a function for quitting is provided, you can call it for a certain key combinations. Would require messing with Lua, though.
hawhill is offline   Reply With Quote
Old 07-13-2012, 12:20 PM   #154
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
@hawhill thanks for the corrections.
I mistakenly took X11vnc as an arm implementation Xvnc.

After some fixing of fonts and installed prereq packages the problem has moved on a little was I’m stalled at the x2vnc -east localhost:1 stage as there was no binary package of x2vnc for archlinuxarm.

Fortunately I downloaded the x2vnc source package and was able to compile it.

Everything seems to be there but I just get a black screen on the Kindle.
Any tips for diagnosing the problem?

I assume “xinit ..be called direct from a bash console and not from an X terminal window but the x2vnc is from the terminal window.

In order to help diagnose I'm using realvncviewer from a Windows PC to connect to the linux host: (I had to use host 0 on the linux host as 1 did not work)
The xinit reports:
xinit /user/bin/openbox/ -- /usr/bin/Xvnc :0 -geometry 1200x824 -depth 16 -dpi 160 -alwaysshared -lazytight
14/07/12 15:08:07 Got connection from client 127.0.0.1
14/07/12 15:08:07 Using protocol version 3.3
14/07/12 15:08:08 Pixel format for client 127.0.0.1:
14/07/12 15:08:08 16 bpp, depth 16, little endian
14/07/12 15:08:08 true colour: max r 31 g 63 b 31, shift r 11 g 5 b 0
14/07/12 15:08:08 no translation needed
14/07/12 15:08:08 Using hextile encoding for client 127.0.0.1
14/07/12 15:13:24 Got connection from client 192.168.10.177
14/07/12 15:13:24 (other clients 127.0.0.1)
14/07/12 15:13:24 Using protocol version 3.8
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 16
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 22
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 21
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 15
14/07/12 15:13:26 Using zlib encoding for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -311
14/07/12 15:13:26 Enabling full-color cursor updates for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -223
14/07/12 15:13:26 Pixel format for client 192.168.10.177:
14/07/12 15:13:26 8 bpp, depth 8
14/07/12 15:13:26 uses a colour map (not true colour).
14/07/12 15:13:26 Using raw encoding for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 22
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 21
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 16
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 15
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -311
14/07/12 15:13:26 Enabling full-color cursor updates for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -223
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 16
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 22
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 21
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding 15
14/07/12 15:13:26 Using zlib encoding for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -311
14/07/12 15:13:26 Enabling full-color cursor updates for client 192.168.10.177
14/07/12 15:13:26 rfbProcessClientNormalMessage: ignoring unknown encoding -223
14/07/12 15:15:12 Client 192.168.10.177 gone
14/07/12 15:15:12 Statistics:
14/07/12 15:15:12 key events received 6, pointer events 427
14/07/12 15:15:12 framebuffer updates 3, rectangles 35, bytes 21356
14/07/12 15:15:12 cursor shape updates 3, bytes 612
14/07/12 15:15:12 raw rectangles 1, bytes 16812
14/07/12 15:15:12 zlib rectangles 31, bytes 3932
14/07/12 15:15:12 raw bytes equivalent 1005624, compression ratio 48.477825

xvnv2 reports:
x2vnc -east localhost:0
x2vnc: VNC server supports protocol version 3.8 (viewer 3.3)
x2vnc: No authentication needed
x2vnc: Desktop name "root's x11 desktop (pi01:0)"
x2vnc: Connected to VNC server, using protocol version 3.3
x2vnc: VNC server default format:
x2vnc: pointer multiplier: 0.861533

Last edited by sunnydev; 07-14-2012 at 12:02 PM. Reason: Change of status, typo correction, inclusion of log
sunnydev is offline   Reply With Quote
Old 07-14-2012, 02:17 PM   #155
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
Following form the above, I restarted the X servers to match @hawhills example.
i.e. device :0 the main X window device 0, device :1 the X server with Xvnc
From a terminal window on device 0 I ran x2vnc -east localhost:1.
I used Realvnc from a PC as the vncviewer instead of the Kindle.
The Windows PC Realvnc viewer connects with device 1 (e.g. a basic X session).
Without x2vnc running device 0 cursor stops at the east end of the desktop, with x2vnc running the mouse runs off the desktop. All appears fine so far... only anything running off the east side does not appear on the vncviewer.
Any advice on configuration or diagnosis appreciated.
More output:

x2vnc: VNC server supports protocol version 3.8 (viewer 3.3)
x2vnc: No authentication needed
x2vnc: Desktop name "root's x11 desktop (pi01:1)"
x2vnc: Connected to VNC server, using protocol version 3.3
x2vnc: VNC server default format:
x2vnc: pointer multiplier: 0.861533

and
from Xvnc
14/07/12 18:38:12 Got connection from client 127.0.0.1
14/07/12 18:38:12 (other clients 192.168.10.177)
14/07/12 18:38:12 Using protocol version 3.3
14/07/12 18:38:12 Client 127.0.0.1 gone
14/07/12 18:38:12 Statistics:
14/07/12 18:38:12 framebuffer updates 0, rectangles 0, bytes 0

as the connections are x.x.x.177 from the Windows PC viewer and localhost is the x2vnc it seems as if the problem is getting output from device 0 through x2vnc to device 1.

The only warnings I can see are from Vvnc:
XKB extension is not present on the server or is old
Xinerama extension is not present on the server
XRandR extension is not present on the server
but are they critical to x2vnc working?

Last edited by sunnydev; 07-14-2012 at 02:30 PM. Reason: added some text
sunnydev is offline   Reply With Quote
Old 07-15-2012, 07:37 AM   #156
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
No, they shouldn't be. But I must admit that I lost track about how you want to set devices up. "x2vnc" is for input only. In the scenario I proposed using it, there would be another X server running that is in charge of the input devices, and x2vnc would be used to "forward" these input devices to the other (VNC-frontend) X server. But when there's no such second server running on the RasPi, that wouldn't work.

Unfortunately I'm not aware of a tool that allows to "connect input devices" to a VNC server by other means, so this might be a dead end (for now). The VNC client on the Kindle has no mouse support (yet?).
hawhill is offline   Reply With Quote
Old 07-16-2012, 04:35 AM   #157
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
@hawhill
I thought I'd recreated the scenario you described at the start of the thread which I understand to be:
1. A normal X server running on the linux host (device 0) this provides the normal console display on the linux host, keyboard and mouse inputs.
2. The xinit starts the Xvnc (tightvncserver) running as an Xserver (device 1) on the linux host with vnc output to a vncviewer (Kindle or PC).
3. x2vnc then forwards the mouse (and keyboard) to device 1 when the mouse goes off the desktop of device 0, e.g. the East boundary.

In my case both the native X and Xvnc servers work on the Pi. The vnc viewer connects to the Xvnc server. The x2vnc appears to connect to the Xvnc server and the cursor does go off the East boundary.
It appears the last part, the x2vnc forwarding display to thr Xvnc server does not appear to be working.
Also if I use a Windows PC as the viewer rather than the Kindle the Xvnc server responds to mouse control from the PC. Is this normal behaviour or should the x2vnc lockout other mouse input to the Xvnc server?
It could be an x2vnc problem but I was looking for verification that the configuration was "correct" and any tips on diagnosing the x2vnc to validate of that's where the problem is.
Thanks
sunnydev is offline   Reply With Quote
Old 07-17-2012, 07:27 AM   #158
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
OK, that is the setup I outlined, yes. I have a hard time imagining what's wrong with x2vnc. When you move the mouse cursor "out of" the main screen, it should appear on the VNC-exported X server, and keyboard input should be forwarded to that server. More than one client on a VNC server is possible, though some need special configuration (flag "-alwaysshared") in order to work that way. x2vnc does _NOT_ forward anything but the input devices, though. So I'm not sure what you mean at that point. This is why I outlined a method that would start a new, separate X server running a new, separate window manager (openbox in the example). You can not just "move applications" from one X server to the other.
hawhill is offline   Reply With Quote
Old 07-17-2012, 09:57 AM   #159
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
Thanks for clarifying the x2vnc.
The problem appears to be the redirected inputs are not getting to the VNC exported X server.
The cursor moves of the East boundary of the X desktop but does not appear on the VNC viewer.
At present it seems my only possible course of action I have is to try compile different versions of x2vnc to see if one of those work.
sunnydev is offline   Reply With Quote
Old 07-17-2012, 10:03 AM   #160
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
While it does not exactly solve the problem at hand, you might want to have a look at x2x, too. It basically does the same for 2 X servers - which is what you have, too (when looking at it a slight bit differently). Or synergy, which is basically a x2x with more bells and whistles.
hawhill is offline   Reply With Quote
Old 07-18-2012, 01:40 PM   #161
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
Thanks for the x2x tip. It was very useful in diagnosis.

I discovered the problem was with the PC RealVNC viewer configuration on the PC I used to test. The default option in the advanced settings is to render the cursor locally (on the PC viewer). As soon as I switched that off the rendering was done by Xvnc server and therefore appeared on the PC viewer.

I went back and tested with Kindle vncviewer and it all works. Perhaps I missed the cursor first time around as it appears black against a black background or maybe I was too aggressive on the mouse movements as I note the updates to the Kindle are laggy, over usbnet at least.

FYI: I tested x2x between two native X servers on Archlinux/RPi and it appears to work as well as x2vnc. There maybe a slight advantage in using x2vnc as it may have some Xvnc logging advantages but I've fully investigated any logging x2x may have.

When working through the problem I noticed that tightvnc server standard output indicates the number of mouse and keyboard events from x2vnc when the client disconnects. So I noticed when I killed x2vnc that tightvnc was actually picking up the mouse pointer events so that gave the clue about the viewer problem. The logging events with Xvnc aren't there when using x2x.

My next steps are look more configuration of the basic Openbox is required now as there's no usable applications but that's a different problem.

Thanks for the help @hawhill. Works as per your original post on the Raspberry Pi with Archlinuxarm.

Last edited by sunnydev; 07-18-2012 at 03:06 PM.
sunnydev is offline   Reply With Quote
Old 07-19-2012, 04:51 AM   #162
jcg.
Junior Member
jcg. began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
Wow, this is great!

I just started bouncing around the idea of using a R-Pi with Kindle on the R-Pi forum the other day, with no response yet. To find you guys working on it here is great news!

Thanks hawhill for the x2x tip! I was also wondering if it might be possible to just share X in that way without doing the whole VNC thing, although I have just been reading that in some cases VNC is actually faster... Seems counter-intuitive.

Once we get the display sorted out, it's just the beginning. There is a wifi card to be hijacked, and a filesystem to be mounted over the usbNetwork. Finally, but it seems too ambitious, there's a whole extra CPU sitting there...

http://www.raspberrypi.org/phpBB3/vi...125778#p125778
jcg. is offline   Reply With Quote
Old 07-19-2012, 07:18 AM   #163
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by jcg. View Post
Finally, but it seems too ambitious, there's a whole extra CPU sitting there...

http://www.raspberrypi.org/phpBB3/vi...125778#p125778
Two complete "extra" cpu and systems if you have the 3G card.
The 3G card is also an ARM SoC -
Very little here to-date on making use of the system on the 3G card.
knc1 is offline   Reply With Quote
Old 07-19-2012, 03:20 PM   #164
jcg.
Junior Member
jcg. began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2012
Device: Kindle 3
Quote:
Originally Posted by knc1 View Post
Two complete "extra" cpu and systems if you have the 3G card.
The 3G card is also an ARM SoC -
Very little here to-date on making use of the system on the 3G card.
That's very interesting. It seems that a lot of the Kindle hacking that has been done is focused on retaining the device's functionality and interop with Amazon's services. That is, ``bricking'' is seen as a bad thing. It seems like this device is way more useful as a general purpose computing device. Has anyone yet been able to install an OS from scratch?
jcg. is offline   Reply With Quote
Old 07-20-2012, 04:30 AM   #165
sunnydev
Member
sunnydev is on a distinguished road
 
Posts: 15
Karma: 70
Join Date: Jul 2012
Location: Germany
Device: Kindle
This is just an opinion and my own position perspective on @jcg. #162 and please don’t think I’m being critical, quite the opposite, if you have the time, enthusiasm and money then I’d encourage you to go for it.

It’s NOT that bricking is bad, it probably adds lots more options but would that regarded as off topic as this is “mobileread” thread ? If people really have a Kindle that you don’t want to use with Amazon then it sounds like an interesting project.

I would like to be able to use the Kindle as the primary display for the Pi but I don’t want to totally repurpose the Kindle. I still want to take my Kindle on holiday and read my books in the Sun. :-) The goal for me would be have an eInk display I can use with a full size keyboard (to the Pi) for some compute capability. An alternative approach would be a full sized keyboard on the Kindle but that’s another story. I’d probably be replace this configuration later this year with an Android Tablet that has a PixelQi screen when they finally hit the market. The usual promises of imminent release have been going on for months.

Hacking the 3G and tethering sounds a little more risky. Perhaps the TelCos and Amazon have thought of that one and would have some monitoring and protection in place if this goes outside a little non-Amazon use e.g. more than is reasonably possible via the experimental browser etc. I’ve not read the Amazon Terms and Conditions but there could be a gotcha clause in there that makes you liable for costs (assuming they can identify you). Alternatively perhaps they would just cut off the 3G (and brick the device?)

Alas I have constraints of time so I have to moderate my interest, although I’m interested in how you’d get on with these other projects, the only one I can put anytime into would be the non-destructive use of Kindle so returning to that topic: the conclusion I’ve reached so far is x2vnc approach works, it’s a little laggy and a little more is needed to configure the openbox/Xvnc server for more X terminal features and then the automation of it all to fire up from boot. I’ll post some of this to the Rpi forum too.

Thanks all for the help. Great forum, thread and some great posts.
sunnydev is offline   Reply With Quote
Reply

Tags
application, kindle, source, viewer, vnc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (GPLv2) Translation Dictionaries Elleo Amazon Kindle 3 01-11-2011 10:57 PM
Calibre native app on iphone for reading news? bigreat Calibre 2 07-21-2010 11:50 PM
Android Android App: VNC leo315 enTourage Archive 4 05-13-2010 06:06 PM
Android VNC viewer (use your PC from the eDGe!) devseev enTourage Archive 2 04-11-2010 01:21 AM
PalmPDF - native PDF Viewer for Palm OS 5.x Colin Dunstan Reading and Management 2 11-23-2005 02:09 PM


All times are GMT -4. The time now is 07:35 PM.


MobileRead.com is a privately owned, operated and funded community.