<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random Wisdom &#187; user</title>
	<atom:link href="http://scrolls.mafgani.net/tag/user/feed/" rel="self" type="application/rss+xml" />
	<link>http://scrolls.mafgani.net</link>
	<description>An attempt at organizing my thoughts ...</description>
	<lastBuildDate>Sun, 13 Mar 2011 22:54:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>User installation of additional TeX/LaTeX classes and styles</title>
		<link>http://scrolls.mafgani.net/2007/08/user-installation-of-additional-texlatex-classes-and-styles/</link>
		<comments>http://scrolls.mafgani.net/2007/08/user-installation-of-additional-texlatex-classes-and-styles/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 22:04:00 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[How To ...]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[latex packages]]></category>
		<category><![CDATA[local install]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://scrolls.mafgani.net/?p=91</guid>
		<description><![CDATA[When you are the sysadmin, you can simply drop the new class/style files under the system TeX path (e.g. /usr/share/texmf/tex/) and run &#8216;texhash&#8217; to have them automatically picked up. But what do you do when you are just a regular user? TeX/LaTeX looks at the TEXINPUTS environment variable to look for additional locations to search [...]]]></description>
			<content:encoded><![CDATA[<p>When you are the sysadmin, you can simply drop the new class/style files under the system TeX path (e.g. <span style="font-family:courier new;">/usr/share/texmf/tex/</span>) and run <span style="font-family:courier new;">&#8216;texhash&#8217;</span> to have them automatically picked up. But what do you do when you are just a regular user?</p>
<p>TeX/LaTeX looks at the TEXINPUTS environment variable to look for additional locations to search for included/referenced files. Therefore, new classes/styles can be easily added as follows:
<ol>
<li>Create a directory for the files:<br /> 
<pre>$ mkdir -p $HOME/tex/latex</pre>
</li>
<p>
<li>Place the new class files into that folder (each class can be in its own directory and contain subdirectories):<br /> 
<pre>$ cp -a fancy-class $HOME/tex/latex/</pre>
</li>
<p>
<li>Export the TEXINPUTS variable and also add it to your <span style="font-family:courier new;">$HOME/.bash_profile</span>:<br /> 
<pre>$ export TEXINPUTS=.:$HOME/tex/latex//:$TEXINPUTS</pre>
</li>
</ol>
<p>The <span style="font-family:courier new;">&#8216;.&#8217;</span> ensures that the working directory is included in the search path. The double-<span style="font-family:courier new;">&#8216;//&#8217;</span> tells bash to also include files in subdirectories of <span style="font-family:courier new;">&#8216;$HOME/tex&#8217;</span> recursively.</p>
<p>New BibTeX files can also be added locally in a similar fashion. The variables to set are then BSTINPUTS and BIBINPUTS.</p>
<p>The environment variable to set for MakeIndex styles is: INDEXSTYLE.</p>
<p>Source: <a href="http://ads.harvard.edu/pubs/bibtex/astronat/doc/html/astronat_2.html">AstroNat &#8211; Installation</a> at <a href="http://ads.harvard.edu/">The Smithsonian/NASA Astrophysics Data System</a></p>
<p><span style="font-weight:bold;">UPDATE [16 July 2009]</span> The <a href="http://www.tug.org/texinfohtml/kpathsea.html#TeX-support">Kpathsea manual</a> provides a wealth of information about usable environment variables.</p>
]]></content:encoded>
			<wfw:commentRss>http://scrolls.mafgani.net/2007/08/user-installation-of-additional-texlatex-classes-and-styles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing RPMs as a regular user</title>
		<link>http://scrolls.mafgani.net/2006/04/installing-rpms-as-a-regular-user/</link>
		<comments>http://scrolls.mafgani.net/2006/04/installing-rpms-as-a-regular-user/#comments</comments>
		<pubDate>Thu, 20 Apr 2006 08:03:00 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[How To ...]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://scrolls.mafgani.net/?p=62</guid>
		<description><![CDATA[A while back I needed some packages on a machine that I don&#8217;t have admin rights to. Grabbing the source and recompiling would have been a pain the a** so I decided to read the rpm man pages and look for a way to install packages in the user home directory. Since it&#8217;s such a [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I needed some packages on a machine that I don&#8217;t have admin rights to. Grabbing the source and recompiling would have been a pain the a** so I decided to read the <span style="font-weight:bold;">rpm</span> man pages and look for a way to install packages in the user home directory. Since it&#8217;s such a nice package manager, it comes with options that allows me to do just that. The command needed is:</p>
<pre>
$ rpm -ivh --relocate OLDPATH1=NEWPATH1 [--relocate OLDPATH2=NEWPATH2 ...] \
      --badreloc package.rpm
</pre>
<p>where OLDPATH is the path in the package; and NEWPATH is something like /home/user/userroot/usr, etc.</p>
<p>It&#8217;s best to run</p>
<pre>
$ rpm -qpl package.rpm
</pre>
<p>to see exactly which paths are going to be used by the package. For example, if the package <span style="font-style:italic;">foo.rpm</span> produces:</p>
<pre>
$ rpm -qpl foo.rpm
/usr/bin/foo
/usr/lib/foo.so.0.0
/usr/lib/foo.so.0
/usr/share/doc/foo/README
</pre>
<p>then the steps needed are:</p>
<pre>
$ mkdir -p ~/myroot/usr/bin ~/myroot/usr/lib ~/myroot/usr/share/doc
$ rpm -ivh --relocate /usr=/home/$USER/myroot/usr --badreloc foo.rpm
</pre>
<p>That&#8217;ll install the package under the hierarchy ~/myroot. There will some errors from <span style="font-weight:bold;">rpmdb</span> but this is fine since the rpmdb is in a filesystem that we do not have write access to. The only repercussion is that <span style="font-weight:bold;">rpm</span> will have no record of the package foo being installed (so packages will have to be removed by hand); but that&#8217;s okay since we cannot possibly mess up the system while installing stuff under our own home dirs.</p>
<p>The only steps remaining are to add the new paths to the binary and library search paths. To so this, add the following lines to ~/.bash_profile</p>
<pre>
        PATH=$PATH:$HOME/myroot/usr/bin
        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/myroot/usr/lib

        export PATH LD_LIBRARY_PATH
</pre>
<p>This is only efficient as long as the package does not have too many unmet dependencies &#8212; since you will need to grab and install all missing dependencies along with the package itself. And even if you had installed some of the dependencies earlier using this method, rpm will not know about it since there will be no entry in the system rpmdb.</p>
]]></content:encoded>
			<wfw:commentRss>http://scrolls.mafgani.net/2006/04/installing-rpms-as-a-regular-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

