Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Remote Apple Events in X.1

Remote Apple Events in X.1
Thread Tools
Professional Poster
Join Date: Jul 2001
Location: Dis
Status: Offline
Reply With Quote
Jul 29, 2001, 04:20 AM
 
When Jobs (or pirates, my memory's fuzzy like that) announced that X.1 would support Apple Events over IP, my first response was simply "Oh." I recently installed XFree86, and one of the features it is touted to have is that you can use gui apps remotely (i.e. you could launch a web browser and surf the web remotely). I got to thinking recently, coult the same thing be done with Apple Events over IP? I know that it would probably take special effort on the developer's part, but that would still be a really cool feature. As long as the app sticks with Cocoa/Carbon widgets, it shouldn't be too difficult though, woult it? It might take some additions to Applescript, but I think the advantages would be worth it.

Anyone care to comment on feasability, usability, and probability?

BlackGriffen
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. -Galileo Galilei, physicist and astronomer (1564-1642)
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jul 29, 2001, 10:18 AM
 
AppleEvents aren't really anything related to remote control/display of programs... You'd be better off using something like OSXvnc, if I understand what you're trying to do.
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Jul 29, 2001, 03:51 PM
 
I will throw in my 2 cents here but I haven't actually tried doing this yet (I only have one OS X machine). If you wrote a "client" program and set it up to communicate all the actual events/UI manipulations across IP using the distributed objects framework, you could get this effect, in theory. Also, in theory, this would allow far greater efficiency than X11 but with less immediate scalability. I might be getting this all wrong but there is a way to specify a hostname for object communications somewhere in the Foundation API (I think that it was NSMachPort or something related to it). Currently, it appears as though Quartz only knows how to export windows to itself (I tried to see what would happen if I invoked a program on my machine by SSH-ing from a Linux box but it only launched it on my OS X machine, not giving me the error I had hoped for in trying to export to Linux). X11 is great for this, though. It is how things worked in the Unix world for ages (in fact I play FreeCiv with my Linux buddies by exporting graphics from one of there machines to mine in XFree). Hopefully we will see Apple allow something like this but I only think they will if they try to attack the enterprise market.

Hope that helps,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Mac Enthusiast
Join Date: Aug 1999
Location: Calgary, Alberta, Canada
Status: Offline
Reply With Quote
Jul 29, 2001, 05:44 PM
 
Originally posted by Angus_D:
<STRONG>AppleEvents aren't really anything related to remote control/display of programs...</STRONG>
Remote control of Apps: Yes
Remote display of Apps: No

Originally posted by BlackGriffen:
<STRONG>When Jobs (or pirates, my memory's fuzzy like that) announced that X.1 would support Apple Events over IP, my first response was simply "Oh." I recently installed XFree86, and one of the features it is touted to have is that you can use gui apps remotely (i.e. you could launch a web browser and surf the web remotely). I got to thinking recently, coult the same thing be done with Apple Events over IP?</STRONG>
Apple Events over IP is exactly the same as what we used to call "Program Linking" in System 7 and up, except we're using TCP/IP instead of AppleTalk. Basically, it allows you to target applications on systems other than the the local one for sending Apple Events to.

So, for your "Launch a browser and surf the web remotely", you could do something like:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
set theRemoteOmniWeb to application <font color = red>"OmniWeb"</font> of machine <font color = red>"eppc:<font color = brown>//<font color = blue>127.0</font>.<font color = blue>0.1</font>/"</font></font>
set theWebAddress to <font color = red>"http:<font color = brown>//www.apple.com"</font></font>
Using terms from application <font color = red>"OmniWeb"</font>
tell theRemoteOmniWeb
activate
OpenURL theWebAddress
end tell
end using terms
</font>[/code]

Since OmniWeb supports AppleScript, this would (in theory) work under Mac OS X 10.1. I only have 10.0.4, so I can't test it out. What the above AppleScript does is launch OmniWeb on the remote machine, then tells it to open Apple's web page. I don't know what XFree86 does, so I'm not sure if this is what you're talking about. If you mean remote control a la VNC or Timbuktu, then that's not what AppleScript does.

[ 07-29-2001: Message edited by: King Chung Huang ]
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Jul 29, 2001, 07:09 PM
 
X11 does a similar thing to VNC and Timbuktu but it only exports window graphics, not whole desktops. It is how most Unix networks run and it is VERY cost-effective. Essentially, you would have a central computer (often a super computer) and dozens of client "terminals." The terminals have a mouse, keyboard, monitor, and enough CPU and memory to handle a window manager, your events, and nothing more. You then open terminal windows from the central computer on the terminals and run applications with them on the central computer. The I/O is done through the terminal and is sent over the network to be processed by the central computer. It is a very nice layout and it would be nice if OS X could do it. However, I doubt that it is one of Apple's priorities.

Jeff.
Spectral Class
"Shedding Light on Innovation"
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 09:46 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2