Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #29516 > unrolled thread

caffeinate and Mountain Lion

Started bydcohenspam@talktalk.net (Daniel Cohen)
First post2012-08-15 20:49 +0100
Last post2012-08-16 03:41 +0000
Articles 20 on this page of 23 — 10 participants

Back to article view | Back to comp.sys.mac.system


Contents

  caffeinate and Mountain Lion dcohenspam@talktalk.net (Daniel Cohen) - 2012-08-15 20:49 +0100
    Re: caffeinate and Mountain Lion Lewis <g.kreme@gmail.com.dontsendmecopies> - 2012-08-15 20:53 +0000
      Re: caffeinate and Mountain Lion dcohenspam@talktalk.net (Daniel Cohen) - 2012-08-15 22:57 +0100
        Re: caffeinate and Mountain Lion Barry Margolin <barmar@alum.mit.edu> - 2012-08-15 19:38 -0400
        Re: caffeinate and Mountain Lion Bob Harris <nospam.News.Bob@remove.Smith-Harris.us> - 2012-08-15 20:01 -0400
        Re: caffeinate and Mountain Lion dempson@actrix.gen.nz (David Empson) - 2012-08-16 13:35 +1200
          Re: caffeinate and Mountain Lion JF Mezei <jfmezei.spamnot@vaxination.ca> - 2012-08-15 22:05 -0400
          Re: caffeinate and Mountain Lion Wes Groleau <Groleau+news@FreeShell.org> - 2012-08-15 23:37 -0400
            Re: caffeinate and Mountain Lion dempson@actrix.gen.nz (David Empson) - 2012-08-16 16:02 +1200
              Re: caffeinate and Mountain Lion dcohenspam@talktalk.net (Daniel Cohen) - 2012-08-16 10:26 +0100
                Re: caffeinate and Mountain Lion Fred Moore <fmoore@gcfn.org> - 2012-08-16 15:45 -0400
                  Re: caffeinate and Mountain Lion Barry Margolin <barmar@alum.mit.edu> - 2012-08-16 19:09 -0400
                  Re: caffeinate and Mountain Lion Wes Groleau <Groleau+news@FreeShell.org> - 2012-08-16 20:32 -0400
                    Re: caffeinate and Mountain Lion dcohenspam@talktalk.net (Daniel Cohen) - 2012-08-17 07:29 +0100
                      Re: caffeinate and Mountain Lion Barry Margolin <barmar@alum.mit.edu> - 2012-08-17 13:23 -0400
                        Re: caffeinate and Mountain Lion dcohenspam@talktalk.net (Daniel Cohen) - 2012-08-17 22:52 +0100
                          Re: caffeinate and Mountain Lion Tim Streater <timstreater@greenbee.net> - 2012-08-17 23:26 +0100
                            Re: caffeinate and Mountain Lion Lewis <g.kreme@gmail.com.dontsendmecopies> - 2012-08-17 22:36 +0000
                              Re: caffeinate and Mountain Lion Tim Streater <timstreater@greenbee.net> - 2012-08-17 23:48 +0100
                                Re: caffeinate and Mountain Lion Lewis <g.kreme@gmail.com.dontsendmecopies> - 2012-08-18 06:24 +0000
                      Re: caffeinate and Mountain Lion Wes Groleau <Groleau+news@FreeShell.org> - 2012-08-17 20:42 -0400
                  Re: caffeinate and Mountain Lion Paul Sture <nospam@sture.ch> - 2012-08-17 11:12 +0200
        Re: caffeinate and Mountain Lion Lewis <g.kreme@gmail.com.dontsendmecopies> - 2012-08-16 03:41 +0000

Page 1 of 2  [1] 2  Next page →


#29516 — caffeinate and Mountain Lion

Fromdcohenspam@talktalk.net (Daniel Cohen)
Date2012-08-15 20:49 +0100
Subjectcaffeinate and Mountain Lion
Message-ID<1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net>
Mountain Lion behaves differently with regard to sleep than Lion and
earlier (I think disk activity does not affect the sleep timer in Energy
Saver, only keyboard and mouse activity). This causes problems for
several programs. Jiggler or Caffeine used to work to keep the machine
awake, but no longer do so.

Apple have introduced a new command, caffeinate., to prevent sleep. That
works fine to set a period of time to remain awake. But the manual says
that it can be used to keep awake while a program is running. I (and
others, it has been reported in the Apple forums) find that I get
"permission denied" when I try to do this.

I may well be doing something wrong, but the manual does not indicate
any syntax that I have got wrong.

Does anyone know what is happening and what I should be doing?

I would expect the command to work even as a standard user, but have
found that it does not even work as an admin user, or as an admin user
with sudo.

-- 
<http://www.decohen.com>
The Labyrinth of the Heart: Changed Myths for Changing Lives 
book and e-book <http://www.decohen.com/labyrinth>
Send e-mail to the Reply-To address, not the From address.

[toc] | [next] | [standalone]


#29520

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2012-08-15 20:53 +0000
Message-ID<slrnk2o31t.2dht.g.kreme@mbp55.local>
In reply to#29516
In message <1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net> 
  Daniel Cohen <dcohenspam@talktalk.net> wrote:
> I may well be doing something wrong, but the manual does not indicate
> any syntax that I have got wrong.

> Does anyone know what is happening and what I should be doing?

Since no one know what you are doing, it is impossible to answer that.

-- 
We only remembers that the elves sang. We forgets what it was they were
singing about. --Lords and Ladies

[toc] | [prev] | [next] | [standalone]


#29523

Fromdcohenspam@talktalk.net (Daniel Cohen)
Date2012-08-15 22:57 +0100
Message-ID<1kow4w8.1pl3qu3pq89fkN%dcohenspam@talktalk.net>
In reply to#29520
Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:

> In message <1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net> 
>   Daniel Cohen <dcohenspam@talktalk.net> wrote:
> > I may well be doing something wrong, but the manual does not indicate
> > any syntax that I have got wrong.
> 
> > Does anyone know what is happening and what I should be doing?
> 
> Since no one know what you are doing, it is impossible to answer that.

Sorry if I wasn't clear enough.

The manual for caffeinate seems to say that the command

caffeinate -di /path/to/Application.app

should work (to stop sleep while the application is running).

Simple and straightforward command, on the surface.

But all my attempts (different applications, different users) lead to
the same reponse, which is

permision denied.
-- 
<http://www.decohen.com>
The Labyrinth of the Heart: Changed Myths for Changing Lives 
book and e-book <http://www.decohen.com/labyrinth>
Send e-mail to the Reply-To address, not the From address.

[toc] | [prev] | [next] | [standalone]


#29524

FromBarry Margolin <barmar@alum.mit.edu>
Date2012-08-15 19:38 -0400
Message-ID<barmar-32EB9A.19380115082012@news.eternal-september.org>
In reply to#29523
In article <1kow4w8.1pl3qu3pq89fkN%dcohenspam@talktalk.net>,
 dcohenspam@talktalk.net (Daniel Cohen) wrote:

> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> 
> > In message <1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net> 
> >   Daniel Cohen <dcohenspam@talktalk.net> wrote:
> > > I may well be doing something wrong, but the manual does not indicate
> > > any syntax that I have got wrong.
> > 
> > > Does anyone know what is happening and what I should be doing?
> > 
> > Since no one know what you are doing, it is impossible to answer that.
> 
> Sorry if I wasn't clear enough.
> 
> The manual for caffeinate seems to say that the command
> 
> caffeinate -di /path/to/Application.app
> 
> should work (to stop sleep while the application is running).
> 
> Simple and straightforward command, on the surface.
> 
> But all my attempts (different applications, different users) lead to
> the same reponse, which is
> 
> permision denied.

Maybe you need to run it with sudo.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#29526

FromBob Harris <nospam.News.Bob@remove.Smith-Harris.us>
Date2012-08-15 20:01 -0400
Message-ID<nospam.News.Bob-7FF03D.20010115082012@news.eternal-september.org>
In reply to#29523
In article <1kow4w8.1pl3qu3pq89fkN%dcohenspam@talktalk.net>,
 dcohenspam@talktalk.net (Daniel Cohen) wrote:

> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> 
> > In message <1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net> 
> >   Daniel Cohen <dcohenspam@talktalk.net> wrote:
> > > I may well be doing something wrong, but the manual does not indicate
> > > any syntax that I have got wrong.
> > 
> > > Does anyone know what is happening and what I should be doing?
> > 
> > Since no one know what you are doing, it is impossible to answer that.
> 
> Sorry if I wasn't clear enough.
> 
> The manual for caffeinate seems to say that the command
> 
> caffeinate -di /path/to/Application.app
> 
> should work (to stop sleep while the application is running).
> 
> Simple and straightforward command, on the surface.
> 
> But all my attempts (different applications, different users) lead to
> the same reponse, which is
> 
> permision denied.

caffeinate -di \
 /Applications/QuickTime?Player.app/Contents/MacOS/QuickTime?Player

You are in the shell, so you want Unix executable programs, NOT 
directories, which is all that a .app file is, a directory with 
all the resources for the Mac OS X GUI app.

You might try:

caffeinate -di open -a /path/to/Applications.app

where 'open' is a Unix executable, that knows how to launch Mac OS 
X GUI Apps.

[toc] | [prev] | [next] | [standalone]


#29533

Fromdempson@actrix.gen.nz (David Empson)
Date2012-08-16 13:35 +1200
Message-ID<1kox4dx.1xbzczygkpp8oN%dempson@actrix.gen.nz>
In reply to#29523
Daniel Cohen <dcohenspam@talktalk.net> wrote:

> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> 
> > In message <1kovy4h.u0ig7fl2q0rqN%dcohenspam@talktalk.net> 
> >   Daniel Cohen <dcohenspam@talktalk.net> wrote:
> > > I may well be doing something wrong, but the manual does not indicate
> > > any syntax that I have got wrong.
> > 
> > > Does anyone know what is happening and what I should be doing?
> > 
> > Since no one know what you are doing, it is impossible to answer that.
> 
> Sorry if I wasn't clear enough.
> 
> The manual for caffeinate seems to say that the command
> 
> caffeinate -di /path/to/Application.app
> 
> should work (to stop sleep while the application is running).

That isn't how it works. (I agree that the man page is vague.)

caffeinate with the optional utility and arguments parameter is used to
launch a utility (such as another command line tool) and prevent various
forms of sleep while the utility continues to run. This might be useful
to run something time consuming like rsync, for example.

It doesn't detect an already running instance of the utility, and can't
directly launch an application using the above syntax. You are getting
"permission denied" because a folder is not an executable utility.

Even if your utility was the "open" command and you used it to launch an
application, caffeinate would only keep the system awake while the
application was being launched. "open" causes the application to be
launched as an independent process by launchd, after which it runs
independently of Terminal, the shell and caffeinate.

You _might_ be able to get some applications to run through caffeinate
by directly invoking the executable file within the application, but
this would result in the application being a child process of
caffeinate, the shell and Terminal, so if you stopped any of those, it
would cause the application to immediately terminate (effectively a
force quit).

The general syntax for that would be:

caffeinate -di /path/to/AppName.app/Contents/MacOS/AppName

-- 
David Empson
dempson@actrix.gen.nz

[toc] | [prev] | [next] | [standalone]


#29534

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2012-08-15 22:05 -0400
Message-ID<502c5584$0$1312$c3e8da3$b1356c67@news.astraweb.com>
In reply to#29533
Looks to me like caffeinate _should_ be designed to accept a pid as
input. It would then prevent system to sleeep as long as that pid exists.

So you start your GUI app, find its pid, give it to caffeinate.

[toc] | [prev] | [next] | [standalone]


#29544

FromWes Groleau <Groleau+news@FreeShell.org>
Date2012-08-15 23:37 -0400
Message-ID<k0hpt4$fkn$1@dont-email.me>
In reply to#29533
On 08-15-2012 21:35, David Empson wrote:
> Even if your utility was the "open" command and you used it to launch an
> application, caffeinate would only keep the system awake while the
> application was being launched. "open" causes the application to be
> launched as an independent process by launchd, after which it runs
> independently of Terminal, the shell and caffeinate.

Although 'open' does have a command line switch that says "Don't return 
to shell until the app quits"

-- 
Wes Groleau

   “A miracle is a violation of the laws of nature, and as a
    firm and unalterable experience has established these laws,
    the proof against a miracle, from the very nature of the fact,
    is as entire as could possibly be imagined.”
                                 — David Hume, age 37
   “There's no such thing of that, 'cause I never heard of it.”
                                 — Becky Groleau, age 4

[toc] | [prev] | [next] | [standalone]


#29551

Fromdempson@actrix.gen.nz (David Empson)
Date2012-08-16 16:02 +1200
Message-ID<1koxfj4.119vm2d1m1ej03N%dempson@actrix.gen.nz>
In reply to#29544
Wes Groleau <Groleau+news@FreeShell.org> wrote:

> On 08-15-2012 21:35, David Empson wrote:
> > Even if your utility was the "open" command and you used it to launch an
> > application, caffeinate would only keep the system awake while the
> > application was being launched. "open" causes the application to be
> > launched as an independent process by launchd, after which it runs
> > independently of Terminal, the shell and caffeinate.
> 
> Although 'open' does have a command line switch that says "Don't return
> to shell until the app quits"

Ah, that looks more promising. Well spotted, that man. Not an option I'd
looked at before, but I see it existed at least as far back as 10.6.8.

Trying this...

caffeinate -di open -W /path/to/AppName.app

or for applications in a standard location such as /Applications:

caffeinate -di open -Wa AppName

Testing with display set to sleep after 1 minute of inactivity...

Yes, this seems to work. No display dimming or sleep after a couple of
minutes. The caffeinate and open commands keep running until you
manually stop them (Ctrl-C) or quit the referenced application.

It even works if the application was already running when you used the
caffeinate command, since open will normally activate an already running
application rather than launching a new instance. (There is an option to
open another instance, but some applications won't like that.)

-- 
David Empson
dempson@actrix.gen.nz

[toc] | [prev] | [next] | [standalone]


#29569

Fromdcohenspam@talktalk.net (Daniel Cohen)
Date2012-08-16 10:26 +0100
Message-ID<1kowtk2.t2wy0jbydayeN%dcohenspam@talktalk.net>
In reply to#29551
David Empson <dempson@actrix.gen.nz> wrote:

> 
> Ah, that looks more promising. Well spotted, that man. Not an option I'd
> looked at before, but I see it existed at least as far back as 10.6.8.
> 
> Trying this...
> 
> caffeinate -di open -W /path/to/AppName.app
> 
> or for applications in a standard location such as /Applications:
> 
> caffeinate -di open -Wa AppName
> 
> Testing with display set to sleep after 1 minute of inactivity...
> 
> Yes, this seems to work. No display dimming or sleep after a couple of
> minutes. The caffeinate and open commands keep running until you
> manually stop them (Ctrl-C) or quit the referenced application.
> 
> It even works if the application was already running when you used the
> caffeinate command, since open will normally activate an already running
> application rather than launching a new instance. (There is an option to
> open another instance, but some applications won't like that.)

Thanks to you, Wes, and others for explaining things to me very clearly.
If only the manual pages had given proper examples of this.

I would like to do this as a shell script. I can probably work that out
myself without much trouble.
-- 
<http://www.decohen.com>
The Labyrinth of the Heart: Changed Myths for Changing Lives 
book and e-book <http://www.decohen.com/labyrinth>
Send e-mail to the Reply-To address, not the From address.

[toc] | [prev] | [next] | [standalone]


#29589

FromFred Moore <fmoore@gcfn.org>
Date2012-08-16 15:45 -0400
Message-ID<fmoore-5A4CBA.15451316082012@news.eternal-september.org>
In reply to#29569
In article <1kowtk2.t2wy0jbydayeN%dcohenspam@talktalk.net>,
 dcohenspam@talktalk.net (Daniel Cohen) wrote:

> Thanks to you, Wes, and others for explaining things to me very clearly.
> If only the manual pages had given proper examples of this.

As someone who is self-taught in UNIX (HaHa, HoHo, & HeeHee), the man 
pages have always seemed to be perfunctory, pro forma boilerplate, 
deliberately minimalist so that the developers can claim they had 
provided help, but not cost them much effort, and yet allow them to look 
down their noses at the neophytes who are quite rightly confused by the 
lack of real instruction.

-- 
And It's Just That Easy  (unless it's UNIX)

[toc] | [prev] | [next] | [standalone]


#29596

FromBarry Margolin <barmar@alum.mit.edu>
Date2012-08-16 19:09 -0400
Message-ID<barmar-894AF8.19090216082012@news.eternal-september.org>
In reply to#29589
In article <fmoore-5A4CBA.15451316082012@news.eternal-september.org>,
 Fred Moore <fmoore@gcfn.org> wrote:

> In article <1kowtk2.t2wy0jbydayeN%dcohenspam@talktalk.net>,
>  dcohenspam@talktalk.net (Daniel Cohen) wrote:
> 
> > Thanks to you, Wes, and others for explaining things to me very clearly.
> > If only the manual pages had given proper examples of this.
> 
> As someone who is self-taught in UNIX (HaHa, HoHo, & HeeHee), the man 
> pages have always seemed to be perfunctory, pro forma boilerplate, 
> deliberately minimalist so that the developers can claim they had 
> provided help, but not cost them much effort, and yet allow them to look 
> down their noses at the neophytes who are quite rightly confused by the 
> lack of real instruction.

They're generally intended to be references for people who know what 
they're doing, not tutorials for beginners.  You have to know what the 
command is for in general, and then you can use the man page to find out 
the details of options.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#29600

FromWes Groleau <Groleau+news@FreeShell.org>
Date2012-08-16 20:32 -0400
Message-ID<k0k3f5$c4e$1@dont-email.me>
In reply to#29589
On 08-16-2012 15:45, Fred Moore wrote:
> In article <1kowtk2.t2wy0jbydayeN%dcohenspam@talktalk.net>,
>   dcohenspam@talktalk.net (Daniel Cohen) wrote:
>
>> Thanks to you, Wes, and others for explaining things to me very clearly.
>> If only the manual pages had given proper examples of this.
>
> As someone who is self-taught in UNIX (HaHa, HoHo, & HeeHee), the man
> pages have always seemed to be perfunctory, pro forma boilerplate,
> deliberately minimalist so that the developers can claim they had
> provided help, but not cost them much effort, and yet allow them to look
> down their noses at the neophytes who are quite rightly confused by the
> lack of real instruction.

It's better now, but when OS X first came along, Apple included the BSD 
man pages without editing in the changes they had made.

-- 
Wes Groleau

   Words of the Wild Wes
   http://Ideas.Lang-Learn.us/WWW

[toc] | [prev] | [next] | [standalone]


#29614

Fromdcohenspam@talktalk.net (Daniel Cohen)
Date2012-08-17 07:29 +0100
Message-ID<1koybcv.11wonjhgqh2iaN%dcohenspam@talktalk.net>
In reply to#29600
Wes Groleau <Groleau+news@FreeShell.org> wrote:

> It's better now, but when OS X first came along, Apple included the BSD
> man pages without editing in the changes they had made.

Which may explain why I cannot understand the -a flag for 'open' which
does not appear to act in the way the manual describes.

Incidentally, since I am posting again, caffeinate allows the flags -d
(no display sleep), -i (no idle sleep) and -s (no System sleep). What is
the difference between -s and -i (or possibly -di)? I suspect it may
only be relevant for laptops.

For anyone who is interested, I can now write a shell script that
prevents sleep in Mountain Lion independently of specific applications
(by running a dummy application, and pushing it and Terminal into the
background). I will post it in the "help with caffeinate" thread in
Apple support communities Mountain Lion section, once I am awake.
-- 
<http://www.decohen.com>
The Labyrinth of the Heart: Changed Myths for Changing Lives 
book and e-book <http://www.decohen.com/labyrinth>
Send e-mail to the Reply-To address, not the From address.

[toc] | [prev] | [next] | [standalone]


#29627

FromBarry Margolin <barmar@alum.mit.edu>
Date2012-08-17 13:23 -0400
Message-ID<barmar-7BA77D.13232417082012@news.eternal-september.org>
In reply to#29614
In article <1koybcv.11wonjhgqh2iaN%dcohenspam@talktalk.net>,
 dcohenspam@talktalk.net (Daniel Cohen) wrote:

> Wes Groleau <Groleau+news@FreeShell.org> wrote:
> 
> > It's better now, but when OS X first came along, Apple included the BSD
> > man pages without editing in the changes they had made.
> 
> Which may explain why I cannot understand the -a flag for 'open' which
> does not appear to act in the way the manual describes.

I don't see how that could explain it, since 'open' is a Mac command 
that didn't exist in BSD.

How does the -a option act differently from what the man page says?  I 
just tried:

open -a TextEdit filename.docx

and the Word document was opened in TextEdit as desired. It's supposed 
to be like using the 'Open With' contextual menu in the Finder.  The man 
page says "Specifies the application to use for opening the file", which 
seems to be a reasonable description of what that does.

It also works if I give the full path to the application:

open -a /Applications/TextEdit.app filename.docx

However, if you use the second form, you have to remember the .app 
suffix. Maybe that's the problem you ran into.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#29640

Fromdcohenspam@talktalk.net (Daniel Cohen)
Date2012-08-17 22:52 +0100
Message-ID<1koznr4.sxbt921me61qgN%dcohenspam@talktalk.net>
In reply to#29627
Barry Margolin <barmar@alum.mit.edu> wrote:


> 
> How does the -a option act differently from what the man page says?  I
> just tried:
> 
> open -a TextEdit filename.docx
> 
> and the Word document was opened in TextEdit as desired. It's supposed
> to be like using the 'Open With' contextual menu in the Finder.  The man
> page says "Specifies the application to use for opening the file", which
> seems to be a reasonable description of what that does.

Yes, that's fine, the manual explains what

open -a application file

does, but one has to have more experience than I have to realise that
this also covers

open -a application


That was explained to me by David Empson in a thread related to this on
the Apple Support Communities Mountain Lion section

-- 
<http://www.decohen.com>
The Labyrinth of the Heart: Changed Myths for Changing Lives 
book and e-book <http://www.decohen.com/labyrinth>
Send e-mail to the Reply-To address, not the From address.

[toc] | [prev] | [next] | [standalone]


#29641

FromTim Streater <timstreater@greenbee.net>
Date2012-08-17 23:26 +0100
Message-ID<timstreater-330B0F.23260317082012@news.individual.net>
In reply to#29640
In article <1koznr4.sxbt921me61qgN%dcohenspam@talktalk.net>,
 dcohenspam@talktalk.net (Daniel Cohen) wrote:

> Barry Margolin <barmar@alum.mit.edu> wrote:
>
> > How does the -a option act differently from what the man page says?  I
> > just tried:
> > 
> > open -a TextEdit filename.docx
> > 
> > and the Word document was opened in TextEdit as desired. It's supposed
> > to be like using the 'Open With' contextual menu in the Finder.  The man
> > page says "Specifies the application to use for opening the file", which
> > seems to be a reasonable description of what that does.
> 
> Yes, that's fine, the manual explains what
> 
> open -a application file
> 
> does, but one has to have more experience than I have to realise that
> this also covers
> 
> open -a application
> 
> That was explained to me by David Empson in a thread related to this on
> the Apple Support Communities Mountain Lion section

You can also do such as:

  open -a Safari 'http://www.example.com/'

which I have found *very* handy.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#29642

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2012-08-17 22:36 +0000
Message-ID<slrnk2thqu.eqs.g.kreme@mbp55.local>
In reply to#29641
In message <timstreater-330B0F.23260317082012@news.individual.net> 
  Tim Streater <timstreater@greenbee.net> wrote:
> In article <1koznr4.sxbt921me61qgN%dcohenspam@talktalk.net>,
>  dcohenspam@talktalk.net (Daniel Cohen) wrote:

>> Barry Margolin <barmar@alum.mit.edu> wrote:
>>
>> > How does the -a option act differently from what the man page says?  I
>> > just tried:
>> > 
>> > open -a TextEdit filename.docx
>> > 
>> > and the Word document was opened in TextEdit as desired. It's supposed
>> > to be like using the 'Open With' contextual menu in the Finder.  The man
>> > page says "Specifies the application to use for opening the file", which
>> > seems to be a reasonable description of what that does.
>> 
>> Yes, that's fine, the manual explains what
>> 
>> open -a application file
>> 
>> does, but one has to have more experience than I have to realise that
>> this also covers
>> 
>> open -a application
>> 
>> That was explained to me by David Empson in a thread related to this on
>> the Apple Support Communities Mountain Lion section

> You can also do such as:

>   open -a Safari 'http://www.example.com/'

> which I have found *very* handy.

I usually just say 

open http://www.example.com


-- 
Transvestite: A guy who likes to eat, drink and be Mary.

[toc] | [prev] | [next] | [standalone]


#29643

FromTim Streater <timstreater@greenbee.net>
Date2012-08-17 23:48 +0100
Message-ID<timstreater-F54046.23480417082012@news.individual.net>
In reply to#29642
In article <slrnk2thqu.eqs.g.kreme@mbp55.local>,
 Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:

> In message <timstreater-330B0F.23260317082012@news.individual.net> 
>   Tim Streater <timstreater@greenbee.net> wrote:
> > In article <1koznr4.sxbt921me61qgN%dcohenspam@talktalk.net>,
> >  dcohenspam@talktalk.net (Daniel Cohen) wrote:
> 
> >> Barry Margolin <barmar@alum.mit.edu> wrote:
> >>
> >> > How does the -a option act differently from what the man page says?  I
> >> > just tried:
> >> > 
> >> > open -a TextEdit filename.docx
> >> > 
> >> > and the Word document was opened in TextEdit as desired. It's supposed
> >> > to be like using the 'Open With' contextual menu in the Finder.  The man
> >> > page says "Specifies the application to use for opening the file", which
> >> > seems to be a reasonable description of what that does.
> >> 
> >> Yes, that's fine, the manual explains what
> >> 
> >> open -a application file
> >> 
> >> does, but one has to have more experience than I have to realise that
> >> this also covers
> >> 
> >> open -a application
> >> 
> >> That was explained to me by David Empson in a thread related to this on
> >> the Apple Support Communities Mountain Lion section
> 
> > You can also do such as:
> 
> >   open -a Safari 'http://www.example.com/'
> 
> > which I have found *very* handy.
> 
> I usually just say 
> 
> open http://www.example.com

Fine but I needed Safari to do it.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#29657

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2012-08-18 06:24 +0000
Message-ID<slrnk2ud83.iuc.g.kreme@mbp55.local>
In reply to#29643
In message <timstreater-F54046.23480417082012@news.individual.net> 
  Tim Streater <timstreater@greenbee.net> wrote:
> In article <slrnk2thqu.eqs.g.kreme@mbp55.local>,
>  Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:

>> In message <timstreater-330B0F.23260317082012@news.individual.net> 
>>   Tim Streater <timstreater@greenbee.net> wrote:
>> > In article <1koznr4.sxbt921me61qgN%dcohenspam@talktalk.net>,
>> >  dcohenspam@talktalk.net (Daniel Cohen) wrote:
>> 
>> >> Barry Margolin <barmar@alum.mit.edu> wrote:
>> >>
>> >> > How does the -a option act differently from what the man page says?  I
>> >> > just tried:
>> >> > 
>> >> > open -a TextEdit filename.docx
>> >> > 
>> >> > and the Word document was opened in TextEdit as desired. It's supposed
>> >> > to be like using the 'Open With' contextual menu in the Finder.  The man
>> >> > page says "Specifies the application to use for opening the file", which
>> >> > seems to be a reasonable description of what that does.
>> >> 
>> >> Yes, that's fine, the manual explains what
>> >> 
>> >> open -a application file
>> >> 
>> >> does, but one has to have more experience than I have to realise that
>> >> this also covers
>> >> 
>> >> open -a application
>> >> 
>> >> That was explained to me by David Empson in a thread related to this on
>> >> the Apple Support Communities Mountain Lion section
>> 
>> > You can also do such as:
>> 
>> >   open -a Safari 'http://www.example.com/'
>> 
>> > which I have found *very* handy.
>> 
>> I usually just say 
>> 
>> open http://www.example.com

> Fine but I needed Safari to do it.

So did I.

-- 
'(...) And the Patrician has been ironical at me,' said Mr. Clete. 'I'm
not having that again.'

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.mac.system


csiph-web