📜 ⬆️ ⬇️

Video on the e-book. Attempt to use e-ink reader as a second monitor in linux

This essay is inspired by this publication for 2012, which outlines a great way to avoid buying the only existing usb monitor in the world with liquid ink of very high cost. Brand, model and price will not be announced. If you read the history of night experiments, there is no desire, then at the bottom of the page there is a video with the result.

image


Idea itself


I have long been wondering how you can try to use the e-ink reader as a second monitor. In order not to disassemble anything, not to pick up a soldering iron and not to frighten the neighbors with the smell of colophonic tar, I had to search the Internet for some time in search of possible solutions. And the solution was found, although not as attractive as connecting an e-book directly. And this decision, in principle, has been known for quite some time - it is a bundle of programs that allows you to control your desktop through a bruser.

Soup set


1) x11vnc - remote desktop server
2) apache web server
3) tomcat - “open source servlet container developed by the Apache Software Foundation. Implements servlet specification and JavaServer Pages (JSP) and JavaServer Faces (JSF) specifications. ” Source: Wikipedia
4) guacamole is a program for providing remote access to the desktop using a regular web browser as a client. “It is written in C, Java and JavaScript, and implements a layer that allows you to organize desktop management from a web browser. For the connection to the desktop in the interlayer, the standard protocols VNC, RDP and SSH are supported. ” Source: Opennet .
It is worth adding: in the repositories there are two programs guacamole-server and guacamole .
')
For those who are not in the subject:
* All programs are installed on a laptop, netbook, etc.
** You do not need to install anything on the e-book itself.
*** This solution is platform independent. Linux, Windows - does not matter.

How to do, how it was done, what happened, and what did not quite


1) Installing tomcat can be done using the package manager of your distribution or download directly from the official site.
I used the following guide and unpacked the archive in / usr / local / share , the path I got is this:
/usr/local/share/apache-tomcat-7.0.82

2) Next, you can configure the file /usr/local/share/apache-tomcat-7.0.82/conf/server.xml .
At your option! I did not change anything.

3) /usr/local/share/apache-tomcat-7.0.82/conf/tomcat-users.xml . Here you can only add a user. I added the lines that were offered to me as an example on the page with an authorization error, something like this (the reader is offered to act based on his own level of understanding):

<role rolename="manager-gui"/> <user username="user" password="123" roles="tomcat, manager-gui, manager-scrip$ </tomcat-users> 

4) Next, go to /usr/local/share/apache-tomcat-7.0.82/webapps . Here you need to add the file guacamole.war .

Where to get it?

The answer is: here. And here is the instruction on how to handle this file. In short: it needs to be copied to the /usr/local/share/apache-tomcat-7.0.82/webapps directory

Important! If the file has a different name, rename to guacamole.war
Important! guacamole.war must match the version of guacamole-server .

In addition to the above, I cloned this thread:

clone git: //github.com/apache/incubator-guacamole-client.git

5) In this paragraph, I suggest editing the file:
nano /etc/guacamole/user-mapping.xml
At your discretion. I just deleted the username and password in the first record:

 <user-mapping> <!-- Per-user authentication and config information --> <authorize username="" password=""> <protocol>vnc</protocol> <param name="hostname">localhost</param> <param name="port">5900</param> <param name="password"></param> </authorize> 

Start


6) Now you can run x11vnc
I ran it from a regular user:
x11vnc -notruecolor -forever

The last flag, so that the server does not stop when the connection with the client is broken. The default port is 5900.

7) Run guacamole-server. I do not know how this is done in other distributions, in Calculate Linux it is done like this:
/etc/init.d/guacd start
If everything is successful, then we get the following conclusion:
guacd | * Starting guacd ...
guacd | guacd [9345]: INFO: Guacamole proxy daemon (guacd) version 0.9.9 started

8) Run tomcat:
/usr/local/share/apache-tomcat-7.0.82/bin/startup.sh
Turns off like this:
/usr/local/share/apache-tomcat-7.0.82/bin/shutdown.sh

If everything is successful, then we have the output:

 /usr/local/share/apache-tomcat-7.0.82/bin/startup.sh Using CATALINA_BASE: /usr/local/share/apache-tomcat-7.0.82 Using CATALINA_HOME: /usr/local/share/apache-tomcat-7.0.82 Using CATALINA_TMPDIR: /usr/local/share/apache-tomcat-7.0.82/temp Using JRE_HOME: /etc/java-config-2/current-system-vm Using CLASSPATH: /usr/local/share/apache-tomcat-7.0.82/bin/bootstrap.jar:/usr/local/share/apache-tomcat-7.0.82/bin/tomcat-juli.jar Tomcat started. 

9) We type in the browser http: // you_ip: 8080 / guacamole /
If you see an invitation to enter your login and password, then you can safely go. But it is better from a third-party device, because there is a chance to seize recursion.

10) Further, the reader is supposed to have an e-book with a WiFi module and a browser that has JavaScript support, since guacamole uses all of Ajax, which organizes the work of our pseudo second display. For non-experts on web technologies I will add: the ability of Ajax to automatically automatically update the page content at some intervals acts as the main technology of emulating a second monitor. So, there were two books in the author's apartment: Sony PRS-T2 and PocketPro 612 .
Both devices turned out to be useful for connecting to a netbook desktop.

Result on video:

What did not work out?


On PocketPro, the browser periodically falls quite predictably. On Sony, the connection is broken. The problem is partially solved by automatic reconnection.

Conclusion


In general, the result is acceptable for reading, viewing something in the browser, typing (if not at all) and some simple operations on a pseudo remote machine, but there is something to think about ... well, goodbye: “Thanks for buying a TV and read this instruction "(C) Hoku from the TV show" Town ".

Update


Response time when typing: (found another reader with relatives)

Just in case: netbook and reader are connected via WiFi via a router.

And the bike became a three-wheeled


To make it even more interesting, you can add the -shared flag when running x11vnc ,
then you can connect to your computer from several devices, including a smartphone.
Now perhaps the main screen does not use at all, move the cursor and all
mouse actions can be performed by looking at the screen of the smartphone.

image

Attempt to play a 3D game of 1994 for Sega.


Source: https://habr.com/ru/post/341748/


All Articles