Remote Desktop Solution
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
Remote Desktop Solution
I'm looking to write a remote desktop solution, the reason i'm not using Apple's own tools is because I need to make one that has no configuration for my clients - so I dont need to get them to install software and setup their router and sharing preferences in order to establish a connection. By writing my own tool I can build in the communication link and have the client establish the connection by running the program - thus negating router and sharing config.
Explanation out of the way, what i'm looking to do is write a program under Mac OSX which does the following technical things.
Grabs an image of the current MacOSX desktop display buffer.
Forwards on mouse position and clicks to the desktop/applications.
Forwards on keyboard input to the desktop/applications.
I know how to do these things on Windows machines via .dll calls - is there a way to do this on the Mac using PureBasic or am I looking at the wrong tool?
Thank you.
Explanation out of the way, what i'm looking to do is write a program under Mac OSX which does the following technical things.
Grabs an image of the current MacOSX desktop display buffer.
Forwards on mouse position and clicks to the desktop/applications.
Forwards on keyboard input to the desktop/applications.
I know how to do these things on Windows machines via .dll calls - is there a way to do this on the Mac using PureBasic or am I looking at the wrong tool?
Thank you.
Re "router and sharing config": what protocols and ports would your solution use? Reason I ask is usually port 80 and maybe 111 would be open (for browsing/mail) and you would have to restrict yourself to those... meaning you would need to design a protocol that possibly only has one port available. Have you considered TightVNC (or similar free tools) that users run themselves and can configure as servers? Although these may still have problems getting around routers and firewalls. Maybe some are open source code would help you discover techniques.
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
Port/firewall/sharing configuration is necessary to accept inbound communications only, that's why I want to write an application myself rather then use Apple Remote Desktop, but I need to know if Pure Basic can do these things.
I will check out the latest VNC (last I used it was still PC only) but as far as I recall you setup a client and wait for the connection, I intend to make the client establish the connection to my control server, so all the end user has to do is load the application.
I will check out the latest VNC (last I used it was still PC only) but as far as I recall you setup a client and wait for the connection, I intend to make the client establish the connection to my control server, so all the end user has to do is load the application.
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
"Port/firewall/sharing configuration is necessary to accept inbound communications only": do you mean specifically at your clients? I've seen many installations restricting internal ports, eg, to stop users connecting to internet game servers, etc. Even my ADSL router has that facility.
PS: Look further than the main VNC because others may do a better job.
PS: Look further than the main VNC because others may do a better job.
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
The problem is with VNC configurations the client would launch the server application and it will sit there on their machine waiting for an inbound communication, lets say for the sake of argument on port 500 (I havn't checked yet what port is used).
If I then try to connect to their machine it will connect to their router on port 500, the router then doesnt know where to send that data. I could get the customer to setup the router to forward port 500 to their machine, but if they where competent enough to do router configuration I wouldnt need to take over their machine anyway...
On the other hand if I write a program which establishes connection from their end to my machine (which will have the router all set up already) then that will not require any router configuration at their end.
This is what i'm trying to do, so I need to write an application that either handles VNC, for which I need to know if PureBasic can make screen grabs, and whether it can be used to forward on keyboard & mouse inputs to the desktop.
On Windows this is a case of a simple hook via user32.dll's, but on the Mac I have no idea how to do these things, can PB handle it?
Solution two is to write a port forwarder, an application the client launches which establishes TCP/IP communication (over any port I choose) to my machine, once that link is established I can redirect it to 127.0.0.1 on whichever port VNC uses. This might be the simpler solution, but it also requires the client to install the VNC client software :/
If I then try to connect to their machine it will connect to their router on port 500, the router then doesnt know where to send that data. I could get the customer to setup the router to forward port 500 to their machine, but if they where competent enough to do router configuration I wouldnt need to take over their machine anyway...
On the other hand if I write a program which establishes connection from their end to my machine (which will have the router all set up already) then that will not require any router configuration at their end.
This is what i'm trying to do, so I need to write an application that either handles VNC, for which I need to know if PureBasic can make screen grabs, and whether it can be used to forward on keyboard & mouse inputs to the desktop.
On Windows this is a case of a simple hook via user32.dll's, but on the Mac I have no idea how to do these things, can PB handle it?
Solution two is to write a port forwarder, an application the client launches which establishes TCP/IP communication (over any port I choose) to my machine, once that link is established I can redirect it to 127.0.0.1 on whichever port VNC uses. This might be the simpler solution, but it also requires the client to install the VNC client software :/
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
I use the both VNC and Hamachi on Windows to support my clients. Visit www.hamachi.cc . The Linux client was written in PureBasic by our very own Beach! I think he is working on a Mac version as we speak.
Anyway, I wrote a remote connect tool for my clients so that they can initiate the connection which gets around the firewall issue. Its just a front end for VNC commands. For windows the command is:
I just run a vnc listener on my end.
For some clients I run hamachi which gives me a free secure VPN over the internet, so I can tunnel directly to their VNC server without mucking with their firewall.
I haven't been on an airplane in two years thanks to these 2 little tools.
Good luck.
Anyway, I wrote a remote connect tool for my clients so that they can initiate the connection which gets around the firewall issue. Its just a front end for VNC commands. For windows the command is:
Code: Select all
winvnc -connect <my listening ip address>
For some clients I run hamachi which gives me a free secure VPN over the internet, so I can tunnel directly to their VNC server without mucking with their firewall.
I haven't been on an airplane in two years thanks to these 2 little tools.
Good luck.
I posted the Mac version this morning! I'm not sure if I have any comments on it yet - our company's proxy blocks the Hamachi site for some reason.Straker wrote:The Linux client was written in PureBasic by our very own Beach! I think he is working on a Mac version as we speak.
As for remote support, I have used VNC and TightVNC for years. Currently, I have deployed UltraVNC wich uses Windows AD accounts to authorize connections. They also have a cool project called SingleClick which is a small UltraVNC server that connects remote users to your UltraVNC listening service. The benefit is that the user can initiate the connection anytime support is needed and their firewall will not be an issue (you still need to allow connections on that port for your firewall though). More information here: http://www.uvnc.com/addons/singleclick.html
-Beach
Sorry, missed that... that would be better to do as the Single Click thing is only for Windows. I wonder if you can initiate a connection like that on the Mac VNC app? I will give it a try this afternoon.Straker wrote:Anyway, I wrote a remote connect tool for my clients so that they can initiate the connection which gets around the firewall issue. Its just a front end for VNC commands. For windows the command is:
-Beach
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
Brilliant! A big fat wet hug is coming your way!
I'll check it out tommorow at work. I do have a Mac at home too, but i've come back to find an email from a private client who needs new functionality in something I wrote ages ago... Time to hope I commented my code as I delve into the past I suppose... !
I'll check it out tommorow at work. I do have a Mac at home too, but i've come back to find an email from a private client who needs new functionality in something I wrote ages ago... Time to hope I commented my code as I delve into the past I suppose... !
@Beach
You are right, but I am using an old version of RealVNC (3.3.6) because I have more control than the current version. I use UltraVNC on XP SP2 machines where I get the dreaded black screen from RealVNC (its related to MS Remote Desktop option).
Anyway, if you'll buy me a Mac, I'll be glad to test drive your hamachi client.
Still haven't gotten your latest Linux version yet, been real busy, but you'll hear from me when I test it. I am counting on it to support a client that I am in the process of converting from XP to Ubuntu.
[EDIT]
Re: Mac Hamachi Client - as of 12:40pm Pacific - no comments yet but 17 downloads
You are right, but I am using an old version of RealVNC (3.3.6) because I have more control than the current version. I use UltraVNC on XP SP2 machines where I get the dreaded black screen from RealVNC (its related to MS Remote Desktop option).
Anyway, if you'll buy me a Mac, I'll be glad to test drive your hamachi client.
Still haven't gotten your latest Linux version yet, been real busy, but you'll hear from me when I test it. I am counting on it to support a client that I am in the process of converting from XP to Ubuntu.
[EDIT]
Re: Mac Hamachi Client - as of 12:40pm Pacific - no comments yet but 17 downloads
-
- User
- Posts: 19
- Joined: Tue Jan 24, 2006 12:40 pm
You're right. Looks like UltraVNC is Windows only. Here is a Mac Version of VNC:
http://sourceforge.net/projects/osxvnc/
I think its based on RealVNC.
The command to reverse connect thru a firewall should be the same as I stated above.
http://sourceforge.net/projects/osxvnc/
I think its based on RealVNC.
The command to reverse connect thru a firewall should be the same as I stated above.