View Single Post
Old 12-22-2011, 04:09 AM   #1
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
X apps run on native touch Xorg.

While looking for something else in "ps aux" (process status), I noticed that Xorg was running with parameters that explained why x apps were not working when I had previously tested them. Xorg is launced in the kindle touch startup scripts with a "-nolisten tcp" option.

I tried running Xorg again, but with no parameters, and it automatically assigned X display ":1". I had previously copied xeyes for arm from a kindle 3 debian install to my kindle touch /mnt/us. When I noticed that the second Xorg launched using X display :1, I decided to drop what I was doing and test xeyes again, but using display :1 this time. As you can see in the photo below, xeyes is overlaying the top inch of my touch display, with the menu bar (title and time) on top of it. Even though the menu button is covered, it still works.

I have an ebook open (below xeyes and beneath the menu). Whenever I generate an event that updates the display, the eyes move to where my finger is touching. I pressed the menu button, and selected the new Launch menu (from yifanlu) from there. Then I took a photo.

I can make xeyes look wherever I want by touching the screen, then pressing the button switch below the screen (the square patch with four horizontal black lines).

Unfortunately, after the kindle goes into screensaver mode, waking it from screensaver mode makes it kill both Xorg's and restart its own Xorg. When that happened, I just started "Xorg :1 &", then "xeyes -display :1", then touched the button to trigger a redraw. First the display goes all black with only xeyes, then a few seconds later the bottom 85% of the screen displays black on white text like normal. What I did manually could easily be automated, to happen when the GUI framework restarts Xorg.

This discovery means that we can run x apps from the new app launcher menu (like xcalc, for instance). Some x programs might need static linking if their libraries are missing.

Here is a (crappy) photo taken with a cellphone, but it shows xeyes at the top of the display, and you can (sort of) see yifanlu's new App Launcher menu down in the center of the display.


How can I take a screen snapshot without messing up the display? For now, I just used dd to copy the framebuffer to a file (to be processed later). Then due to it being very late into the night here, I used my cellphone to take the crappy photo you see here. Time to get some sleep now.

Well, I think it is cool, anyway... The kindle touch runs X-Windows!

This x program is running native with no other custom code or libraries. It just needs the jailbreak installed so you can start another Xorg and run the x app.

WARNING: due to resource limitations in the kindle touch, there could be problems with running two copies of Xorg at the same time. It may be possible to coax the system into starting only one copy without disabling tcp (needed by x apps), instead of running two copies of Xorg. This exercise was done mostly as a proof of concept (and just for fun too).

More development for this will follow soon from myself and others in the Kindle Developer's Corner here on mobileread.com.

Last edited by geekmaster; 12-22-2011 at 07:57 AM.
geekmaster is offline   Reply With Quote