Procrastiblog

August 29, 2008

Using lp/lpr with CUPS

Filed under: Linux — Chris @ 4:12 pm

Ubuntu provides the traditional Unix lp/lpr commands via the cupsys-bsd package, but they annoyingly don’t pick up the CUPS default printer.
How do you identify your current default printer from the command line?

lpstat -d

How do you set your preferred default printer?

lpoptions -d PRINTER_NAME

Ah, yes. But how do you find the names of your installed printers?

lpstat -a

What’s all this good for anyway?

lpr [-P PRINTER_NAME] PS_OR_TXT_FILE
-OR-
enscript [-P PRINTER_NAME] TXT_FILE

Advertisements

August 27, 2008

Portrait of Frustration in Eighteen Commands: An Abbreviated History

Filed under: OCaml — Chris @ 4:28 pm
  354  ./configure --prefix=/home/chris/tools/builds/why
  359  godi_console perform -build godi-lablgtk2
  370  sudo apt-get install libgl-dev
  371  sudo apt-get install libgl1-mesa-dev
  372  godi_console perform -build godi-lablgtk2
  380  sudo apt-get install libglu1-mesa-dev
  381  godi_console perform -build godi-lablgtk2
  384  sudo apt-get install freeglut3-dev
  385  godi_console perform -build godi-lablgtk2
  391  sudo apt-get install tcl-dev
  392  godi_console perform -build godi-lablgtk2
  394  sudo apt-get install tk-dev
  395  godi_console perform -build godi-lablgtk2
  398  sudo apt-get install libgtkgl2.0-dev
  403  godi_console perform -build godi-lablgtk2
  404  ./configure --prefix=/home/chris/tools/builds/why
  408  make
  409  make install

Finding the Trash in GNOME

Filed under: Linux, Tech — Chris @ 12:56 pm
GNOME Disk Usage Analyzer

GNOME Disk Usage Analyzer

I somehow moved a file owned by root into the Trash, then I couldn’t make it go away: “Empty Trash” failed with permission problems. Thanks to the Ubuntu Geek blog—and especially commenter Ayenack—I found the secret location of the trash:

~/.local/share/Trash

The files in this folder can be chmod‘d and rm‘d just like any others (e.g.,

rm -rf ~/.local/share/Trash/*

is observationally equivalent to “Empty Trash”).

NOTE: The (otherwise very cool) GNOME Disk Usage Analyzer (aka Baobab) moves files to ~/.Trash—which is not the Trash—on “Move to Trash.” This is annoying.

[UPDATE 9/8/2008] If you do gksudo nautilus and delete files, then click on the trash icon in Nautilus it says, “The folder contents could not be displayed…” and “Empty Trash” is grayed out. But the files are in /root/.local/share/Trash, as you might expect. Just do

sudo rm -rf /root/.local/share/Trash/*

August 25, 2008

Being on television means never having to say you’re wrong

Filed under: Not Tech, Politics, YouTube — Chris @ 8:46 am

This video clip has been getting a lot of play in the liberal blogosphere (e.g., TPM):

In it, Mark Halperin says (with respect to the “how many houses” “controversy”):

My hunch is that this is going to end up being one of the worst moments of the entire campaign for … Barack Obama. I believe that this has opened the door up to not just Tony Rezko, in that ad, but to bringing up Reverend Wright, to bringing up his relationship with Bill Ayers…. It would have been hard for John McCain—given the way he says he’s going to run this campaign—to do all this stuff without the door being opened.

What’s interesting to me is that pretty much the entire panel jumps on him to say: that’s stupid, that’s illogical, that completely contradicts both objective reality and common sense. And he sticks to his guns, unfazed, and keeps making the argument for 2 minutes, 43 seconds.

It’s possible that Halperin is just exactly that blinkered and stupid. But it strikes me as the kind of argument I’d pitch over a beer and, after my drinking companions tore it apart, I’d shrug and say, “Yeah, that’s dumb. Forget it. I was just talking shit.” Maybe Halperin would say that over a beer, but he’s on TV. And on TV you never repudiate a stupid argument.

Annoying Things

Filed under: Not Tech — Chris @ 7:21 am

The most annoying thing in the world: when you’re saying something and your significant other is reading or watching TV or playing Scramble and not paying any attention to you.

The second most annoying thing in the world: when you are reading or watching TV or playing Scramble and your significant other won’t shut up.

August 19, 2008

Fun with Keyword Analysis II

Filed under: Not Tech, Waste of Time — Chris @ 8:13 am

I got a hit the other day on the search term “stolen whiskey”. I hope you found what you’re looking for, stranger.

August 6, 2008

Did Barack Obama Play the Race Card… Again?

Filed under: Not Tech, Politics — Chris @ 12:11 pm

Can you name a category of people (besides Republicans) who are often said to “take pride in being ignorant”? Here’s a hint. Here’s another. What is Barack Obama saying about John McCain?

Nota bene: Just kidding.

August 2, 2008

Camping at Wrights Lake

Filed under: Travel — Chris @ 5:48 pm


H at Grouse Lake

Originally uploaded by C+H

More pictures here

Create a free website or blog at WordPress.com.