Archive

Archive for March, 2009

origami now available in Arch User Repository (AUR)

March 27th, 2009 Christer No comments

If you’ve been following my other blog (ubuntu-tutorials.com) you know I’ve developed a management tool for running Folding@Home clients on Linux distributions.  It started out a bit Red Hat specific, but has since been ported to Debian families and finally Arch Linux.  I just finished applying my latest patches and put together a PKGBUILD for it.  I’m happy to be able to say that origami is now available to the general public in the community repository.

If you’re interested in trying it out, there are two methods you can use to install it:

Method 1 (manual):

wget -c http://aur.archlinux.org/packages/origami/origami/PKGBUILD
makepkg -si

Method 2 (yaourt):

yaourt -S origami

I would probably suggest the yaourt method, as it is a little more automated and will provide the dependencies you might need.  One of the dependencies (lsb-release) is only available via the AUR so, again, yaourt will take care of that for you.

If you have previously tried running Folding@Home on Linux, or would like to start competing with others in contribution to Stanford Universities research project, please give this package a try and give me any feedback you can.

Categories: Arch Tags: , ,

FreeBSD Security Update: 7.1-RELEASE-p4 Available

March 23rd, 2009 Christer 3 comments

For those using FreeBSD, there has been another security update to the 7.1 release family.  According to the UPDATING file:

20090323:       p4      FreeBSD-SA-09:06.ktimer, FreeBSD-EN-09:01.kenv
Correctly sanity-check timer IDs. [SA-09:06]
Limit the size of malloced buffer when dumping environment
variables. [EN-09:01]

If you’re interested in applying this update to your system, here is the method I use:

csup -g -L2 cvsup.freebsd.org /usr/share/examples/cvsup/standard-supfile
cd /usr/src
make buildkernel && make installkernel
make buildworld && make installworld
reboot

There are other methods for keeping your base system updated, but I prefer the compiling method. What other methods might you suggest?

Categories: FreeBSD Tags: ,

How To Configure PXE Boot on CentOS 5

March 21st, 2009 Christer 1 comment

The other day I blogged about how to extract the kernel and ramdisk from the DBAN downloadable image.  These two files would be useful in the situation where you might want to PXE (network) boot a machine and have it wiped.  (Something like this may be common prior to dispositioning a machine at work, or before you give an old machine away.)  Whatever your reasons might be, I thought I would outline the steps that I have taken to install and configure PXE on a CentOS 5 installation.

Installation

yum install tftp-server

DBAN Configuration

After following my previous instructions on how to extract the DBAN PXE images, copy the two files (kernel.bzi and initrd.gz) to the /tftpboot/ directory.

mkdir -p /tftpboot/dban
cp kernel.bzi /tftpboot/
cp initrd.gz /tftpboot/

PXE Configuration

You’ll also need to configure the PXE system to know what to launch/run when a specific command is given at boot.  In this case we’ll only have the DBAN option, which we could run by using the ‘dban’ command:

/tftpboot/pxelinux.cfg/default

display msgs/boot.msg
prompt 1
## dban
label dban
kernel dban/kernel.bzi
append load_ramdisk=1 initrd=dban/initrd.gz root=/dev/ram0 init=/rc quiet nuke=”dwipe” –autonuke –method dodshort”

The first line in that file, “display” tells it to display a file as a menu prompt at boot time.  The second step in this section is creating that menu prompt:

/tftpboot/msgs/boot.msg

**WARNING** TYPE ‘dban’ TO AUTO-WIPE THE PXE BOOTED MACHINE.  **WARNING**

Start The Service

Now that we have everything configured we’ll go ahead and start the service:

service xinetd restart

Categories: Automation, CentOS Tags: ,

Dropbox : Easy Way To Share and Store Files Online

March 21st, 2009 Christer No comments

I’ve been auditing some of the applications that I use day-to-day and thought I might share some tips about them. I’ve found that most people tend to get comfortable with a certain set of applications and rarely break out of that set. The beauty of the Free Software world is that the number and quality of available applications is constantly expanding. Hopefully some of the applications I can share here will make your computer usage more efficient and more fun!

Today I wanted to talk about Dropbox. It is a really simple way to store and share files online. I have been using it for a while now, primarily to share files between multiple laptops but also to share quick files and screenshots with people.

I’ve got it installed on my work laptop (Dell D630), personal laptop (Macbook) and work Desktop.  Anytime I need to quickly share a file from one machine to another (or even all) I simply drop it into my Dropbox folder and its instantly synchronized to the other machines.  Anything you do on one machine is automatically synched to the others.

It also has a nice, simple way to share files with others.  There is a subfolder called “Public”.  Anything in that folder can be shared directly with the outside world.  You’ll find that you can right-click on any file in “Public” and get the public link you can share.  We’ve started using this at work to quickly share documents and graphics that we’re working on.

If you haven’t tried out Dropbox, go download it.  It’s free and blends right into the GNOME Desktop and Nautilus.

Categories: gnome Tags:

Gnome Terminal Shortcut Keys

March 19th, 2009 Christer 5 comments

I’m a keyboard junky.  I’ll admit it.  Anytime I *have* to use the mouse I feel like I’ve just slowed down my work.  Considering most of the work (at least my work) is done directly into the keyboard, taking my hand off the keys to move something is time I’m not getting back.  To that extent I’ve collected a number of keyboard shortcuts to allow me to do as much as I can without ever leaving the keys.  The shortcuts I wanted to share today are regarding maximizing, minimizing, un-maximizing, moving and resizing the gnome-terminal.

Shortcuts

Maximize: alt-F10

Minimize: alt-F9

Un-Maximize: alt-F5

Move: alt-F7

Resize: alt-F8

With these few shortcuts you should new be able to resize your terminals, shrink or enlarge them and even move them without leaving your keyboard.  Thank goodness for shortcut keys.  Where would we be without them?  Ohh, yeah, I think its called Mac OS X ;)

Categories: gnome Tags: , ,

Gregarius : Server Side Feed Reader

March 17th, 2009 Christer No comments

I’ve spent the last week casually hunting around for alternate feed readers.  I’ve been using Google Reader for some time now. but I’ve been growing tired of it.  Desktop clients just don’t quite cut it for me as, just at work, I’m regularly between three different machines.  I think I’ve found one that I like!  It’s small, simple to install and configure and Free Software.  Gregarius.

Gregarius has been in development for a number of years now, although has recently slowed down.  I’d like to see things pick up again but, as usual in the Free Software world, that usually requires a community of users.  It currently has a fairly thorough wiki, forum, devlog (blog) and a list of features and configuration options.  The main reasons I like it are:

  • Lightweight and responsive
  • Very configurable.  Includes plugins and themes.
  • Simple feed management (categories, tags, etc)
  • Very clean default theme
  • Detailed search options
  • more…

For those that might be interested in trying out a server-side feed reader I thought I might outline some of the steps toward installing it.

Gregarius Installation

These steps mirror the setup I’ve decided to use on my web server.  You may need to alter some of the details to your needs.

cd /var/www/html/
wget -c http://superb-west.dl.sourceforge.net/sourceforge/gregarius/gregarius-0.6.1.tar.gz
tar xf gregarius-*.tar.gz

Database Creation

Gregarius uses a MySQL database to store and search the feeds you’re subscribed to.  The next step in installing this server-side feed reader is to create your database.

mysql -u root -p
[PASSWORD]
create database rss;
quit;

Configuration

The last step is updating the configuration file to know how to connect to the database, and what database to use.  This configuration is found in the gregarius folder, inside the dbinit.php.sample.  You’ll want to rename this file to dbinit.php and update with your database changes.  The fields you’ll need to update are:

define ('DBTYPE','mysql');
define ('DBNAME','rss');
define ('DBUNAME','db_user');
define ('DBPASS', 'db_password');
define ('DBSERVER', 'localhost');

Once this is done you should be able to start using your Gregarius installation at: http://yoursite.com/rss/  Enjoy!

If you have any issues installing or using Gregarius please comment and let me know.  I’d really love to see more people using this, and if that means doing a bit of support and recruiting on my own, then so be it.

Categories: Interweb Tags: , ,

Automatically Upgrade Debian With Each Stable Release

March 16th, 2009 Christer No comments

I recently migrated my VPS from Slicehost to Linode and I’ve been very happy with them.  One of the changes that I made during this move was to try out Debian 5.0 as my base OS instead of Ubuntu 8.04.  So far I have been pleased with the change–although I’ll admit there isn’t much that is different on the server installation.  One of the few differences that I have found is in regards to the repository configuration.  One feature in Debian that is not available in Ubuntu is the ability to configure your sources.list to the stable release.. whatever version that happens to be.  Let me explain.

Repository Configuration

Ubuntu, a variant of Debian, uses the /etc/apt/sources.list to configure which repositories to subscribe to for available packages and errata updates.  Generally these repositories are subscribed to by way of development codename.  For example:

http://us.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse

A line like this in your Ubuntu configuration would subscribe to the Ubuntu 8.10 “Intrepid” repository for the life of that release (18 months).  It would also be able to pull updates and packages from the main, restricted, universe and multiverse areas of the repository.

Debian can follow the same standard–a repository configuration example might be something like this:

deb http://mirrors.kernel.org/debian lenny main contrib non-free

As you can see, these are both very similar.  The only differences are the development codenames, “Intrepid” vs “Lenny” and the naming of the repository subdivisions.  non-free vs universe/multiverse, etc.

Subscribing to Stable

The one difference that I have learned with Debian however is that you have the ability to use release aliases instead of development codenames.  For example, I could change “lenny” to “stable” and my machine would subscribe to the “stable” repository as long as one exists.  The key difference here is that “stable” evolves as the distribution evolves.  Whereas in the Ubuntu configuration I would need to update my configuration each time I want to migrate to a new “stable” version, Debian allows me to simple subscribe to “stable” and my machine would follow, and upgrade, to each stable release as long as it is in service.

Here is the sources.list that I use on my current Debian 5.0 web server:

deb http://mirrors.kernel.org/debian/ stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile stable/volatile main contrib non-free

You’ll notice that I’m using “stable” instead of “lenny” even though, at this point, they are technically the same thing.  When the next release is final however my machine will automagically subscibe to the newer repository, and I would never have needed to change my config.  Why doesn’t Ubuntu offer something like this?

Categories: Debian, Ubuntu Tags: , , ,

Install Chromium Browser on Arch Linux

March 14th, 2009 Christer No comments

Update: I’ve submitted a patch to the existing PKGBUILD in the AUR which brings the Chromium Browser up to yesterdays nightly build.  Much improved from the previous.

I saw a post recently on the Planet Ubuntu Users, again by Stefano Forenza, regarding installing and testing the latest daily Chromium browser builds.  That got me curious so I started poking around and found an available package for Arch Linux by way of the Arch User Repository.  Installation was simple enough and the browser works, but I should mention that it is *very* alpha quality.  None of the menu buttons worked for me and I wasn’t able to make use of tab functionality.  It is nice to see that some progress is being made though on the Linux platform.

 

Chromium on Linux

Chromium on Linux

Now that we’ve seen the obligatory screenshot I’ll outline the few simple steps to installing it on Arch.

Method 1

Using the yaourt tool you can install directly from the Arch User Repository.  There are a few packages available, but this appears to be the only native package, and not a variant requiring the use of Wine.

yaourt -S chromium-browser

Once this is installed you’ll be able to launch it from your Applications menu.  You should note that due to the alpha nature of this client it will also automagically launch with a debug window terminal.  If this is closed the browser will close as well.  During these early stages this is still a requirement due to the number of issues and amount of debugging required.

Method 2

The second method still requires installing the package from the Arch User Repository, but doesn’t require the yaourt frontend.  These steps are as follows:

  1. Download the chromium-browser tarfile from the Arch User Repository.
  2. tar xf chromium-browser.tar.gz
  3. cd chromium-browser/
  4. makepkg -i

At the time of this writing the Arch User Repository package is marked as out of date.  Again, install the package and use the browser at your own risk.  It is still very, very alpha.

Categories: Arch, Interweb Tags: ,

Temporarily Disable Aliases in Bash

March 14th, 2009 Christer 5 comments

Shell aliases are commonly used to replace a command with a different or longer string.  Some very common bash shell aliases are:

(taken from my Debian 5.0 .bashrc)

alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

As you can see, these aliases are assigning either an alternate command for a command + argument, or defining that a default command should work with extended options. Many of these are commented out by default, but you can edit your .bashrc file and remove the comments if you like.

Now the question remains, if I have a command set to an alias, how can I run the command *without* the alias additions? There are two methods.

Method 1
The system comes with a unalias command. This is used to remove an alias definition you might have on a per-command basis. For example:

unalias ls

This command will undefine or remove the alias definitions for the ls command meaning, based on the definitions above, ls will no longer be run with the --color=auto arguments. This change–the removal of the alias–will apply until you logout.

Method 2
The second method allows you to run aliased commands in an unaliased fashion in a one-off manner. In other words, the removal of the alias definition only apply to that instance of the command, not for the remainder of your login session.

To use Method 2 of unaliasing a command simply prefix the command with a \:

\ls

This example achieves the same results as Method 1 but only temporarily–only for that instance of the ls command. The next time you run ls it’ll be back to its normal aliased settings. Method 2 allows you to temporarily disable an alias without needed to reassign it, or logout of your session.

In conclusion, aliases are very commonly used within the shell environment. You may even be using an aliased command and not even know it! The ability to unalias a command and run it with its native settings can be helpful in many situations.

Categories: bash Tags: , , ,

Install Android Fonts (ttf-droid) on Arch Linux

March 13th, 2009 Christer 4 comments

I read a blog post recently outlining how to install the ttf-droid package — Android Fonts — on Ubuntu.  Because I’m using Arch Linux on my two machines at work I decided to look into the possibility of installing them on that platform.  Turns out, thankfully, the ttf-droid package is available in the Arch User Repository.  I’ve now switched both of my office machines to this new font set and I really enjoy it.  It has a very clean, crisp look.  It’s not boxy or thick like a lot of other fonts I’ve seen used (I’m looking at you, Fedora).

Here are the instructions on installing the ttf-droid fonts on your Arch Linux machine:

Yet Another User Repository Tool (yaourt)

If you are using the unfortunately named yaourt package management frontend you can install directly from the AUR using the command:

yaourt -S ttf-droid

If you are simply using pacman you’ll need to grab the PKGBUILD from the AUR and manually install.  No worries if you’ve never used the AUR before.  It’s really pretty simple.

Manual Install from AUR

Download the ttf-droid tarball

Unpack: tar xf ttf-droid*.tar.gz

cd ttf-droid

makepkg -i

At this point you should have the following fonts available to use:

Droid Fonts

Droid Fonts

Categories: Arch Tags: , , ,