osascript command not timing out?

View: New views
10 Messages — Rating Filter:   Alert me  

osascript command not timing out?

by huntc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I've experienced a weird situation whereby I have an application that  
generally runs quite well, but ended up in an U state (ps command,  
uninterruptible wait). Now the process probably hung for some reason  
(cannot now reproduce) and a "shutdown -r now" failed... re-enforcing  
the idea that my process hung in a U state I suppose.

Thing is, prior to the restart, I had a number of osascript commands  
from the shell and they remained in an S state (sleep for less than 20  
seconds). I'd reckon that these processes had actually been around for  
a while so I'm a little mystified by that state. I would have thought  
they'd be in an 'I' (Idle) state.

No matter, what really bugs me is that I would have thought my  
AppleScript tell statements should have timed out after a minute and  
disappeared. The osascript commands are invoked from cron in case  
that's useful.

Any ideas on why these osascript invoked AppleScript tell commands to  
my U state application shouldn't have timed out?

Could it have been that no live target process was found for the tell  
statement, it tried to start one, and then somehow got into trouble?

BTW: Mac OS X 10.4.

Cheers,
-C
_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: osascript command not timing out?

by Dan Shoop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Mar 10, 2008, at 6:22 AM, Christopher Hunt wrote:

> Hi there,
>
> I've experienced a weird situation whereby I have an application  
> that generally runs quite well, but ended up in an U state (ps  
> command, uninterruptible wait). Now the process probably hung for  
> some reason (cannot now reproduce) and a "shutdown -r now" failed...  
> re-enforcing the idea that my process hung in a U state I suppose.
>
> Thing is, prior to the restart, I had a number of osascript commands  
> from the shell and they remained in an S state (sleep for less than  
> 20 seconds). I'd reckon that these processes had actually been  
> around for a while so I'm a little mystified by that state. I would  
> have thought they'd be in an 'I' (Idle) state.
>
> No matter, what really bugs me is that I would have thought my  
> AppleScript tell statements should have timed out after a minute and  
> disappeared. The osascript commands are invoked from cron in case  
> that's useful.
>
> Any ideas on why these osascript invoked AppleScript tell commands  
> to my U state application shouldn't have timed out?

Perhaps the AppleScript *did* timeout. Perhaps then it's parent then  
lost connection to this it's child and hence the state it got in?

-dhan

------------------------------------------------------------------------
Dan Shoop
Computer Scientist
iWiring / U.S. Technical Services

shoop@...
AOL IM .................... iWiring
Nextel .................... 1-714-363-1174
Operations TOC (24/7) ..... 1-866-901-USTS
USTS Offices .............. 1-714-374-6300

For immediate response for urgent matters please speak to the Duty  
Officer
at the USTS Tactical Operations Center (above) who can reach me by  
radio.


_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Remote desktop to a mac on a private LAN

by Christopher Hunt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I have a Mac connected wirelessly on a private LAN and would like to  
be able to get to it; principally for accessing it via SSH. The remote  
Mac is able to establish a connection to the internet.

I'm thinking that the only way for me to connect to the remote Mac is  
to have it connect to a VPN automatically. I believe that this can be  
achieved by having Safari access a specific IP address that I declare.

Are there other methods that I might want to consider when accessing  
remote Macs on private LANs?

Kind regards,
Christopher
_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: Remote desktop to a mac on a private LAN

by Neil Laubenthal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah . . . lots of ways to do this, depending on what you want to do.

1. If you've got a dynamic IP from your ISP . . .you can get a domain  
name through GoDaddy or anybody cheap and then use the DynamicDNS  
client built into most current routers to redirect traffic  
christopherhunt.com to whatever your current IP is. With a static IP  
from your ISP you can just see what it is and use that. Set up your  
router to forward port 22 to your internal machine and you can ssh  
away. Things to watch out for here are your TOS with your ISP . .  
.does it allow you to do incoming ssh and/or is the port blocked. This  
will give you ssh access . . . if you want you can then use port  
forwarding on your remote Mac to connect over an SSL tunnel with VNC  
for direct desktop access.

2. Sign up for a free account at logmein.com and install the client on  
your Mac at home . . .then go to www.logmein.com from any web browser  
and you get the desktop on your home Mac. Logmein is a third party VPN  
. . .works very nicely. There are pay options at logmein with  
additional features as well as some through Citix (gotomypc.com) as  
well as other similar options. Basic logmein is free though and works  
fine.

3. Timbuktu Pro also works but costs money.

4. You can set up a direct VPN to your Mac . . .needs to be OK with  
your ISP TOS and you'll need to forward the right ports at your router.



--
neil


Quoting Christopher Hunt <huntc@...>:

> Hi there,
>
> I have a Mac connected wirelessly on a private LAN and would like to be
> able to get to it; principally for accessing it via SSH. The remote Mac
> is able to establish a connection to the internet.



_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Parent Message unknown Re: Remote desktop to a mac on a private LAN

by Kurt Werle-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Aug 21, 2009, at 11:59 AM, macosx-admin-request@... wrote:

> I have a Mac connected wirelessly on a private LAN and would like to  
> be able to get to it; principally for accessing it via SSH. The  
> remote Mac is able to establish a connection to the internet.


ssh gateway.machine.com -L 122:remote_mac.local:22 -L  
5901:remote_mac.local:5900 -L ...


Then
ssh remote_username@localhost -p 122

That will get you an ssh connection to remote_mac.local

Finder
cmd-K
vnc://localhost:5901

That will get you remote viewing of your mac if you have that enabled  
(it uses port 5900 by default).  NOTE: all traffic on the LAN network  
will be unencrypted for the VNC traffic.

ssh is an awesome tool.  man  it.  google it.  Learn it.  Love it.  
There are various ssh tunnel applications, but I generally stick to  
the command line.

Huh.  You're not a Chris Hunt that I know, are ya?

Kurt
---
I am changing my email address to  kurt@...
http://www.CircleW.org/~kurt/

_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: Remote desktop to a mac on a private LAN

by Christopher Hunt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kurt,

Thank you for your detailed reply. I do indeed know all about SSH and  
often use it in the way you prescribe - when the remote host IP's  
address is known to me.

I probably didn't explain my scenario very well. The remote host sits  
behind a router and is on a private LAN i.e. it does not have its own  
public ip address, but it can establish a connection with the  
internet. I am also not in a position to port forward traffic at the  
router to it.

'hope that this is a better explanation.

Kind regards,
Christopher

P.S. I don't *think* we know each other. Here's my blog: http://christopherhunt-software.blogspot.com/

_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Parent Message unknown Re: Remote desktop to a mac on a private LAN

by Christopher Hunt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 22/08/2009, at 4:59 AM, macosx-admin-request@... wrote:

> 1. If you've got a dynamic IP from your ISP . . .you can get a domain
> name through GoDaddy or anybody cheap and then use the DynamicDNS
> client built into most current routers to redirect traffic
> christopherhunt.com to whatever your current IP is. With a static IP
> from your ISP you can just see what it is and use that. Set up your
> router to forward port 22 to your internal machine and you can ssh
> away...
Thanks for this - I cannot port forward though. Sorry for not  
previously mentioning that.

>
> 2. Sign up for a free account at logmein.com and install the client on
> your Mac at home . . .then go to www.logmein.com from any web browser
> and you get the desktop on your home Mac. Logmein is a third party VPN
> . . .works very nicely. There are pay options at logmein with
> additional features as well as some through Citix (gotomypc.com) as
> well as other similar options. Basic logmein is free though and works
> fine.
Thanks - I will investigate this.

>
> 3. Timbuktu Pro also works but costs money.
OK - I presume that Timbuktu Pro can establish a connection from the  
remote host. I shall investigate.

Thanks for your replies.

Kind regards,
Christopher
_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: Remote desktop to a mac on a private LAN

by Mike Friedman-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Aug 21, 2009, at 3:09 PM, Christopher Hunt wrote:

> On 22/08/2009, at 4:59 AM, macosx-admin-request@... wrote:
>
>> 1. If you've got a dynamic IP from your ISP . . .you can get a domain
>> name through GoDaddy or anybody cheap and then use the DynamicDNS
>> client built into most current routers to redirect traffic
>> christopherhunt.com to whatever your current IP is. With a static IP
>> from your ISP you can just see what it is and use that. Set up your
>> router to forward port 22 to your internal machine and you can ssh
>> away...
> Thanks for this - I cannot port forward though. Sorry for not  
> previously mentioning that.
>
>>
>> 2. Sign up for a free account at logmein.com and install the client  
>> on
>> your Mac at home . . .then go to www.logmein.com from any web browser
>> and you get the desktop on your home Mac. Logmein is a third party  
>> VPN
>> . . .works very nicely. There are pay options at logmein with
>> additional features as well as some through Citix (gotomypc.com) as
>> well as other similar options. Basic logmein is free though and works
>> fine.
> Thanks - I will investigate this.
>
>>
>> 3. Timbuktu Pro also works but costs money.
> OK - I presume that Timbuktu Pro can establish a connection from the  
> remote host. I shall investigate.
>
> Thanks for your replies.
>



If you can't port forward then use LogMeIn. It's completely  
free...it's not entirely what you were looking for (you'll get a full  
remote control session over the machine)...It's not quite a VPN (that  
feature is Windows only) but it's very very useful and I use it to  
support three offices full of Mac clients (as well as hundreds of  
Windows machines).




=======================
Mike Friedman
MGF Consulting
Computers without Attitude
http://www.mgfconsulting.net
415-823-9990
Instant Message AIM/Yahoo: sfmike64




_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: Remote desktop to a mac on a private LAN

by Kurt Werle-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Aug 21, 2009, at 3:03 PM, Christopher Hunt wrote:

> Hi Kurt,
>
> Thank you for your detailed reply. I do indeed know all about SSH  
> and often use it in the way you prescribe - when the remote host  
> IP's address is known to me.
>
> I probably didn't explain my scenario very well. The remote host  
> sits behind a router and is on a private LAN i.e. it does not have  
> its own public ip address, but it can establish a connection with  
> the internet. I am also not in a position to port forward traffic at  
> the router to it.
>
> 'hope that this is a better explanation.

So you can't ssh to the router, and you can't configure the router to  
forward any ports.  And you probably also don't have a system outside  
the LAN that you can connect to, either?  If you have an internet  
addressable host at your desposal, then you can
ssh -g -R 122:127.0.0.1:22 internet.addressable.host
then you can ssh to that host on port 122 and get forwarded to your  
machine.  Probably that would require a daemon and passwordless ssh key.

Otherwise you're more or less out of luck.  There are services you can  
get that will do the same kind of thing: "Back to My Mac" being a  
prime example.

Kurt
---
I am changing my email address to  kurt@...
http://www.CircleW.org/~kurt/

_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Re: Remote desktop to a mac on a private LAN

by Christopher Hunt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for this. I like the reverse ssh idea. Here's a launchd plist I  
found that should help:

http://www.automatthew.com/2007/09/launchd-plist-to-run-reverse-ssh-tunnel.html

Kind regards,
Christopher

> So you can't ssh to the router, and you can't configure the router  
> to forward any ports.  And you probably also don't have a system  
> outside the LAN that you can connect to, either?  If you have an  
> internet addressable host at your desposal, then you can
> ssh -g -R 122:127.0.0.1:22 internet.addressable.host
> then you can ssh to that host on port 122 and get forwarded to your  
> machine.  Probably that would require a daemon and passwordless ssh  
> key.

_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@...
http://www.omnigroup.com/mailman/listinfo/macosx-admin