Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Xianwen Chen on June 26, 2010, 06:45:34 PM
-
Dear TCLers,
I'm making texlive-latex 2009 package for TCL. A start up script "texlive-latex" is packed inside the squashfs file, at usr/local/tce.installed:
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH
export PATH
However, it doesn't work at all. I'm running 2.11.5. Some hints please?
Best regards,
Xianwen
-
Startup scripts are not parents of login, and therefore cannot modify the user's environment.
-
Might try all one line:
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH texlive-latex
-
Startup scripts are not parents of login, and therefore cannot modify the user's environment.
Dear gerald_clark,
Thanks for your hint. I'm confused. How could I modify user's environment then?
Best regards,
Xianwen
-
Might try all one line:
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH texlive-latex
Dear Robert,
Thanks for your suggestion! However, it doesn't work. This problem has puzzled me for weeks. ???
Best regards,
Xianwen
-
Set your custom PATH in your .profile
-
Set your custom PATH in your .profile
Hi gerald_clark,
Thanks a lot for your advice!
That is actually why I'm holding this extension. I don't want to ask every user of this extension to add a line to their .profile or .ashrc.
Best regards,
Xianwen
-
Have you created a wrapper for texlive-latex? Rename the binary texlive-latex-bin and create a wrapper script named /usr/local/bin/texlive-latex similar to this:
#!/bin/sh
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH
export PATH
/usr/local/texlive/2009/bin/i386-linux/texlive-latex-bin ##(assuming that is the location.)
But if using
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH /path/to/texlive-latex
from the command line does not work, then the wrapper probably wouldn't work either.
-
I wonder if it could the the export statement which is buggy?
I followed a scripting tutorial a while ago, and one of the statements treated was export. I found I could not get export to do what the tut was saying it should - I could not make it stick outside a terminal window. The only place where it is working for me is in .profile.
-
Support for scripts that can set environment variables was added to /etc/profile as was brought up here:
http://forum.tinycorelinux.net/index.php?topic=5086.0
If a script is there during login, it is run and that could export variables when logging in. But that does not cover an extension that is loaded after boot that could have a /etc/profile.d/ script to set variables like a texlive extension would need.
Could we consider adding a similar routine to .ashrc (I think that would be the right place?) so extensions can set variables if they are loaded after login?
That is, if it would not cause a duplication of what is already done in /etc/profile and result in duplicated variables.
-
... so are you saying export is not intended to work in X, ie what I found was intended?
-
jur: I think the point is in which shell the export gets executed and to which degree child processes are inheriting the context.
-
Have you created a wrapper for texlive-latex? Rename the binary texlive-latex-bin and create a wrapper script named /usr/local/bin/texlive-latex similar to this:
#!/bin/sh
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH
export PATH
/usr/local/texlive/2009/bin/i386-linux/texlive-latex-bin ##(assuming that is the location.)
But if using
PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH /path/to/texlive-latex
from the command line does not work, then the wrapper probably wouldn't work either.
Hi Jason,
Thanks a lot! However, it doesn't work, because the system wide $PATH will be searched before the user $PATH. Hence, the wrapped script will be executed all the time. It would be okay for most of the cases, but not for texlive. Anyway, I think using a live-cd will be an ideal way of doing it. I'll put this aside and work on other packages.
-
Hi Jason,
Thanks a lot! However, it doesn't work, because the system wide $PATH will be searched before the user $PATH. Hence, the wrapped script will be executed all the time. It would be okay for most of the cases, but not for texlive. Anyway, I think using a live-cd will be an ideal way of doing it. I'll put this aside and work on other packages.
Have you actually tried the solution put forward by Jason? I've used a similar solution a number of times for similar purposes myself, and it's typically quite effective for this sort of use-case.
-
Have you actually tried the solution put forward by Jason? I've used a similar solution a number of times for similar purposes myself, and it's typically quite effective for this sort of use-case.
Hi althalus,
Yes I have. It didn't work for texlive.
Best regards,
Xianwen