Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 8:31 AM, Parham FH  wrote:
> I tried asking on IRC but got no replies.
> I am curious if it is possible to run lilypond from the Mac OS X
> (my case: 10.6.8) terminal since I am
> generating the data for lilypond via a python application.
> It would therefor be preferred to run lilypond from the terminal in
> an automated non-user-interaction-
> demanding manner.
>

add this script to your $PATH and make it executable.

#!/bin/sh
exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond "$@"

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Paul Morris
On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:

> I am curious if it is possible to run lilypond from the Mac OS X 
> (my case: 10.6.8) terminal

Instructions are here:
http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x

"Running on the command-line"

Cheers,
-Paul


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread David Kastrup
Paul Morris  writes:

> On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:
>
>> I am curious if it is possible to run lilypond from the Mac OS X 
>> (my case: 10.6.8) terminal
>
> Instructions are here:
> http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x
>
> "Running on the command-line"

Stupid question: why would one create executable shims to something like
DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
one's PATH when one can just add
DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
contain stuff that is bad for PATH?

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 9:32 AM, David Kastrup  wrote:
> Paul Morris  writes:
>
>> On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:
>>
>>> I am curious if it is possible to run lilypond from the Mac OS X
>>> (my case: 10.6.8) terminal
>>
>> Instructions are here:
>> http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x
>>
>> "Running on the command-line"
>
> Stupid question: why would one create executable shims to something like
> DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
> one's PATH when one can just add
> DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
> contain stuff that is bad for PATH?

Or, another way to approach the matter is there an easier way to
register ".ly" file extensions so that one can just do the following?

$ open -a LilyPond example.ly

I've already configured my machine to always open that file extension
with LilyPond.app, but if there's an easier way to do it, maybe it's
more idiomatic for Mac users.

- Eric

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Paul Morris
On Dec 12, 2012, at 10:32 AM, David Kastrup  wrote:

> Paul Morris  writes:
> 
>> On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:
>> 
>>> I am curious if it is possible to run lilypond from the Mac OS X 
>>> (my case: 10.6.8) terminal
>> 
>> Instructions are here:
>> http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x
>> 
>> "Running on the command-line"
> 
> Stupid question: why would one create executable shims to something like
> DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
> one's PATH when one can just add
> DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
> contain stuff that is bad for PATH?

I have no idea, as I am pretty unfamiliar with using the command-line.  I tried 
to follow those instructions recently (to try the png output) but was not able 
to get it to run.  There did seem to be more steps than I would have thought.  
I'm hoping to get together with a friend of mine who is experienced with unix 
on the mac to help me get it working.

-Paul
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Hans Aberg

On 12 Dec 2012, at 16:32, David Kastrup wrote:

> Paul Morris  writes:
> 
>> On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:
>> 
>>> I am curious if it is possible to run lilypond from the Mac OS X 
>>> (my case: 10.6.8) terminal
>> 
>> Instructions are here:
>> http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x
>> 
>> "Running on the command-line"
> 
> Stupid question: why would one create executable shims to something like
> DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
> one's PATH when one can just add
> DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
> contain stuff that is bad for PATH?

This directory contains other stuff that might be conflicting with other same 
named executable. For example, ps2pdf and such comes with the TeXLive 
installation.

Hans



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Graham Percival
On Wed, Dec 12, 2012 at 08:47:27PM +0100, Hans Aberg wrote:
> 
> On 12 Dec 2012, at 16:32, David Kastrup wrote:
> > Stupid question: why would one create executable shims to something like
> > DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
> > one's PATH when one can just add
> > DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
> > contain stuff that is bad for PATH?
> 
> This directory contains other stuff that might be conflicting with other same 
> named executable. For example, ps2pdf and such comes with the TeXLive 
> installation.

Yes, that's precisely the case.  Back in the 10.4 days, prepending
that directory to the path resulted in other programs (such as
pdflatex) being unable to produce valid pdf files due to some
conflict or missing share directory.  The executable shims ensure
that lilypond uses the packaged ps2pdf, while other command-line
osx programs don't use that.  This particular problem might be
avoidable by appending that dir to the path rather than
prepending, but then I'd be concerned about lilypond using the
system ps2pdf rather than our packaged one.

The executable shims avoid those problems, while being relatively
easy to explain to newbies.

- Graham

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread David Kastrup
Graham Percival  writes:

> On Wed, Dec 12, 2012 at 08:47:27PM +0100, Hans Aberg wrote:
>> 
>> On 12 Dec 2012, at 16:32, David Kastrup wrote:
>> > Stupid question: why would one create executable shims to something like
>> > DIR/LilyPond.app/Contents/Resources/bin/* in ~/bin and then add ~/bin to
>> > one's PATH when one can just add
>> > DIR/LilyPond.app/Contents/Resources/bin/ instead?  Is DIR expected to
>> > contain stuff that is bad for PATH?
>> 
>> This directory contains other stuff that might be conflicting with
>> other same named executable. For example, ps2pdf and such comes with
>> the TeXLive installation.
>
> Yes, that's precisely the case.  Back in the 10.4 days, prepending
> that directory to the path resulted in other programs (such as
> pdflatex) being unable to produce valid pdf files due to some conflict
> or missing share directory.  The executable shims ensure that lilypond
> uses the packaged ps2pdf, while other command-line osx programs don't
> use that.

Then we should put those executables provided just for the sake of our
own programs internally into a separate directory rather than bin.
I have seen libexec being used for that.

> This particular problem might be avoidable by appending that dir to
> the path rather than prepending, but then I'd be concerned about
> lilypond using the system ps2pdf rather than our packaged one.
>
> The executable shims avoid those problems, while being relatively easy
> to explain to newbies.

The libexec route appears to cater for all of that.  We should use bin
just for executables supposed to be entry points of LilyPond.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Graham Percival
On Wed, Dec 12, 2012 at 09:14:12PM +0100, David Kastrup wrote:
> Graham Percival  writes:
> 
> > The executable shims avoid those problems, while being relatively easy
> > to explain to newbies.
> 
> The libexec route appears to cater for all of that.  We should use bin
> just for executables supposed to be entry points of LilyPond.

I have no objection to that.  Patches will most likely be required
for both:
https://github.com/gperciva/gub
https://github.com/gperciva/lilypad

- Graham

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
> The libexec route appears to cater for all of that.  We should use bin
> just for executables supposed to be entry points of LilyPond.

Please, no!

>From man 1 hier

[..]
  libexec/  system daemons & system utilities (executed by
 other programs)


vs.

[..]
 local/executables, libraries, etc. not included by the
 basic operating system

and..

[..]
  /usr/ contains the majority of user utilities and applications
   bin/  common utilities, programming tools, and
applications

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread David Kastrup
Eric Pancer  writes:

> On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
>> The libexec route appears to cater for all of that.  We should use bin
>> just for executables supposed to be entry points of LilyPond.
>
> Please, no!
>
>>From man 1 hier
>
> [..]
>   libexec/  system daemons & system utilities (executed by
>  other programs)

Which is pretty much what we are talking about.  I was not talking about
/libexec but libexec, like the LilyPond executables are not in /bin but
some bin (well, actually out/bin) and, after installation, in some
/usr/local/bin (so the companion would be something like
/usr/local/libexec/lilypond/2.17.7/i686-pc-linux-gnu/ if we are taking
things literally).

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 2:25 PM, David Kastrup  wrote:
> Which is pretty much what we are talking about.  I was not talking about
> /libexec but libexec, like the LilyPond executables are not in /bin but
> some bin (well, actually out/bin) and, after installation, in some
> /usr/local/bin (so the companion would be something like
> /usr/local/libexec/lilypond/2.17.7/i686-pc-linux-gnu/ if we are taking
> things literally).

Okay, I understand that, but do not view LilyPond as a system utility.
Perhaps it is, since other items such as mysql, gpg-protect-tool, and
other third-party tools get put on other *BSD-derived systems, as
well.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread David Kastrup
Eric Pancer  writes:

> On Wed, Dec 12, 2012 at 2:25 PM, David Kastrup  wrote:
>> Which is pretty much what we are talking about.  I was not talking about
>> /libexec but libexec, like the LilyPond executables are not in /bin but
>> some bin (well, actually out/bin) and, after installation, in some
>> /usr/local/bin (so the companion would be something like
>> /usr/local/libexec/lilypond/2.17.7/i686-pc-linux-gnu/ if we are taking
>> things literally).
>
> Okay, I understand that, but do not view LilyPond as a system utility.

Which is why we are talking /usr/local/libexec rather than /usr/libexec
or /libexec.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 3:02 PM, David Kastrup  wrote:
> Eric Pancer  writes:
>
>> On Wed, Dec 12, 2012 at 2:25 PM, David Kastrup  wrote:
>>> Which is pretty much what we are talking about.  I was not talking about
>>> /libexec but libexec, like the LilyPond executables are not in /bin but
>>> some bin (well, actually out/bin) and, after installation, in some
>>> /usr/local/bin (so the companion would be something like
>>> /usr/local/libexec/lilypond/2.17.7/i686-pc-linux-gnu/ if we are taking
>>> things literally).
>>
>> Okay, I understand that, but do not view LilyPond as a system utility.
>
> Which is why we are talking /usr/local/libexec rather than /usr/libexec
> or /libexec.

Alright, it's your rodeo and I'm just a spectator. Just make sure you
let us all know to add it to our PATHs since most people, I'm
guessing, don't have /usr/local/libexec added.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread David Kastrup
Eric Pancer  writes:

> On Wed, Dec 12, 2012 at 3:02 PM, David Kastrup  wrote:
>> Eric Pancer  writes:
>>
>>> On Wed, Dec 12, 2012 at 2:25 PM, David Kastrup  wrote:
 Which is pretty much what we are talking about.  I was not talking about
 /libexec but libexec, like the LilyPond executables are not in /bin but
 some bin (well, actually out/bin) and, after installation, in some
 /usr/local/bin (so the companion would be something like
 /usr/local/libexec/lilypond/2.17.7/i686-pc-linux-gnu/ if we are taking
 things literally).
>>>
>>> Okay, I understand that, but do not view LilyPond as a system utility.
>>
>> Which is why we are talking /usr/local/libexec rather than /usr/libexec
>> or /libexec.
>
> Alright, it's your rodeo and I'm just a spectator. Just make sure you
> let us all know to add it to our PATHs since most people, I'm
> guessing, don't have /usr/local/libexec added.

The whole point was _not_ to have it added to the PATH as it was
supposed to _only_ contain binaries used _internally_ in LilyPond.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 3:15 PM, David Kastrup  wrote:
> The whole point was _not_ to have it added to the PATH as it was
> supposed to _only_ contain binaries used _internally_ in LilyPond.

Ah! Sorry, I'll smack my own forehead :-)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Wed, Dec 12, 2012 at 4:48 PM, Hans Aberg  wrote:
> On 12 Dec 2012, at 21:16, Eric Pancer wrote:
>
>> On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
>>> The libexec route appears to cater for all of that.  We should use bin
>>> just for executables supposed to be entry points of LilyPond.
>>
>> Please, no!
>>
>> From man 1 hier
>>  libexec/  system daemons & system utilities (executed by
>> other programs)
> ...
>> local/executables, libraries, etc. not included by the
>> basic operating system
>
> There is a Filesystem Hierarchy Standard
>   http://www.pathname.com/fhs/
>   https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Right, like hier(1) describes. FHS looks to be rather Linux-specific.
Correct me if I'm wrong.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Hans Aberg
On 12 Dec 2012, at 23:50, Eric Pancer wrote:

> On Wed, Dec 12, 2012 at 4:48 PM, Hans Aberg  wrote:
>> On 12 Dec 2012, at 21:16, Eric Pancer wrote:
>> 
>>> On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
 The libexec route appears to cater for all of that.  We should use bin
 just for executables supposed to be entry points of LilyPond.
>>> 
>>> Please, no!
>>> 
>>> From man 1 hier
>>> libexec/  system daemons & system utilities (executed by
>>>other programs)
>> ...
>>>local/executables, libraries, etc. not included by the
>>>basic operating system
>> 
>> There is a Filesystem Hierarchy Standard
>>  http://www.pathname.com/fhs/
>>  https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
> 
> Right, like hier(1) describes. FHS looks to be rather Linux-specific.
> Correct me if I'm wrong.

Linux is a strictly speaking a kernel, like Mac OS X is running the kernel 
Mach, often combined with what is called GNU OS. Mac OS X derives originally 
from FreeBSD.

As for the standard, it is a development of BSD old traditions. So a similar 
origin of OSs make them putting stuff in similar places, but with some 
differences.

As for the POSIX/UNIX standards, they have no so such requirements, so in 
general, there can be quite some variation.

Hans



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Hans Aberg
On 12 Dec 2012, at 21:16, Eric Pancer wrote:

> On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
>> The libexec route appears to cater for all of that.  We should use bin
>> just for executables supposed to be entry points of LilyPond.
> 
> Please, no!
> 
> From man 1 hier
>  libexec/  system daemons & system utilities (executed by
> other programs)
...
> local/executables, libraries, etc. not included by the
> basic operating system

There is a Filesystem Hierarchy Standard
  http://www.pathname.com/fhs/
  https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Hans



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Eric Pancer
On Dec 12, 2012, at 16:57, Hans Aberg  wrote:

> On 12 Dec 2012, at 23:50, Eric Pancer wrote:
> 
>> On Wed, Dec 12, 2012 at 4:48 PM, Hans Aberg  wrote:
>>> On 12 Dec 2012, at 21:16, Eric Pancer wrote:
>>> 
 On Wed, Dec 12, 2012 at 2:14 PM, David Kastrup  wrote:
> The libexec route appears to cater for all of that.  We should use bin
> just for executables supposed to be entry points of LilyPond.
 
 Please, no!
 
 From man 1 hier
libexec/  system daemons & system utilities (executed by
   other programs)
>>> ...
   local/executables, libraries, etc. not included by the
   basic operating system
>>> 
>>> There is a Filesystem Hierarchy Standard
>>> http://www.pathname.com/fhs/
>>> https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
>> 
>> Right, like hier(1) describes. FHS looks to be rather Linux-specific.
>> Correct me if I'm wrong.
> 
> Linux is a strictly speaking a kernel, like Mac OS X is running the kernel 
> Mach, often combined with what is called GNU OS. Mac OS X derives originally 
> from FreeBSD.

Yes I know. 

> 
> As for the standard, it is a development of BSD old traditions. So a similar 
> origin of OSs make them putting stuff in similar places, but with some 
> differences.
> 

Right. 

> As for the POSIX/UNIX standards, they have no so such requirements, so in 
> general, there can be quite some variation.

Right. What's the point here?


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Paul Morris
On Dec 12, 2012, at 6:13 PM, Parham Fazelzadeh  
wrote:

> I have tried searching for the answer online

[...]

> thank you so much. I feel stupid now, can't believe I missed that. I guess my 
> eyes were looking for the word "terminal". Also, I would have maybe expected 
> that information to also exist under the Manual link and not Downloads! 

Hmmm... it might be good to include the word "Terminal" (the default OS X 
command-line app) somewhere on the following page, since it is a term that many 
mac users would use when searching the web search for this information. 

http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x

Just a thought,
-Paul___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-12 Thread Parham Fazelzadeh
Hey guys,

thank you so much. I feel stupid now, can't believe I missed that. I guess
my eyes were looking for the word "terminal". Also, I would have maybe
expected that information to also exist under the Manual link and not
Downloads!

either way, big thanks
/Parham

On 13 December 2012 00:25, Paul Morris  wrote:

> On Dec 12, 2012, at 9:31 AM, Parham FH  wrote:
>
> > I am curious if it is possible to run lilypond from the Mac OS X
> > (my case: 10.6.8) terminal
>
> Instructions are here:
> http://www.lilypond.org/doc/v2.16/Documentation/web/macos-x
>
> "Running on the command-line"
>
> Cheers,
> -Paul
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond in Mac OS X Terminal

2012-12-15 Thread Paul Morris
On Dec 12, 2012, at 11:03 AM, Paul Morris  wrote:

> I tried to follow those instructions recently (to try the png output) but was 
> not able to get it to run.  

For future command-line beginners like myself, I figured out the problem:

I needed to change the shell I was using from tcsh to bash.  Bash is now the 
default shell for OSX, but at one point it was tcsh (10.2 Jaguar or earlier).  
If you upgrade from those earlier tcsh versions, it does not automatically 
change the default shell to bash, but keeps using tcsh unless you manually 
change it.

More details and how to change the shell:
http://macdevcenter.com/pub/a/mac/2004/02/24/bash.html

-Paul
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user