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 08-23-2011, 08:56 AM   #31
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,635
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
I just tried this and works perfect. It also the safest "hack" I know
Thanks..
thomass is online now   Reply With Quote
Old 08-23-2011, 02:48 PM   #32
kind
Junior Member
kind began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2011
Location: Poland
Device: Kindle 3
Thanks a lot. It is just what I need, but it must be improved.
kind is offline   Reply With Quote
Old 08-24-2011, 01:04 PM   #33
kindle3zeng
Enthusiast
kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.
 
Posts: 35
Karma: 1566
Join Date: Nov 2010
Device: kindle 3wifi
I took a look at your code, and found that we were working on different levels. My program directly writes to the framebuffer of the kindle for showing picture, while yours asks the web browser to the job for you.
kindle3zeng is offline   Reply With Quote
Old 08-25-2011, 12:49 AM   #34
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by kindle3zeng View Post
I took a look at your code, and found that we were working on different levels. My program directly writes to the framebuffer of the kindle for showing picture, while yours asks the web browser to the job for you.
Yep. Yours is a lot more advanced than mine. I have little knowledge of how I would even start to write to the framebuffer.
kranu is offline   Reply With Quote
Old 08-25-2011, 10:34 AM   #35
MrVer
Junior Member
MrVer began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2010
Device: none yet
kranu, how does your program work? Is there a need to update screen manually? Or does it work like RDP?
MrVer is offline   Reply With Quote
Old 08-25-2011, 11:30 AM   #36
kindle3zeng
Enthusiast
kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.kindle3zeng once ate a cherry pie in a record 7 seconds.
 
Posts: 35
Karma: 1566
Join Date: Nov 2010
Device: kindle 3wifi
Quote:
Originally Posted by MrVer View Post
kranu, how does your program work? Is there a need to update screen manually? Or does it work like RDP?
well,his program works this way: the host computer has a web server, which the browser of your kindle can connect to. The page shown in your browser on kindle is the a picture of the screenshot of your pc. The page refreshes automatically, so it will show "realtime" screenshots of your pc. As pointed out by others this maybe the safest way to do the job, sine it doesn't need any changes to your kindle at all. But the performance could be an issue and it would be hard to work around.
kindle3zeng is offline   Reply With Quote
Old 08-25-2011, 11:42 PM   #37
Mario1up
Connoisseur
Mario1up has a complete set of Star Wars action figures.Mario1up has a complete set of Star Wars action figures.Mario1up has a complete set of Star Wars action figures.Mario1up has a complete set of Star Wars action figures.
 
Mario1up's Avatar
 
Posts: 53
Karma: 374
Join Date: Mar 2011
Device: Kindle 3/G
That's a great script, Kranu. I'm having fun hosting little bits of HTML on my local network. Do you know if it's possible to link a local HTML file to throw up instead?

On topic though, I found that with your current image dimensions, the Kindle creates a scroll bar and scales the image a little. I reduced them to 595x701 and it works great with no scroll bars and pixel-perfect scaling. I also changed the "100%" scaling to exact pixel dimensions. This is very useful, thank you.
Mario1up is offline   Reply With Quote
Old 08-26-2011, 06:13 AM   #38
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by Mario1up View Post
That's a great script, Kranu. I'm having fun hosting little bits of HTML on my local network. Do you know if it's possible to link a local HTML file to throw up instead?

On topic though, I found that with your current image dimensions, the Kindle creates a scroll bar and scales the image a little. I reduced them to 595x701 and it works great with no scroll bars and pixel-perfect scaling. I also changed the "100%" scaling to exact pixel dimensions. This is very useful, thank you.
Yes, it's very much possible to output an HTML file. You would just use code similar to reading the picture but instead use your file. However, I wanted to keep my application as self-contained as possible, so I put all the HTML code as strings inside of the python script.

Hmm, I never really experimented with the size of the image. I just picked something that looked OK to me I'll take note of those dimensions in case I ever release an update to my script.
kranu is offline   Reply With Quote
Old 09-01-2011, 12:57 PM   #39
pconwell
Junior Member
pconwell began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2010
Device: kindle 3
ImportError: No module named wx

If you get an error like this:

Code:
$ python webserver_v1.py 
Traceback (most recent call last):
  File "webserver_v1.py", line 16, in <module>
    import wx
ImportError: No module named wx
You probably need to install python-wx:
Code:
$ sudo aptitude install python-wxtools python-wxgtk2.8
You probably don't need both packages, but I'm lazy and like to shotgun blast my problems.
pconwell is offline   Reply With Quote
Old 09-01-2011, 01:16 PM   #40
pconwell
Junior Member
pconwell began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2010
Device: kindle 3
Kranu,

I made some slight modifications to your script. Nothing major, just makes it a little easier to see how to get the kindle to connect.

http://pastebin.com/Q6ipRm78

----

Here is a "better" way to get the ip, but I can't get the white space out between the IP and the port. If I can figure out a way to get rid of the white space, I'll post it up on pastebin again. And yes, I'm sure there is a much cleaner way to do this, but I'm not *that* familiar with awk. Anyway, you can see what I'm getting at:

Code:
  os.system("/sbin/ifconfig | grep inet | grep -v inet6 | grep -v 127 | awk '{ sub(/inet addr:/, \"\"); print }' | awk '{ sub(/Bcast:.............../, \"\"); print }' | awk '{ sub(/M................./, \"\"); print }' | awk '{print $0,\":8000\"}'")
Ha, nevermind, I figured it out. Here is the 'correct' (if not very clean) way to do it:

Code:
  os.system("/sbin/ifconfig | grep inet | grep -v inet6 | grep -v 127 | awk '{ sub(/inet addr:/, \"\"); print }' | awk '{ sub(/Bcast:.............../, \"\"); print }' | awk '{ sub(/M................./, \"\"); print }' | awk '{print $1,\":8000\"}' |awk '{ sub(/ /, \"\"); print }'")
... and here is the pastebin: http://pastebin.com/2zTgPLFA

Last edited by pconwell; 09-01-2011 at 02:05 PM.
pconwell is offline   Reply With Quote
Old 09-01-2011, 04:50 PM   #41
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by pconwell View Post
If you get an error like this:

Code:
$ python webserver_v1.py 
Traceback (most recent call last):
  File "webserver_v1.py", line 16, in <module>
    import wx
ImportError: No module named wx
You probably need to install python-wx:
Code:
$ sudo aptitude install python-wxtools python-wxgtk2.8
You probably don't need both packages, but I'm lazy and like to shotgun blast my problems.
Yep, I mentioned that you needed wx python at the beginning of the instructions.
kranu is offline   Reply With Quote
Old 09-01-2011, 04:52 PM   #42
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by pconwell View Post
Kranu,

I made some slight modifications to your script. Nothing major, just makes it a little easier to see how to get the kindle to connect.

Code:
  os.system("/sbin/ifconfig | grep inet | grep -v inet6 | grep -v 127 | awk '{ sub(/inet addr:/, \"\"); print }' | awk '{ sub(/Bcast:.............../, \"\"); print }' | awk '{ sub(/M................./, \"\"); print }' | awk '{print $1,\":8000\"}' |awk '{ sub(/ /, \"\"); print }'")
... and here is the pastebin: http://pastebin.com/2zTgPLFA
Interesting. Unfortunately, this doesn't work on Windows (for obvious reasons). I have a pretty good idea for how to do it, so I'll work on it, and post a cross-compatible solution.

Update: I found a solution. I updated the program.

Last edited by kranu; 09-02-2011 at 12:27 AM.
kranu is offline   Reply With Quote
Old 09-19-2011, 11:13 AM   #43
blackmost
Junior Member
blackmost began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2011
Device: kindle DXG
Cool new progress?

Dear Guys,

You have done what I am looking forwards for Kindles DXG. Kindle as a PC monitor, that would be very cool.

Have you got some new progress? please let us know your solution when you get the job done. I am eager to use it.


Quote:
Originally Posted by kranu View Post
Interesting. Unfortunately, this doesn't work on Windows (for obvious reasons). I have a pretty good idea for how to do it, so I'll work on it, and post a cross-compatible solution.

Update: I found a solution. I updated the program.
blackmost is offline   Reply With Quote
Old 09-19-2011, 12:03 PM   #44
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,635
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by blackmost View Post
Dear Guys,

You have done what I am looking forwards for Kindles DXG. Kindle as a PC monitor, that would be very cool.

Have you got some new progress? please let us know your solution when you get the job done. I am eager to use it.
http://www.mobileread.com/forums/sho...d.php?t=148581
thomass is online now   Reply With Quote
Old 09-19-2011, 07:30 PM   #45
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,081
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I have finished a first version of a VNC viewer. It's another approach to bringing PC screen content to the Kindle (tested on K3W and KDXG). Discussion and software is in a separate thread.
hawhill is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle -- additional killer app idea ginolee Amazon Kindle 4 09-30-2010 10:45 PM
An additional 'Karma' Question. . . GlenBarrington General Discussions 23 05-27-2010 09:43 AM
additional reading.. scottjl Apple Devices 1 04-28-2010 06:24 PM
ADDITIONAL CSS LARdT Calibre 1 02-04-2010 08:02 PM
Additional Columns dvs0826 Calibre 3 08-22-2009 06:43 PM


All times are GMT -4. The time now is 10:17 AM.


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