Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Remote control

Reply
Thread Tools

Remote control

 
 
FrenKy
Guest
Posts: n/a
 
      06-18-2008
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!
 
Reply With Quote
 
 
 
 
Abhijat Vatsyayan
Guest
Posts: n/a
 
      06-18-2008
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

 
Reply With Quote
 
 
 
 
FrenKy
Guest
Posts: n/a
 
      06-19-2008
Abhijat Vatsyayan wrote:
> 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.

In a meanwhile, I found small web server
(http://java.sun.com/developer/techni...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.
 
Reply With Quote
 
Abhijat Vatsyayan
Guest
Posts: n/a
 
      06-19-2008
FrenKy wrote:
> Abhijat Vatsyayan wrote:
>> 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.

>
> In a meanwhile, I found small web server
> (http://java.sun.com/developer/techni...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. ?
>
> Thanks for the answer though.

 
Reply With Quote
 
FrenKy
Guest
Posts: n/a
 
      06-19-2008
Abhijat Vatsyayan wrote:
> FrenKy wrote:
>> Abhijat Vatsyayan wrote:
>>> 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.

>>
>> In a meanwhile, I found small web server
>> (http://java.sun.com/developer/techni...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. ?

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?

>>
>> Thanks for the answer though.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
re: remote assistance and remote desktop eddy Computer Support 1 09-20-2005 03:44 AM
FS: JP1 cable to program your universial remote control, now youcan control anything you want! Mike DVD Video 0 07-15-2005 01:46 AM
Ghost Console version 8 Remote Client install will not install to remote pc Ed Computer Support 3 03-18-2005 05:18 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
Difference between Remote Desktop and Remote Desktop for Admin Dave Marden MCSE 16 01-24-2004 12:47 PM



Advertisments