Linux LoveCD
Last year I had a fairly, bleh, Valentine's day post. It was rushed, poorly done, and all over the place. This year, this year is different. You may notice that this is BEFORE Valentine's day... that's true. I'm putting this out early, with the same hopes as last year, that some geek out there might score a date for the rest of us! Now, my plan this year, is a personalized Linux LiveCD that I'm calling the LoveCD. So, this post is going to be 10 fun ways to personalize a CD for that special someone (or laptop, in my case).
Requirements
You're going to need the following:
- Knoppix Live CD. I'm using the most current as of this writing, 5.0.1.
- A nice sized directory (/home/snarky/data/programming/knoppix in my case) to do the editing on. At least 3 GB free.
- 1 GB of RAM, if you don't have enough RAM, make a GB of swap space.
- A sense of comfort with the Linux operating system, and all that goes into it (especially command line stuff). If you don't feel you can do part of this guide, don't bork your system, just pay me to make it for you.
Disclaimer(s)
I'm also kind of weird in the head, one might say, and like to continue long metaphors. So, throughout this article, I won't say "girlfriend", I'll use a computer term. It'll be in italics because otherwise this guide would get even more confusing!
This is my third try at this guide, the first two... didn't work as well as I'd like, so that's why I'm just telling you where to find the certain files you'll want to edit.
Setup
In order to edit this cd for your most significant bit, you'll need to get a good image on your hard drive. I recommend this guide from Knoppix.net. Once you get the compressed file system and all boot-necessary files into directories on your machine, then you can play around with editing the files.
The Editing
- First off, is the background. While I love advertising for Knoppix, my two's complement deserves to look at a better picture. Pick something of the two of you, or maybe a nice sappy heart, or something more romantic. By default this lives in /usr/local/lib/knoppix.gif. I think you know what to do here, that's right, overwrite that file with your sweet picture! This should be 1024x768, if you can at all manage it, as I didn't find out if the picture will be streatched, centered, or what.
- Next I had a great idea for the start up sound. Since this'll be the first impression of the custom LoveCD for your int main(), you want it to be something special to them. Yea, you'll have to hear it when you test the disc, but that's no excuse to give her a CD that boots up to a loud rendition of Weird Al's White & Nerdy. Actually, that's a great song, so maybe use that, but I digress.
This file is stored in /usr/share/sounds/startup.ogg (or .wav). If .ogg is there, that will be played, otherwise the wav will be. If you want to change the type of file, all the config of X is in /etc/X11/Xsession.d/45xsession. This is a nice big file, so I'll tell you if you're using my version of Knoppix its line 104, otherwise grep for a function called "playsound()". If you don't know shell scripting, don't try to edit this file, its huge and nasty, you've been warned. So, again just overwrite the original ogg file with one of your choosing.
- The low-res ASCII art that shows during boot can be changed also. This lives in the boot.img in the /boot/isolinux/ directory, and you'll have to mount that compressed directory in order to get at a file called logo.16. Put a GIF 640x400 image in there, and use the giftopnm command to get a .ppm file. From there you'll use ppmtolss16 to make a .16 file that will be able to be shown on boot. Since this is really *Not* good quality, it might be best to go with something black and white, and obvious even at low res.
- Also in that directory is /boot/isolinux/boot.msg. This is the boot message, along with some other stuff. DO NOT change the other stuff, bad things happen, but you can make the boot message be any single line of text you like. If you and your eliza have an inside joke, here's a great place to put it.
- Another fun thing I found is that index.html file you copied over to the master directory. This is displayed in a browser upon boot, so its the perfect place to leave some special crytographically signed message for the enigma in your life. Just open that file in vi, or any editor you prefer, and edit to your hearts content. I threw in a nice little personal message, and thought about recording a video message if I had a webcam. Could put a file:// link on the opening index.html to have them watch you say sweet things.
- If your primary hard drive has a specific profession you want to tailor the disc to, go ahead. If you chroot into the directory you're editing in, you can use apt-get (and an internet connection) to change what software is installed. The person I'd make it for would appreciate a bunch of the different games, but not the hacking utilities, so I'd make that change. Also, one can edit a program's settings to make thigns easier. For instance, I'd put their login information into GAIM (username only, no password) so that its real easy for them to jump on and say what an amazing job I did *evil grin*.
- Along the same lines, one can change individual user options by copying the skel user out of /etc, making it into a /home/knoppix directory, and chowning it to knoppix. Now you can change the .bash_profile, and everything that goes into having your own user. Personally, since I love easter eggs, I'd make their name into a command pointing to a script I made that spits out a random complement: "$name is {array of complements}". I learned long ago that random complements just make your day, even if you give it to yourself. Let them stumble across this little tidbit, or tell them yourself.
- One can edit the programs that start on logon, as with any machine. Currently it just launches Mozilla on index.html, but me I'd like to make some little widget type app that will mean something to them. That's vauge, but an idea might be popping up a window that rotates through pictures stored on the hard drive, a nice photo album viewer for good memories. Or (and this is more up my alley), pop up bitchX IRC set to log onto a certain server and channel. On this channel you have a bot that'll pass on some kind words just in case you're not there. "Hey $name, has anyone told you you're beautiful today?" "How are you this fine day, gorgeous?" Etc. That way they don't have to be at all technically competant to enjoy the surprise, and it'll happen every time they boot.
- I'm all about the command line, and think any Linux fan should know how to use it. So you can bet I customize my console colors and fonts, since I spend a ton of time in it. Why not do the same for your mainframe? If they have a favorite color (as all do) design a color scheme around that color to make things feel more like home. Obviously if they're not a coder or Linux nut already, this might go unnoticed. The file you're looking for is in /home/knoppix/.kde/share/config/konsolerc if you made the new user. Or you can use the trick of using chroot and your current X session to load Konsole, and setup the values yourself. Personally, I'm a fan on gnome-terminal, so I'd try to put that in instead, and throw a nice background image of a sunset on it.
- One of my favorite scripts is a little one I use to change my desktop. I just put a line in crontab calling a certain Python script, and every hour on the fifteen my background is changed to another picture from a certain directory. This can be perfect for a nice directory of a good handful of your most meaningful pictures: prom, wedding, the day your first server came home from the rack, whatever. If you've chrooted the filesystem, you can edit the crontab for your new knoppix user. Among other things you could tack onto here, I'd recommend a nice background changing script to make this disc change a little and keep them wanting to stay booted into it, rather than windows.
- And just because I like going the extra mile, the 11th change I'd make is going into the ~knoppix/.mozilla/firefox/{profile}/ directory, and making a bookmarks file. Give her a nice selection of her favorite You Tube videos, Flash games, and news sites right at her fingers. Oh, and if you're smart, also a link to your blog and photo site, just to get her comments.
The BURNING!
Now follow your favorite guide for how to make the ISO, and finally burn it, and you're done!
Final Thoughts
While this is really just a "haha, look how cute I can be" I thought that this might be a good gift from someone whose job takes them far away from home for a while. Now, they may not have access to the required devices, but a company could make these CDs at a small fee for two purposes. The first is it'll spread Linux, always a good thing, and the second is it gives one of the people in the relationship a nice, and usable, gift. One thought might be for soldiers stationed in God knows where who could use this as a sort of bootable photo album. Set up an FTP server to let them upload images for background, a video message for their family, and other assorted specific changes. Then it'd be as easy as copying over the base filesystem, overwriting a few, select files, and burning to CD. It could (probably) be automated. I'd actully, *really* like to try to get this up and running if I had the time. Heck, I'd be willing to do it for free, and just have a PayPal "donate if you like" link on the page to cover the small cost of CDs bought in bulk and (mainly) shipping. If anyone would be interested in helping me with this, drop me a line: snarky{at}thesnarky{dot}com.
Bet you didn't think I could keep the computer term as a girlfriend metaphor up, did ya? Its one I've used for a long time, so practice makes perfect, I suppose. I'm single, so don't get to find out just how romantic such a CD is, but if anyone has the guts to give this in a box of chocolates, PLEASE let me know!
If your little love array has never remastered a CD, they might not truly appreciate the hours and frustration spent doing this. It was a lot harder than I initially thought, though that may be because I was using a different version of Knoppix than I thought it was. However, I found a couple of guides to editing Knoppix CDs online, and the best (that I ended up using my first time) was from here. For a different distro, look at this Slax guide.