I downloaded the latest ConTeXt and tried regenerating the hyphenation patterns and formats (to get hyphenation with Thomas’ Greek module). The first step texmfstart ctxtools --pat was successful. But sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found. Fortunately, sudo texexec --make --all still works, so life goes on. Still, why is this happening? Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/ context/ruby/texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH? If it does, is there a way to set things so that texmfstart is automatically available to the administrator and user whenever a Terminal session is begun? Alan
On Fri, 14 Jul 2006, Alan Bowen wrote:
sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found.
Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/ context/ruby/texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH?
Hello Alan, I doubt, that an alias is inherited by the shell of sudo. Here is one way, how to set up the ruby scripts without touching the ConTeXt-texmf tree (extracted from my tetex.spec in http://pmrb.free.fr/work/OS/ConTeXt/tetex/): mkdir -p /opt/teTeX/ruby-bin install texexec /opt/teTeX/ruby-bin ln -s ../texmf-context/scripts/context/ruby/texmfstart.rb \ /opt/teTeX/ruby-bin/texmfstart for i in `unzip -l cont-tmf.zip | \ sed -nre 's_^.*scripts/context/ruby/([^/]+)\.rb$_\1_p'`; do if [ "$i" != texexec -a "$i" != texmfstart ]; then ln -s texexec /opt/teTeX/ruby-bin/$i fi done And these 2 lines in the file "texexec": #!/bin/sh exec texmfstart `basename $0`.rb "$@" Then, /opt/teTeX/ruby-bin must come before the normal teTeX-bin in PATH. Cheers, Peter -- http://pmrb.free.fr/contact/
On Jul 14, 2006, at 2:58 PM, Peter Münster wrote:
On Fri, 14 Jul 2006, Alan Bowen wrote:
sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found.
Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/ context/ruby/texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH?
Hello Alan, I doubt, that an alias is inherited by the shell of sudo.
Here is one way, how to set up the ruby scripts without touching the ConTeXt-texmf tree (extracted from my tetex.spec in http://pmrb.free.fr/work/OS/ConTeXt/tetex/):
mkdir -p /opt/teTeX/ruby-bin install texexec /opt/teTeX/ruby-bin ln -s ../texmf-context/scripts/context/ruby/texmfstart.rb \ /opt/teTeX/ruby-bin/texmfstart for i in `unzip -l cont-tmf.zip | \ sed -nre 's_^.*scripts/context/ruby/([^/]+)\.rb$_\1_p'`; do if [ "$i" != texexec -a "$i" != texmfstart ]; then ln -s texexec /opt/teTeX/ruby-bin/$i fi done
And these 2 lines in the file "texexec": #!/bin/sh exec texmfstart `basename $0`.rb "$@"
Then, /opt/teTeX/ruby-bin must come before the normal teTeX-bin in PATH.
Cheers, Peter
-- http://pmrb.free.fr/contact/ _______________________________________________
Thanks, Peter! This is very helpful and much appreciated. Alan
On Jul 14, 2006, at 2:23 PM, Alan Bowen wrote:
I downloaded the latest ConTeXt and tried regenerating the hyphenation patterns and formats (to get hyphenation with Thomas’ Greek module). The first step texmfstart ctxtools --pat was successful. But sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found. [...]
Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH?
Yes -- sudo doesn't know about shell aliases, it's trying to find an executable file named texmfstart in your PATH.
If it does, is there a way to set things so that texmfstart is automatically available to the administrator and user whenever a Terminal session is begun?
Yes, by saving the following script as texmfstart in /usr/local/bin or wherever is appropriate: #!/bin/sh exec ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb "$@" (Everything from 'exec' to '"$@"' should be on a single line.) If you're using sudo while logged in as yourself (i.e., not root), this texmfstart script can be anywhere in your PATH. Paul.
Alan_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
--
Paul Hoffman
On Jul 14, 2006, at 3:35 PM, Paul Hoffman wrote:
On Jul 14, 2006, at 2:23 PM, Alan Bowen wrote:
I downloaded the latest ConTeXt and tried regenerating the hyphenation patterns and formats (to get hyphenation with Thomas’ Greek module). The first step texmfstart ctxtools --pat was successful. But sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found. [...]
Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/ texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH?
Yes -- sudo doesn't know about shell aliases, it's trying to find an executable file named texmfstart in your PATH.
If it does, is there a way to set things so that texmfstart is automatically available to the administrator and user whenever a Terminal session is begun?
Yes, by saving the following script as texmfstart in /usr/local/bin or wherever is appropriate:
#!/bin/sh exec ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb "$@"
(Everything from 'exec' to '"$@"' should be on a single line.)
If you're using sudo while logged in as yourself (i.e., not root), this texmfstart script can be anywhere in your PATH.
Paul.
Alan_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- Paul Hoffman
http://nkuitse.com/ http://hoffmancommapaul.com/
Many thanks, Paul! I appreciate your help. Alan
participants (4)
-
Alan Bowen
-
Alan Bowen
-
Paul Hoffman
-
Peter Münster