Year: 2009Run Commands on Startup in FedoraDecember 13, 2009 To have commands run at the end of the startup process, add the commands to the /etc/rc.local file. Categories: Linux Tags: fedora LaTeX and BibTeX Search PathOctober 22, 2009 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
Categories: Linux Tags: bash, bibtex, latex Permanently Change Hostname in FedoraOctober 20, 2009 To permanently 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. Categories: Linux, Networking Tags: fedora, hostname Hearty Chicken SoupOctober 17, 2009 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
- 2 cups roasted or rotisserie chicken, cut into bite sized pieces
- 2 cups roasted fingerling potatoes, cut into bite sized pieces
- 2 cups cooked corn (preferably cut from the cob)
- 1 can cream of chicken soup
- 1 cup milk
- 1 tsp thyme
- 1 tsp rosemary
- 1 tsp seasoned salt
Preparation
- Cut the roasted or rotisserie chicken and fingerling potatoes into bite sized pieces.
- Over low heat, combine the soup and milk. Whisk to mix well.
- Add the chicken, potatoes, and corn, and spices, stirring to combine.
- Warm over low heat for 25, stirring every 5 minutes. The soup should not boil; turn down the burner if it does.
- Serve with crusty rolls or bread.
Recipe serves 2-3. Leftovers can be heated in a microwave on high for 1 minute 30 seconds, stirring halfway through. Categories: Cooking Tags: Mount Windows Share in LinuxOctober 17, 2009 To mount a Windows share in Linux, execute the following command:
mount -t cifs //Server/Share -o username=WinUsername,password=WinPassword /mnt/dir Categories: Linux, Networking Tags: fedora, windows Finding Packages in UbuntuSeptember 29, 2009 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.) Categories: Linux Tags: apt, fedora, ubuntu, yum Including Code Blocks in LaTeXSeptember 23, 2009 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. Categories: Development Tags: latex Installing Compiz in Fedora 10September 06, 2009 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:
- Installed the latest NVidia drivers for my graphics card. (As far as I know, you cannot use the
nv driver with Compiz.)
- Ran the command
glxinfo | grep direct
and got the response
Direct Rendering: Yes
confirming my box had the capacity to run Compiz.
- Installed the necessary packages (as root) for using Compiz with Gnome.
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
- Added a Startup Program in Gnome to auto-start Compiz at login.
- Select System > Preferences > Personal > Sessions.
- Click Add.
- Enter
fusion-icon for command.
- Enter a name and comment as you prefer. My comment was
Compiz Fusion panel applet .
- Logged off and logged back in.
- Configured my preferences by selecting System > Preferences > Look and Feel > CompizConfig Settings Manager.
Categories: Linux Tags: compiz, fedora Tab Completion of SSH HostsAugust 28, 2009 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.
- Create a file
.hosts in your home directory. In the file, put the hostnames of computers you commonly connect to, one per line.
Example .hosts file:
subdomain.domain.com
computer.domain.com
- Add three lines to your
.bashrc file:
HOSTFILE=~/.hosts
complete -f -A hostname scp
complete -A hostname ssh
- Enter the command
source ~/.bashrc
to reload your settings.
Categories: Linux, Networking Tags: bash, ssh Spicy Peanut Beef & BroccoliAugust 27, 2009 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
- 0.5 lb. boneless beef sirloin
- 1 Tbsp. olive oil
- 2 14 oz. cans (optionally, reduced-sodium) beef broth
- 3 Tbsp. bottled peanut sauce
- 1/2 box (8 oz) spaghetti or linguine noodles
- 2 cups broccoli florets
- Handful sliced almonds
Preparation
- Cut the beef sirloin into thin (about 1/8") strips.
- Heat olive oil in a 12" non-stick skillet over medium heat. Add the beef strips and cook until well done, about 6 minutes.
- Add the beef broth and peanut sauce to the skillet. Turn to medium-high heat and bring to a boil.
- Add the spaghetti or linguine, broken in half. Boil for 10 minutes.
- Add the broccoli and continue cooking for about 3 minutes, or until most of the beef broth has reduced.
- Transfer to serving plate and top with sliced almonds.
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.
 
Categories: Cooking Tags:
Older Entries >> |