Your Life, Better in Eight Minutes
August 26, 2007
I won’t make a habit of posting videos (unless they help establish a point, which I highly doubt will occur given the majority of videos on youtube are useless drivel), but this was good enough to share. Just enjoy it.
Spin DJ, spin!
Debian on a USB Thumbdrive++
April 24, 2007
There is a great guide by Dave Vehrs on how to install Debian to a USB thumb drive. I followed the guide, and had quite an adventure. While the idea was prompted by Dave, the result is entirely my own.
Features:
- Entirely functional bootable Debian Etch installation including window manager (fluxbox) on a 1GB USB drive
- 2.8GB of extended space via gmailfs, mounted through a script bound to a desktop icon
- Ability to detect and automount local filesystems
- 60mb partition that Windows can still utilize for transferring files (which is automounted when booting Debian)
- Auto-cleanup scripts that run on shutdown
The scripts and processes necessary to mock my implementation are pretty clear. I’m sure anyone with some spare time and the inclination could do the same. Here’s one hint: if you fry your USB stick (which I did while getting the partitions lain out correctly so it would both boot to linux but have a partition readable by windows), use HP’s usb recovery tool to bring it back to working order.
Back To School: Terminal Tips
September 30, 2006
Over the past week I’ve been doing a lot of tweaking to my shell environment, and helping others do the same. I’ve come across a few fixes and common things that people might find useful, so here we go!
The first is a script snippet to change your shell to bash on login. It only works in some environments, but for those of you who are desparate, throw this in your .cshrc:
if ($?prompt != 0 ) then
setenv SHELL_NAME /bin/bash
if ($SHELL != $SHELL_NAME ) then
set shell = $SHELL_NAME
setenv SHELL $SHELL_NAME
exec $SHELL
endif
endif
One of the more frequent questions I answer is how to get around having to type ‘./’ to run programs in your current directory. The answer is in editing your PATH variable. Throw the following in your shell’s rc file:
export PATH=.:${PATH}
In order to make use of colors in your terminal, you first need to be using a terminal that supports them, and then tell the tty so. To do this, you need to change your SHELL variable to something that supports colors:
export TERM=xterm-color
To make full use of your color supporting terminal, we can make use of newer versions of grep and ls to make output use colors. While we are doing this, we might as well make things more human friendly, so let’s make du and df print out human friendly data. Aliasing automatically replaces words you’ve specified in your .bashrc with the strings they’ve been aliased to, and allows us to do all of these things at once. Here are some examples:
# Aliases for making the command line human friendly alias df='df - h' alias du='du -h' # Make du and df always report human readable data alias ls='ls --color' # If your version of ls supports it, use colors alias grep='grep --color' # If your version of grep supports it, use colors
Finally, some misceallaneous tips. The first clears the *extremely* annoying issue of having a command line that doesn’t support backspaces or other common keys. Put this in your shell’s rc file:
stty sane
Some environments allow other users logged into the same machine as you to send messages to your terminal. This is annoying if your peers think it is funny to disrupt your debugging. To turn it off, just issue the following at the command line (to disable it for that session) or in your shell’s rc file as a permanent fix:
mesg n
And if you want to be one of those kids that interrupts someone else, don’t just write them stupid messages and giggle about it. It is much more entertaining to send an endless amount of gibberish to their screen. The following script will pipe data from /dev/random to another user’s terminal until you kill it:
#!/bin/bash echo "Enter a username: " read user dd if =/dev/random | hd -c | write $user
