PDA

View Full Version : understanding klik



rol
01-10-2005, 09:45 PM
How do applications work together e.g. all the components of the TeX package ?
As I understand, each app is a CMG file, no longer installed into the home directory.
Can I access apps via command line e.g. latex?

thanks
rol

bfree
01-10-2005, 11:36 PM
Can I access apps via command line e.g. latex?
Yes you can, but instead of running "latex" you run "~/.zAppRun ~/Desktop/latex.cmg latex" and add arguments to latex as normal.

What happens is zApprun mounts the cmg file and runs the wrapper script inside it which in turn runs the program name you supplied from within the cmg.

One other thing you can do is make a simple script like

#!/bin/sh
CMG="~/Desktop/latex.cmg"
~/.zAppRun $CMG $0 $@

Make a directory called ~/klik.bin and put this file in there as latex.run
Make a smylink for each program in the latex.cmg that you want to run from the command line so to run latex and latexfoo from the latex.cmg you would do:

cd ~/klik.bin
ln -s latex.run latex
ln -s latex.run latexfoo
Finally you need to add ~/klik.bin to your path e.g.

PATH=~/klik.bin:$PATH
Now from the command line you should be able to run latex or latexfoo. If you want to use the same technique on more cmg files, you need to make a copy of the latex.run and change the CMG= line to reflect the correct cmg to use and then make the symlinks to this file for any programs you want to be able to run from the cmg.

Hope this helps.