Remote control

F

FrenKy

Hello *,
I have a network with http proxy, nothing but http and https gets out of
the intranet to the internet. And I need to make a communication from
server residing on internet running single proprietary GUI app which
does NOT implement something like "web client" so I need to pass mouse
events to the gui (restricted keyboard input)...

So more descriptive [server]<->[http proxy]<->[client]

If the proxy is not so restrictive (only passing http traffic) this
would not be a problem (e.g. Sockets + serialization with compression)
and Robot class gives me all I need to do this.

What comes to mind is jsp or jsf on server side + an applet on client
side, but I'm not fluent with either jsf nor jsp, so I'd be very happy
if someone would be able to answer following:
Can I use java.awt.Robot().mouseMove(..) and
java.awt.Robot().createScreenCapture(..) on the server side (jsp, jsf)
or in other words, will that code be able to move the mouse on a server
machine and take a screen shot? I was thinking about using jBoss.

As you see, this is very, very dumb remote control, but as it is
oriented to a single app, it should work if I can do that somehow...

Thanks in advance!
 
A

Abhijat Vatsyayan

FrenKy said:
Hello *,
I have a network with http proxy, nothing but http and https gets out of
the intranet to the internet. And I need to make a communication from
server residing on internet running single proprietary GUI app which
does NOT implement something like "web client" so I need to pass mouse
events to the gui (restricted keyboard input)...

So more descriptive [server]<->[http proxy]<->[client]

If the proxy is not so restrictive (only passing http traffic) this
would not be a problem (e.g. Sockets + serialization with compression)
and Robot class gives me all I need to do this.

What comes to mind is jsp or jsf on server side + an applet on client
side, but I'm not fluent with either jsf nor jsp, so I'd be very happy
if someone would be able to answer following:
Can I use java.awt.Robot().mouseMove(..) and
java.awt.Robot().createScreenCapture(..) on the server side (jsp, jsf)
or in other words, will that code be able to move the mouse on a server
machine and take a screen shot? I was thinking about using jBoss.

As you see, this is very, very dumb remote control, but as it is
oriented to a single app, it should work if I can do that somehow...

Thanks in advance!
From little that I understand of your problem : you might want to look
at the enterprise edition of realVNC which supports viewer connections
over HTTP. I have not used this (or even read the documentation
carefully) so I am not sure if it truly uses HTTP but my guess is that
it does. The viewer over HTTP is just a java applet so looks like they
are already doing, in java, what you want to do.
Abhijat
 
F

FrenKy

Abhijat said:
FrenKy said:
Hello *,
I have a network with http proxy, nothing but http and https gets out
of the intranet to the internet. And I need to make a communication
from server residing on internet running single proprietary GUI app
which does NOT implement something like "web client" so I need to pass
mouse events to the gui (restricted keyboard input)...

So more descriptive [server]<->[http proxy]<->[client]

If the proxy is not so restrictive (only passing http traffic) this
would not be a problem (e.g. Sockets + serialization with compression)
and Robot class gives me all I need to do this.

What comes to mind is jsp or jsf on server side + an applet on client
side, but I'm not fluent with either jsf nor jsp, so I'd be very happy
if someone would be able to answer following:
Can I use java.awt.Robot().mouseMove(..) and
java.awt.Robot().createScreenCapture(..) on the server side (jsp, jsf)
or in other words, will that code be able to move the mouse on a
server machine and take a screen shot? I was thinking about using jBoss.

As you see, this is very, very dumb remote control, but as it is
oriented to a single app, it should work if I can do that somehow...

Thanks in advance!
From little that I understand of your problem : you might want to look
at the enterprise edition of realVNC which supports viewer connections
over HTTP. I have not used this (or even read the documentation
carefully) so I am not sure if it truly uses HTTP but my guess is that
it does. The viewer over HTTP is just a java applet so looks like they
are already doing, in java, what you want to do.
Abhijat
Noup... As far as I understood the documentation they connect to real
vnc server, only using applet rather than standalone app. And java
viewer can also be ran as a standalone app. So, binary data transfered
not http.

In a meanwhile, I found small web server
(http://java.sun.com/developer/technicalArticles/Networking/Webserver/WebServer.java)
removed what I do not need so that it now accepts only requests for one
file and few command sequences encapsulated as http url and passed to it
from the applet :) If need be, I can add this http functionality to
QuickServer and be happy with that.
Peace of cake, two hours of work, and it does the trick.


Thanks for the answer though.
 
A

Abhijat Vatsyayan

FrenKy said:
Abhijat said:
FrenKy said:
Hello *,
I have a network with http proxy, nothing but http and https gets out
of the intranet to the internet. And I need to make a communication
from server residing on internet running single proprietary GUI app
which does NOT implement something like "web client" so I need to
pass mouse events to the gui (restricted keyboard input)...

So more descriptive [server]<->[http proxy]<->[client]

If the proxy is not so restrictive (only passing http traffic) this
would not be a problem (e.g. Sockets + serialization with
compression) and Robot class gives me all I need to do this.

What comes to mind is jsp or jsf on server side + an applet on client
side, but I'm not fluent with either jsf nor jsp, so I'd be very
happy if someone would be able to answer following:
Can I use java.awt.Robot().mouseMove(..) and
java.awt.Robot().createScreenCapture(..) on the server side (jsp,
jsf) or in other words, will that code be able to move the mouse on a
server machine and take a screen shot? I was thinking about using jBoss.

As you see, this is very, very dumb remote control, but as it is
oriented to a single app, it should work if I can do that somehow...

Thanks in advance!
From little that I understand of your problem : you might want to
look at the enterprise edition of realVNC which supports viewer
connections over HTTP. I have not used this (or even read the
documentation carefully) so I am not sure if it truly uses HTTP but my
guess is that it does. The viewer over HTTP is just a java applet so
looks like they are already doing, in java, what you want to do.
Abhijat
Noup... As far as I understood the documentation they connect to real
vnc server, only using applet rather than standalone app. And java
viewer can also be ran as a standalone app. So, binary data transfered
not http.
I do not understand how you concluded that they do not use http from the
fact that they use applets as well as java application and that they
transfer binary data. Also - I just looked up - enterprise edition comes
with HTTP proxy (see http://www.realvnc.com/products/enterprise/#ophv)
and costs about $50 or so.
In a meanwhile, I found small web server
(http://java.sun.com/developer/technicalArticles/Networking/Webserver/WebServer.java)
removed what I do not need so that it now accepts only requests for one
file and few command sequences encapsulated as http url and passed to it
from the applet :) If need be, I can add this http functionality to
QuickServer and be happy with that.
Peace of cake, two hours of work, and it does the trick.
Sounds like fun .. how are you painting the user interface, simulating
button clicks and mouse moves etc. ?
 
F

FrenKy

Abhijat said:
FrenKy said:
Abhijat said:
FrenKy wrote:
Hello *,
I have a network with http proxy, nothing but http and https gets
out of the intranet to the internet. And I need to make a
communication from server residing on internet running single
proprietary GUI app which does NOT implement something like "web
client" so I need to pass mouse events to the gui (restricted
keyboard input)...

So more descriptive [server]<->[http proxy]<->[client]

If the proxy is not so restrictive (only passing http traffic) this
would not be a problem (e.g. Sockets + serialization with
compression) and Robot class gives me all I need to do this.

What comes to mind is jsp or jsf on server side + an applet on
client side, but I'm not fluent with either jsf nor jsp, so I'd be
very happy if someone would be able to answer following:
Can I use java.awt.Robot().mouseMove(..) and
java.awt.Robot().createScreenCapture(..) on the server side (jsp,
jsf) or in other words, will that code be able to move the mouse on
a server machine and take a screen shot? I was thinking about using
jBoss.

As you see, this is very, very dumb remote control, but as it is
oriented to a single app, it should work if I can do that somehow...

Thanks in advance!
From little that I understand of your problem : you might want to
look at the enterprise edition of realVNC which supports viewer
connections over HTTP. I have not used this (or even read the
documentation carefully) so I am not sure if it truly uses HTTP but
my guess is that it does. The viewer over HTTP is just a java applet
so looks like they are already doing, in java, what you want to do.
Abhijat
Noup... As far as I understood the documentation they connect to real
vnc server, only using applet rather than standalone app. And java
viewer can also be ran as a standalone app. So, binary data transfered
not http.
I do not understand how you concluded that they do not use http from the
fact that they use applets as well as java application and that they
transfer binary data. Also - I just looked up - enterprise edition comes
with HTTP proxy (see http://www.realvnc.com/products/enterprise/#ophv)
and costs about $50 or so.
I had tried it, it did not work, so I looked at the tight vnc java
client I was using. But it looks like I was not thorough enough.
Sounds like fun .. how are you painting the user interface, simulating
button clicks and mouse moves etc. ?
I use applet to paint the screen grabbed by Robot. I do not care about
mouse movement, only about mouse click events for right and left mouse
button at certain coordinates... Not very generic, but it does this
specific not very heavy user interactive task (once a day, around noon
few clicks - 3 minute task if you are eating donut at the time :)).
But, I think I know what your asking - it is not real time. Refresh is
by demand and 5s after command has been executed.

I do have one issue worth mentioning though. Applet always loads cached
image so I use:
img_scr = getImage(base, "screenchot.gif?cacheFix=" + Math.random());

Is there a better way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top