Posts Tagged ‘.deb’


Lightscribe for Ubuntu

5 April, 2009

lightscribe labeled disk
[Photo Courtesy Wikimedia Commons]

My laptop came with a lightscribe enabled CD/DVD-RW drive. After I switched to Ubuntu I set about looking for a program that would allow me to burn labels to my discs. It took a lot of digging and several tries to find a solution that worked, so I’ll share it with you.

First, we need the lightscribe driver that allows your computer to talk with the hardware. Download it and install as you would any other .deb.

Next, we need the labeling software. After trying a few different programs I’ve settled on the LaCie labeler (download). It’s only available in .rpm format, so after it’s downloaded we’re going to need to do a little terminal work.
To convert a .rpm to a .deb, we need a program called alien:
sudo apt-get install alien
Now we can use alien to run the conversion:
cd ~/Desktop
sudo alien -k 4L-1.0-r6.i586.rpm

A .deb package will appear on the desktop and you can install it normally.

Cool, now we have our labeler installed. Just a quick test to insure everything’s ready to go, and you can start burning labels.
Run the labeler:
gksudo 4L-gui
The gksudo is important because printing disks requires root access. Watch your terminal: if, like for me, it starts to whine about, you need to install one more thing:
sudo apt-get install libstdc++5

Finally, we need to add an icon to the applications menu so we can open the labeler easily. Right click on the applications menu and choose “edit menu”. Pick a submenu to place it (I chose graphics but it’s really up to you) then click “new item.” Think up a snappy name and enter “gksudo /usr/4L/4L-gui” in the command box. Hit close and then exit out of the menu editor.

Now you’re ready to start burning labels! A few hints to make your labeling as smooth as possible:

1. Lightscribe discs are specially coded so that they always start burning in the same place. If your label isn’t quite as dark as you want, just burn it again right over the existing label- it will line up perfectly.

2. Don’t leave lightscribe discs out in the sun or in excessive heat or they may fade. Because of the heat generated by computers, it may not be a good idea to use lightscribe for discs that are going to be sitting in your computer for long times, like music cds or dvds: nothing bad will happen to them except fading, though.

3. You can use any picture you want for a label but remember it’s grayscale only and the resolution isn’t great, so it’s best to use as simple an image as possible.

4. Hewlett-Packard (the kind corporate folks who make lightscribe) has a massive amount of disc designs for you to download free of charge in their Ideas and Design Center. Pick a theme pack and download the linux version, which is essentially a collection of image files that fit on a disc perfectly. Très magnifique!

COMING SOON: Lightscribe Labels for your Jaunty Jackalope LiveCDs!

UPDATE: If, after having followed the instructions above your lightscribe drive is not recognized, enter the following into your terminal:
sudo ln -s /usr/lib/ /usr/lib32/
sudo ln -s /usr/lib/ /usr/lib32/
sudo ldconfig


Uninstalling .deb Packages

29 March, 2009

.deb packages, for the uninitiated, are functionally equivalent to .exe’s in Windows. You download them and then run them and they install software, drivers, etc on your computer. They are somewhat more convenient than using apt-get in many situations and they often seem friendlier to newcomers. But beware, the .deb has a dark side.

Just like with apt-get, .deb’s each have a unique package name, and you need to know this to uninstall them. Unlike apt-get, there is no handy-dandy GUI equivalent to provide you with a list of packages currently installed should you forget this name. So, if you want to uninstall a .deb file but can’t remember the exact package name, be prepared to do some digging.

The first, fastest, and probably most painless way may seem a little unintuitive; download the package again. Go back to where you got it, download it again, and open it with gdebi package installer. It will show the package name along with various other tidbits of information. Once you have the package name you can delete the newly downloaded file, and then go seek and destroy the installed version. If this option is available to you, do it- it will save you many a headache. However, there may be times when it is not; if you don’t remember where you got it or it’s no longer available, etc. Don’t worry, it’s still possible to uninstall the file, I just can’t guarantee that you won’t want to kill yourself by the time it’s done.

Second method is to run a wildcard search using dpkg. This is also fairly painless, but it only works if the package name is somewhat obvious- which they aren’t always. The command to use:

dpkg -l '*keyword*'

Where keyword is any word or bit of word that might be in or close to the package name. Say I wanted to uninstall Open Office: a good keyword here would be open. The list of packages that comes up is pretty long, but Open Office is indeed there. You can narrow it down more but you risk accidentally cutting out the package you want. So keep your keywords as basal as possible.

If after running a wildcard search you still have not found your package name you will need to get somewhat medieval and search the installed packages by hand. It’s tedious, but there are a few tricks to  speed it up. If you think you know the first letter of the package, you can use a permutation of the previous command to narrow your list:
dpkg -l 'x*'
Where  x is your letter of choice.

You can also search through the packages using a semi-gui called aptitude. In your terminal:
gksudo aptitude
While not exactly intuitive, aptitude at least separates the installed packages into categories. The first place to check is the upper-level category “Obsolete and Locally Created Packages”. Chances are good your package is in there, but if it’s not you’ll need to sift through the other categories to find it.

Okay, so, assuming you haven’t just chucked your computer out the window by now, you probably have your package name. Now you can finally delete it! This may be a bit anticlimactic, but geekdom isn’t exactly known for edge-of-your-seat thrills. Here’s the command to nuke that son of a bitch:
sudo dpkg -r package

The whole process of uninstalling .deb’s is really quite annoying and I’m surprised some programmer hasn’t come up with a little tool to at least search packages efficiently. In all honestly, probably the best way to handle this is to keep a text file with the names of all packages you install via .deb. It’s inconvenient, but should the time come to delete the file you will be very happy you did it.