HOWTOs

One of the items on the Geek Ranch agenda is a weather station. While we don't have one yet, we have learned a bit about weather stations and Linux.

First, why don't we have one? Well, there is no electricity at the Geek Ranch site yet for starters. But, more important, there is no Internet connection. So, let's just call this research.

If you like the latest and greatest version of everything and you use an RPM based system you probably want to learn how to create RPMs. You don't have to, you can just download the latest source and compile and install it in /usr/local. This of course leaves your system in a state where your RPM database does not accurately reflect what is installed on your system. Again, this will work, but building RPMs isn't (usually at least) that difficult.

This tip shows how to add logging to your PHP script and how to add configuration so you have basic, configurable logging. The PHP script requires two PEAR packages, Log and Config. To use the code in shown in this tip, you'll need to PEAR installed along with PHP and you'll need to install both the Log and the Config PEAR packages. To install the two packages type:

    
  

Remote Window Managers

April 29th, 2008 by LJ Staff in

Lots of times it's extremely frustrating or time consuming to run an xterm on a remote host just to fork your programs from that remote machine. Why not just run your window manager there even though you're not on its console? The window manager is just another X application, after all, isn't it?

Fire off your local X server

xinit /usr/bin/xterm -- :1 &

Typing characters that are not standard in English can be done quite easily in [Ubuntu] Linux without any modifications. In most situations, you can do this by using the Character Map utility included in your system, which can be found at Applications > Accessories > Character Map. Upon running Character Map, a window will appear.

You can create a neat logo from the Linux command line:

$ convert -size 800x120 xc:white -font Times-Roman
-pointsize 100 -fill gray -annotate +20+80 'Linux is cool!'
-fill black -annotate +23+83 'Linux is cool!' -trim
+repage logo.png

And, the following command should display the result:

$ qiv logo.png

VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is a professional-quality virtualization solution that is also Open Source Software.

If you use sudo you can automatically re-start scripts that need to be run as root by adding a check at the beginning of the script and executing sudo if the script is not running as root:

If you need to make sure a script is run as root, add the following to the start of the script:

If you need to remove a path from the PATH variable before your script runs add this to the beginning of the script:

A useful thing that some distros have started doing is setting the color of your shell prompt differently if you're logged in as root. This gives you an additional visual cue that helps avoid doing things as root when you don't want to. If your distro doesn't do this for you, you can accomplish it by changing your .bashrc files. To set the color of your shell prompt you set the shell variable PS1.

Keeping the files on multiple machines synchronized seems to be a recurring problem for many computer users. Until I discovered Unison (http://www.cis.upenn.edu/~bcpierce/unison/) I never really had a completely satisfactory solution.

Extensions for OpenOffice.org Impress

Extensions have long been written for OpenOffice.org Writer. However, the fact that attention is finally being paid to other applications seems a sign that OpenOffice.org is finally starting to develop an active extension-writing community.

Setting up a file server doesn't need to be complicated.

Sorting Photos

January 4th, 2008 by Phil Hughes in

We all know the right way to sort photos is to do them right after you take them. We also know that doing a disk backup before your drive fails is the right way to do backups. But, we don't always do things the right way. Enter my situation. I have close to 10,000 photos takes with my digital camera over the last seven years. Yes, same camera—this could probably be an ad

Making an Illustrated Book

December 27th, 2007 by Phil Hughes in

One of the things we plan to do different in the Geek Ranch (see What's New Down Here?) is build a lot of domes instead of conventional buildings. The reasoning behind this is that they are quicker to build, cost less and use mostly local materials and that which is not local (in particular, steel) is used in lower quantities than

In my article about the web site for the Geek Ranch I suggested three tools that made sense for doing the site: Drupal, Joomla and Karrigell. Well, as usual, all I have to do is say "I will pick between X, Y and Z" and good old option W shows up. This time, it is named webgen.

Syndicate content