Section âTroubleshootingâ in Application Usage - LilyPond
Section âTroubleshootingâ in Application Usage - LilyPond
Section âTroubleshootingâ in Application Usage - LilyPond
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 1: Runn<strong>in</strong>g lilypond 2<br />
Basic command l<strong>in</strong>e options for <strong>LilyPond</strong><br />
The follow<strong>in</strong>g options are supported:<br />
-d, --def<strong>in</strong>e-default=var=val<br />
See [Advanced command l<strong>in</strong>e options for <strong>LilyPond</strong>], page 4.<br />
-e, --evaluate=expr<br />
Evaluate the Scheme expr before pars<strong>in</strong>g any ‘.ly’ files. Multiple ‘-e’ options may<br />
be given, they will be evaluated sequentially.<br />
The expression will be evaluated <strong>in</strong> the guile-user module, so if you want to use<br />
def<strong>in</strong>itions <strong>in</strong> expr, use<br />
lilypond -e '(def<strong>in</strong>e-public a 42)'<br />
on the command-l<strong>in</strong>e, and <strong>in</strong>clude<br />
#(use-modules (guile-user))<br />
at the top of the .ly file.<br />
☛<br />
Note: W<strong>in</strong>dows users must use double quotes <strong>in</strong>stead of<br />
s<strong>in</strong>gle quotes.<br />
✡<br />
-f, --format=format<br />
which formats should be written. Choices for format are ps, pdf, and png.<br />
Example: lilypond -fpng filename.ly<br />
-h, --help<br />
Show a summary of usage.<br />
-H, --header=FIELD<br />
Dump a header field to file ‘BASENAME.FIELD’.<br />
-i, --<strong>in</strong>it=file<br />
Set <strong>in</strong>it file to file (default: ‘<strong>in</strong>it.ly’).<br />
-I, --<strong>in</strong>clude=directory<br />
Add directory to the search path for <strong>in</strong>put files.<br />
Multiple -I options may be given. The search will start <strong>in</strong> the first def<strong>in</strong>ed directory,<br />
and if the file to be <strong>in</strong>cluded is not found the search will cont<strong>in</strong>ue <strong>in</strong> subsequent<br />
directories.<br />
-j, --jail=user,group,jail,dir<br />
Run lilypond <strong>in</strong> a chroot jail.<br />
The ‘--jail’ option provides a more flexible alternative to ‘-dsafe’, when <strong>LilyPond</strong><br />
formatt<strong>in</strong>g is be<strong>in</strong>g provided via a web server, or whenever <strong>LilyPond</strong> executes commands<br />
sent by external sources (see [Advanced command l<strong>in</strong>e options for <strong>LilyPond</strong>],<br />
page 4).<br />
It works by chang<strong>in</strong>g the root of lilypond to jail just before start<strong>in</strong>g the actual<br />
compilation process. The user and group are then changed to match those provided,<br />
and the current directory is changed to dir. This setup guarantees that it is not<br />
possible (at least <strong>in</strong> theory) to escape from the jail. Note that for ‘--jail’ to work,<br />
lilypond must be run as root, which is usually accomplished <strong>in</strong> a safe way us<strong>in</strong>g<br />
sudo.<br />
Sett<strong>in</strong>g up a jail can be a relatively complex matter, as we must be sure that<br />
<strong>LilyPond</strong> is able to f<strong>in</strong>d whatever it needs to compile the source <strong>in</strong>side the jail itself.<br />
A typical chroot jail will comprise the follow<strong>in</strong>g steps:<br />
✟<br />
✠