MiniHOWTO: Save and recover full list of installed packages with dpkg

Posted in GNU/Linux, Ubuntu, howto with tags , , on April 22, 2008 by Pete Daniels

Oh, the things you catch flying by on the mailing lists! This tip comes from Ulrich Grün:

To make installation of your favoured packages more easy, you could save your list of installed packages from your old system, and then use this list for your new one:

dpkg –get-selections > list-of-installed-packages

dpkg –set-selections < list-of-installed-packages

then with aptitude with option ‘g’ or with synaptic or other packaging programme: installation of this list of packages. Maybe, an apt-get upgrade will do this as well (not tested)

One very important thing to note, as another poster in that thread brought up, is to always check the list and make sure you know what you’re doing before you use it as basis for an upgrade, especially if the list is from a different version (Gutsy to Hardy, for instance), or you could really hose yourself. But god damn, I can’t count how often I’ve looked for something like this! Thanks, Ulrich!

Still Bartering!

Posted in IRL with tags on April 15, 2008 by Pete Daniels

Here’s the spring barter list! Let’s make a deal!

  • A quality bike trailer
  • General bike knowledge (I need to learn how to fix this thing myself, it’s costing me a damn fortune)
  • Accounting/small business administration and startup knowledge (help me file my DBA and all that rot)
  • Shelving and storage of varying sizes for varying parts, from video cards up to minitowers and CRT monitors
  • Interior design expertise. If you can come in here and put together an organizational scheme that lasts me more than a month, as far as I’m concerned that’s better than money.
  • A flatscreen monitor or two

From now on I’m going to post a barter list in the middle of every month. I think barter is great business. I mean, what’s money other than a middleman? If I have a $THING_0 you need, and you have $THING_1 that I need, why would I instead take money and then go try to find $THING_1 somewhere else? Wasted effort and wasted capital. So drop a line or give a call if you can bring me anything on this hit list and you’re the market for our services, we will work something out. I always take staples; food, bulk whole bean coffee, cigarettes, etc. will pretty much always be accepted as payment.

Gimp MiniHOWTO: Make a black border around a selection

Posted in howto with tags , on April 12, 2008 by Pete Daniels

Okay, this was hard as hell for me to figure out, but once I did, it was appallingly easy, so I want to put this out there in case anyone else stumbles over it in the future. See the logo at the top of my page with the fist and the monitor? The original image of the monitor is a black image that I found in the “openclipart” package (which is chock full of fun stuff, btw, sudo aptitude install openclipart). Yesterday I was fucking with my business card layout, and I wanted to turn that monitor into a white image with a black outline so I can superimpose my text on it. Here’s how to do it.

Using the color select tool, I select the monitor. Ctrl-C Ctrl-V to make a copy of it as another layer. Flood fill that layer with white, then scale it down by a few pixels. Viola, a white monitor with a black outline!

It’s one of those things that if you’re not savvy, it takes you an hour to wrap your head around but once you do, you’re like, “Oh shit I’m an idiot!” So maybe this post can save someone else the embarrassment :)

-pd-

We’re still here!

Posted in IRL with tags on April 6, 2008 by Pete Daniels

It’s been quite a while since I posted something that was actually Guerrilla Tech-related, so much so that I’ve gotten a few emails asking me what’s going on. So here’s an update.

The day job’s been absolutely off-the-handle insane, and it’s occupied damn near every conscious moment for the last month and a half. But that’s okay, I planned for that, and the cash influx has been very welcome. Now that the anarchy at the office has begun to abate, I’ve been able to start returning my focus to Guerrilla Tech.

The Bad Vista campaign, of course, continues, and now that the weather’s turning and my bike’s fixed, pamphleteering shall once again proceed. I’m also working on getting a more traditional flier together with the same content, for hanging at bus stops and lampposts.

Also, in addition to the money that the day job’s been bringing in, I received a small-medium sized grant last week, and I’ve been kicking around ideas for how to spend it. There will be some local newspaper ads in the offing, I’m in the market for a cheap bike trailer, perhaps a new demo laptop (maybe a Cloudbook, they look damn nice and I feel that it’s an idea I should support). It’s funny, I’ve become so accustomed to running this show on zero dollars, that now that I’ve got a little cash to throw at it I’m almost at a loss as to how to spend it. If you ever have the opportunity to have this problem, I highly recommend it.

And that’s where we’re at. Waiting on a bolt of inspiration for the next bold stroke. Stay tuned.

-pd-

HOWTO: Compiling 101

Posted in GNU/Linux, howto with tags , , on April 3, 2008 by Pete Daniels

Quite often, on scanning some of the more n00b-oriented forums (fora?), I will come across the perennial “I have to actually compile something?! WTFOMFG! Linux is sooo not ready for the desktop! How the hell am I supposed to perform such brain surgery?” posts. Not that I’m picking on anyone. In fact, for the bash virgins, compiling source can oft be a source of fear and frustration, and I think one of the unintended side-effects of n00b-ready distros like Ubuntu and PCLinuxOS is that the “you should never have to compile anything” mentality, while good by itself (I use aptitude for installation of new software whenever possible), ultimately is a disservice to first-time users, because a month or five down the trail they’re going to run into something that’s not in the repositories that they want, and because no one’s ever explained to them what the compiling process is and how it works, they’re going to go apeshit like the (completely fabricated) fictional n00b poster above. The following is a ten-step recipe for compling code, and found on the Kubuntu mailing list, originally posted by Luís Silva, and reprinted here with his gracious permission. May it find the eyes that need to see it most.

A tar.gz is a set of files that was first archived with tar and then
compressed with gzip. You will also often find tar.bz2. The difference being
the compression utility used, in this case bzip2. tar itself can handle them
both.

Here is how it goes:
1- Create a folder named BUILD in your /home/YourUserName (This is just to
keep your home tidy!)
2- move/copy the tar.gz into this folder
3- I suppose you have already used the command line before. If you did the
above in the command line just cd to the BUILD folder. If not, open a
terminal, type “cd” (without the “) (this is to make sure you are in your
home folder), type “cd BUILD”.
4- Now you are in the BUILD folder, you are going to unzip and untar the file:
tar vxzf yourfile.tar.gz
The “v” is for verbose, the “x” is for extract, “z” is because you have a
gziped file (you should use “j” instead if you had a tar.bz2), and the “f” is
to say that the next word is going to be your file name.
5- now you should have a new folder there. Check it with “ls -hl”
6- “cd” to the new folder.
7- Each program in source code comes with one or several scripts that perform
the actual compilation and installation for you. Typically you have
a “configure” script there. Again, check it with “ls -hl”. Run it
with “./configure”
8- If you get any errors just post them here so we can help you going through
them. If don’t just type “make”. This should compile your program.
9- If everything went as expected, and you want to install the program in your
system type “sudo make install” and enter your password when asked for it.
10- That’s it. There are surely a lot of things I omitted. If you want to know
more about each command you used (and you should be learning about these)
type ‘man command’ on the command line (replacing command by what you want to
know about.

A nice thing about kde (I assume you are using kde) is that you have man, info
and help available in konqueror. So typing man:command, info:command or
help:command in the location bar gives you help on the desired command. For a
newbie I would recommend its EXTENSIVE use.

Ok! Have fun and keep trying. Don’t stop just because something didn’t work
the first time.

That’s great advice at the end. Don’t quit on it just because you can’t figure it out right away. Maybe you’re missing a library somewhere, or the configure script is looking for something that you do have, but in an unexpected place. Keep poking, put up forum posts, trawl IRC channels. Email the author if you have to. Everything worth doing is hard and scary the first time. There’s a whole big raft of people waiting to help you. Good luck!

-pd-

A brief letter to America regarding Barack Obama’s pastor

Posted in Election '08 with tags on March 28, 2008 by Pete Daniels

Dear America,

Have you all forgotten that our current sitting president thinks God told him to fucking invade Iraq?! And now you all decide to get worried about people’s religions? WHAT THE FUCK IS WRONG WITH YOU PEOPLE?!

Your pal,
Pete

1000, huh?

Posted in Meta with tags on March 21, 2008 by Pete Daniels

I broke a thousand hits last week, by the way. It’s actually kind of embarrassing, because the huge majority of them (about 800) are for the KDE4 howto I posted last month which was obsolete three weeks after I wrote (and spent a ridiculous amount of time on) it. But hey, if out of those 800 people (probably way less, the WordPress stats count hits, not visitors) I managed to reel in 25 regular readers, I’m fuckin’ thrilled. So, yeah. That’s neat, huh?

Today 1000 blog hits, tomorrow the world…

-pd-

Emacs tip o’ the day!

Posted in Emacs, GNU/Linux with tags , on March 17, 2008 by Pete Daniels

This Emacs tip brought to you by Steve Yegge!

Make Emacs prefer backward-kill-word over Backspace

Emacs Wizards try to avoid hitting the backspace key, because it’s just remote enough from home-row to be annoying. We make typing mistakes all the time, but if you type faster than about 50 wpm, it’s more economical to kill the entire word and re-type it than to painstakingly backspace to your error.

Here’s what you add to your .emacs file:

(global-set-key “\C-w” ‘backward-kill-word)
(global-set-key “\C-x\C-k” ‘kill-region)
(global-set-key “\C-c\C-k” ‘kill-region)

Note that because Ctrl-w was already bound to kill-region, a very important command, you need to re-bind something else to kill-region. I chose Ctrl-x Ctrl-k (and its sloppiness-forgiving companion, Ctrl-c Ctrl-k), primarily because that’s the way they did it at my old company, which was filled with wise Emacs Wizards who taught me a lot of what I know. Rebinding Ctrl-x Ctrl-k means it’s no longer available for edit-kbd-macro, but you’ll use that infrequently enough that it’s not something you’ll miss having a shortcut for…

For a more in-depth look at this tip and how to use it effectively, and nine count ‘em nine more great Emacs tips, check out Stevey’s “Effective Emacs” post!

Spotlight Application: HOWTO rock better, faster, harder with cmus (Part 1 of ?)

Posted in GNU/Linux, howto with tags , , on March 17, 2008 by Pete Daniels

I promised some more serious in-depth reporting now that my life has calmed down a little bit, so here we go with a walkthrough for a wonderful and underappreciated application, cmus. This post started as just a brief introduction, but as I dug into it, I realized this sucker was gonna get long. Also, although the documentation for cmus is really good, there’s a total lack of howtos for this application on the interwebs, and as Greg will tell you, we here at Guerrilla Tech are committed to caulking all the holes! (There’s a good story that goes along with that, but you know, never mind.)

So I’ve been idly looking at text-based audio players for a while, but yesterday I was sitting here playing Civ 4 on my Windows partition (I have a dual boot machine, Kubuntu/Civ 4) and was suddenly and irresistibly seized with the need to listen to some Nightwatchman right now. So I fired up the laptop and looked at some of my notes from last time I had this thought, and did a little google fishing for a non-graphical music manager. My criteria:

  1. Not a player, a manager. I’m demanding when it comes to my music management software. I run Amarok on my Kubuntu desktop and gmusicbrowser on my Gnome laptop. After experimenting with just about every free software music management/jukebox application that I could find in the repositories at least once, I am convinced that these two are absolutely the best of their breed (yes, that was two plugs for the price of one, slick, eh?). Music is a large part of what I do with my computer every day, I need a program that can keep up with my listening.
  2. Something with a relatively easy initial learning curve, and solid documentation. I don’t expect to master the program in half an hour (in fact, if I can master it in half an hour, it’s probably not what I’m looking for), but I should at least be playing music within half an hour.
  3. .mp3, .ogg, and .flac support.
  4. It must exist in the Ubuntu repositories.

Enter cmus, the c* music player. Install with sudo aptitude install cmus, fire it up with cmus, and we’re on our way. Let’s do a walkthrough, huh? (Remember, kids, for best results with any howto, always follow along in The Fabulous Manual! It’s quite comprehensive, and much of the material here was been lifted verbatim. I hope no one minds.) Read more »

The funniest thing just happened.

Posted in IRL with tags on March 10, 2008 by Pete Daniels

I was in the kitchen making a screwdriver, and something happened and I turned my head for a second and I just kept pouring and pouring. And then I turned back and the glass was half full of vodka, and I didn’t know what to do, so I just made it like that and drank it.

Now I’m going to bike to the grocery store with no hands. That’s the secret to bicycling when you’re drunk. It minimizes the number of limbs that you have to keep track of. Bye!

-pd-