Run Commands on Startup in Fedora
To have commands run at the end of the startup process, add the commands to the /etc/rc.local file.
To have commands run at the end of the startup process, add the commands to the /etc/rc.local file.
I often write papers in LaTeX that use the ACM SIG Proceedings Template. Previously, I would put a copy of the LaTeX style file (.sty) in every directory where I had a LaTeX document that used it. Then I discovered I could set an environment variable to automatically have LaTeX search a path for a style file.
The TEXINPUTS environment variable works similar to the PATH environment variable: it is a list of paths where LaTeX should search for necessary class and style dependencies. I created a folder in my home directory where I keep the ACM SIG Proceedings Template LaTeX style file. I set the TEXINPUTS variable in my .bashrc.
There is also a BIBINPUTS environment variable to search for BibTeX files. I have started putting all the references I use in a single file, to avoid having small BibTeX files all over the place. I put my central BibTeX file in the same location as the LaTeX style file and set the BIBINPUTS variable in my .bashrc.
The following few lines in my .bashrc set the two environment variables:
# Include shared LaTeX classes and BibTeX files in path, if LaTeX folder exists
if [ -d "~/latex" ]; then
export TEXINPUTS=".:~/latex/:"
export BIBINPUTS=".:~/latex/:"
fi
To permanently to change the hostname of a Fedora box, edit the file /etc/sysconfig/network. (You need to be root to change this file.) Modify the HOSTNAME line.
This is a great recipe to make with leftovers. You can make a meal of roast chicken, potatoes, and corn one night, then have soup made from the leftovers as another meal during the week.
Ingredients
Preparation
Recipe serves 2-3. Leftovers can be heated in a microwave on high for 1 minute 30 seconds, stirring halfway through.
To mount a Windows share in Linux, execute the following command:
mount -t cifs //Server/Share -o username=WinUsername,password=WinPassword /mnt/dir
In Fedora, I always use yum search to determine the exact name of a package I want to install using yum install. However, in Ubuntu I noticed apt-get does not have any search function. Instead, I needed to use apt-cache search to locate the exact name of a package. Also, it is good practice to run apt-get update prior to using apt-cache search to ensure the latest list of packages is cached on your computer.
(Note that apt-get update is not the same as yum update. apt-get update updates the list of packages, while yum update updates the list of packages and installs the newest version of any updated packages. In Ubuntu, apt-get upgrade will install the newest version of any updated packages.)
I recently had a need to include a block of C code in a report I was writing in LaTeX. I discovered the listings package provides mechanisms for nicely displaying code. Include the package in your file by placing
\usepackage{listings}
somewhere before your \begin{document}. Wherever you want the block of C code (or code in a multitude of other supported languages) insert
\begin{lstlisting}[language=C,frame=single]
CODE GOES HERE
\end{lstlisting}
You can specify other options besides language and frame. For more details on the package see the LaTex Wikibook.
To add some pizzaz to my Fedora 10 box, I decided to install Compiz. I mostly followed the instructions under step 21 at http://www.my-guides.net/en/content/view/125/26/1/9/. Here’s what I did step-by-step:
nv driver with Compiz.)glxinfo | grep direct
and got the response
Direct Rendering: Yes
confirming my box had the capacity to run Compiz.
yum install ccsm emerald-themes compizconfig-backend-gconf fusion-icon-gtk \ emerald compiz-fusion compiz-fusion-gnome libcompizconfig compiz-gnome \ compiz-bcop compiz compizconfig-python compiz-fusion-extras \ compiz-fusion-extras-gnome
fusion-icon for command.Compiz Fusion panel applet .I was tired of having to type full hostnames every time I wanted to SSH to a computer I commonly use. So, I setup tab completion for hostnames when I use SSH or SCP. The process involved only 3 simple steps.
.hosts in your home directory. In the file, put the hostnames of computers you commonly connect to, one per line..hosts file:
subdomain.domain.com computer.domain.com
.bashrc file:
HOSTFILE=~/.hosts complete -f -A hostname scp complete -A hostname ssh
source ~/.bashrc
to reload your settings.
Peanut sauce gives this dish a peanut flavor and a slight kick. The spice is offset by crisp broccoli which adds some color and crunch to the dish.
Ingredients
Preparation
Recipe serves 2-3. Leftovers can be heated in a microwave on high for 1 minute.
Recipe based on “Spicy Beef-Noodle Bowl” as published in Better Homes and Gardens.