Making PDFs on Debian Etch

October 6, 2007

This are my notes on setting up a PDF printer on Debian Etch for the local machine (i.e. not as shared printer).

Install cups-pdf:

sudo apt-get install cups-pdf

Add a printer. I find that the browser-based configuration works better than the GUI versions (Foomatic-GUI and Gnome CUPS Manager):

  • browse to http://localhost:631/
  • Add a printer
  • Choose the type Generic postscript color printer rev4
  • Choose the location cups-pdf:/

The PDF files are put in a PDF subdirectory of your home directory (~/PDF). However, if you print while logged in as root (for example, the test page from the web interface), the PDFs usually end up in /root/PDF but once I found it in /var/spool/cups-pdf/ANONYMOUS.

One other thing to note is that it uses the title of the print job as the file name. The title is set by the program that’s printing, but if it is there is an existing file with the same name, it will overwrite it silently. Generally this isn’t an issue, but Firefox/Iceweasel uses the page <title> as the print job name, so if pages have generic/bad titles, you have to be careful.


Making images of floppy disks and CD-ROMs on Linux

October 6, 2007

I have several books that came with floppy disks or CD-ROMs. I’m worried about whether they’ll last and wanted to make copies of them. It is trivially easy on Linux:

dd if=/dev/scd0 of=/iso/book.iso

I got a rawread script that supposed solves some compatibility problems. I found that dd worked fine on two disks that the script had problems with. The script is called with

rawread.sh /dev/scd0 >book.iso

To mount a image (mkdir /media/iso directory first):

sudo mount -o loop book.iso /media/iso

For floppies, use /dev/usb0 (I have a usb floppy drive) and .img as the extension.


Linus on Debian: WTF?

August 24, 2007

So I am reading an interview with Linus Torvalds, and they ask him which distribution he runs, and he comes out with:

…the only distributions I tend to refuse to touch are the “technical” ones, so I’ve never run Debian, because as far as I’m concerned, the whole and only point of a distribution is to make it easy to install (so that I can then get to the part I care about, namely the kernel), so Debian or one of the “compile everything by hand” ones simply weren’t interesting to me.

Far be it from me to contradict the gospel, but that is just plain wrong. I used to use Red Hat, and now run Debian. While I switched because of the licensing, I was amazed at how great apt-get is. It makes maintenance so simple. My machines are totally up to date, and I spend almost no time doing it (unlike with Red Hat). And I am absolutely not a “compile everything by hand” kind of guy either.

This comment really lowered my opinion of him. It makes me think there’s more than a grain of truth in other sour grapes.


bash equivalent to the Windows "start" command line

May 30, 2007

One of the things that I missed when I moved from Windows to Linux was the start command, which would launch the correct program for a given file. Well, add the following line to ~/.bashrc to get it:

alias start=xdg-open

Then either logout/login, or run (the leading dot & space are important):

. ~/.bashrc

Now you can launch the appropriate file by doing

start artwork.png