Procrastiblog

April 2, 2008

Using an External Monitor or Projector With My Linux Laptop

Filed under: Linux, Tech — Chris @ 9:26 pm

For years, it was difficult enough to get my laptop working with an external monitor that I didn’t even bother trying: I would boot into Windows in order to give a presentation. (This is the only reason I ever booted into Windows (or have a Windows install).) It either got dramatically easier to accomplish this at some point in the last year, or I’ve been incredibly stupid all this time. Just in case, here’s how it works on my Dell Inspiron 6400 running Gutsy. My video card is an NVIDIA GeForce Go 7300

  1. Plug in the external monitor or projector. The monitor may work immediately (especially if you’re repeating this step after fiddling about below), but it may be at the wrong resolution.
  2. Open “Applications -> System Tools -> NVIDIA Settings” or execute sudo nvidia-settings on the command line. This utility is provided by the nvidia-glx-new package, which you should probably have installed.
  3. Choose “X Server Display Configuration” and click “Detect Displays” at the bottom of the screen.
  4. The external monitor should appear in the Layout pane. Click on it, then click “Configure”. Choose “TwinView” (which should hopefully not say that it requires an X restart).
  5. In the “Display” box, choose “Position: Clones”. This means that you want the same display to appear on both monitors. This is what works best for me, particularly for giving presentations. Having separate displays seems to confuse applications—for example, “Presentation Mode” in Evince will “center” the slides, displaying the left half of a slide on the right half of the laptop screen and the right half of a slide on the left half of the projector. It’s probably possible to tweak this with exactly the right viewport/workspace settings (ugh), but that’s not how I roll.
  6. If the display is smaller than the default display—the display’s square will be smaller in the Layout pane and the displayed area will be cropped on the screen—click on the
    default display in the Layout pane and choose a lower resolution. 1024×768 is usually safe. The laptop display will probably look bad, but the external display should look fine.

    Be careful: any smaller than 1024×768 and the Settings applet will be too big to display on the screen. If this happens, you’ll have to navigate blind or hit Ctrl-Alt-Backspace to restart X (or don’t automatically hit OK after the resolution changes and it will revert after 15 seconds).

To remove the external monitor or projector:

  1. Unplug the monitor.
  2. Click “Detect Displays”.
  3. A message “The display device FOO has been unplugged…” will appear. Click “Remove.”
  4. Click “Quit”.

Under no circumstances should you click “Save to X Configuration File” at any point in this process. That’s just asking for trouble.

Some sequence of actions—it’s not clear which—may screw up the “X Server Display Configuration” pane. The display will
continue to function in the meanwhile, but all the above commands are inaccessible. Restarting X made it go away (for me).

[UPDATE] It seems it’s necessary to update your xorg.conf to get decent resolution on some projectors. I’m still investigating… In the meantime, this should help.

Ted Turner is a Demented Genius

Filed under: Not Tech, Waste of Time, YouTube — Chris @ 12:01 am

I now have a man-crush on Ted Turner. (I’m going to have to get in line behind Charlie Rose.) Charlie tries and tries, but Ted Turner has no truck with interrupters.

My favorite part is where they debate whether he should invite Rupert Murdoch to his birthday party. I’m not kidding! It’s starts around 19:00. At 12:45, he sings an entire verse and chorus of “My Old Kentucky Home”! And Charlie just sits there with dewy eyes, like a bleach-blonde skank being serenaded by Bret Michaels!

UPDATE: The embed seems to have died, but the video is still at the Charlie Rose website.

March 24, 2008

LaTeX Appendectomies

Filed under: LaTeX, Tech — Chris @ 4:41 pm

I have need of a LaTeX package. I think a lot of people would find this package useful. I would prefer not to write it myself.

This package would take a mode argument in the preamble and format the document in one of three ways: as a conference submission, as a camera-ready conference paper, or as a tech report.

Suppose I have a theorem and that theorem has a proof.

  • In a conference submission, the theorem would appear in the main text and would be re-stated along with its proof in an appendix.
  • In a camera-ready conference paper, the theorem would appear in the main text and the proof would not appear at all.
  • In a tech report, the theorem and the proof would appear inline in the main text.

Preferably, proofs could be included in the main text or sent to an appendix on a case-by-case basis. Proofs could also have “sketch” versions and full versions: the sketch version appears in the main text of a conference paper (either kind) and the full version appears only in a tech report.

Suppose that, in proving a theorem, I first prove a lemma.

  • If the proof of the theorem appears in the main text (or an appendix), then the lemma and its proof should also appear in the main text (or the appendix), before the theorem.
  • If the proof of the theorem is omitted, or if a proof sketch is included which makes no reference to the lemma, then the lemma and its proof should not appear at all.

One should be able to conditionally include text depending on the mode. For example, in camera-ready conference mode, one would probably include the sentence: “Full proofs of all theorems appear in a technical report [citation here].”

The only package I’ve found that does anything like this is thrmappendix , but it doesn’t allow for a proof to appear in the main text at all. It’s primarily concerned with the appearance and re-appearance of the theorem, with or without its proof; I’m primarily concerned with the appearance or suppression of the proof.

March 22, 2008

The Big House

Filed under: Not Tech, Politics — Chris @ 5:25 pm

Via Matthew Yglesias, the best, most practical government reform idea I’ve ever heard: increase the size of the House of Representatives.

In 1789, the House had 65 members, each representing about 30,000 constituents. That number grew consistently for the next hundred years. In 1913, the size of the House was fixed at 435 members. At that time, each member represented about 200,000 constituents. Since then, the population of the U.S. has more than doubled. The average size of a congressional district is now 700,000 constituents.

Increasing the size of the house and decreasing the average size of a district.would have the following salutary side effects:

  1. It would be cheaper to run for office, making more districts competitive and decreasing the need for fund-raising (and, thus, the influence of money).
  2. It would decrease the influence of individual law-makers, thereby decreasing the amount of money to be gained from corruption.
  3. It would make both Congress and the electoral college (which is based on congressional representation) more proportional and, thus, more little-D democratic.

To illustrate that last point, consider Wyoming and New York. Wyoming has about 500,000 residents, 1 House member, and 3 electoral votes. New York has about 19 million residents, 29 House members, and 31 electoral votes. A vote in a presidential election in Wyoming is worth about 3.7 times as much as a vote in a presidential election in New York. If we doubled the size of the House of Representatives, a vote in Wyoming would be worth only 2.5 times as much as a vote in New York. If we reduced districts to 30,000 constituents each (this is the lower bound specified in the Constitution and would yield a House with more than 10,000 members—picture the Galactic Senate in Star Wars, hopefully with fewer Gungans), a vote in Wyoming would be worth only about 1.1 times as much.

Now obviously that last scenario is not going to happen. In fact, it’s hard to imagine the current Congress voting to make any change that would significantly reduce the influence of its own members. But the change doesn’t have to be that dramatic: literally any increase would be a change for the good. And the population keeps increasing, so the problem will just get worse and worse. Why not shoot for, say, 50 new members after every census, with a target of keeping or slightly reducing the current average district size? It would not require a Consitutional amendment: the size of the House is determined by statute, just as the number, size, and shape of congressional districts are.

For more information, check out thirty-thousand.org.

P.S. While I’m at it, you may notice at left a badge for Change Congress, a somewhat goo-goo attempt by Lawrence Lessig for create a movement to political reform. I’m not sure exactly how I feel about this (just as I wasn’t sure, as much as I admire Prof. Lessig, whether I really though he should run for Congress), but, if it doesn’t cost me anything, I might as well cast my lot with the wild-eyed dreamers of the world.

March 11, 2008

Flashdance

Filed under: Not Tech, Waste of Time, YouTube — Chris @ 11:59 pm

Here’s a video of me talking about Flashdance—a movie I had never seen before and plan to never see again—with my old friend Jonathan Betzler.

You know, I don’t think I’ve seen myself on video in ten years or more (I like to remember things my own way. Not necessarily the way they happened) and I find this… surprisingly un-excruciating. Maybe it’s a trick of the light.

Jonathan is threatening to do 23 more of these through the end of the year. (Last week was The Right Stuff. The rest will be posted here.)

February 7, 2008

Kids These Days: Prepare Yourself for the Final Quest

Filed under: Music, Not Tech — Chris @ 12:30 am

Why are the Bad Brains on MTV? (Seriously.) Am I so far out I’m back in again?

February 6, 2008

The Crank Becomes the Cranked, Part 2: The Gloating

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

The media did all they could for the last month to make this a winner-take-all race, but now everybody wants to talk about delegates. Go Obama! W00t!

January 27, 2008

The Crank Becomes the Cranked

Filed under: Not Tech, Politics — Chris @ 4:17 am

Thank you, New York Times!

Given Democratic rules, it is entirely possible for one candidate to win a majority of Feb. 5 states, and enjoy the election night ratification that comes with a TV network map displaying the geographic sweep of that person’s accomplishment, while his (or her) opponent ends the night with the most delegates.

On the Republican side, it is possible for one of the candidates to win the overall popular vote in California, but end up with fewer delegates than a rival, since most of the delegates are awarded in winner-take-all Congressional district races.

Read the whole thing (as they say).

January 24, 2008

The Triumphant Return of C-c C-t

Filed under: Emacs, OCaml, Tech — Chris @ 11:46 pm

The upgrade to Ubuntu gutsy and/or Emacs 22 broke my favorite feature of tuareg/ocaml-mode: C-c C-t for “show type” in OCaml buffers (this requires compiling with -dtypes, which generates type annotation files). I suffered without this for a length of time which is either embarrassing or impressive, depending on whether you consider poking around inside Emacs Lisp files a productive or unproductive use of time…

I finally broke down and fixed it today. The problem is simply that Emacs and OCaml packages aren’t cooperating properly. My solution, which may or may not be optimal, is as follows:

  1. Copy the directory /usr/share/emacs/site-lisp/ocaml-mode to a path of your choosing, say ~/.emacs.d/emacs22/ocaml-mode. Let’s call this directory DIR
  2. (Optional) In Emacs 22, execute C-u 0 M-x byte-recompile-directory and choose DIR.
  3. Add the following line to your .emacs file:
    (or (< emacs-major-version 22) (push "DIR" load-path))

The test for whether it worked is: load a .ml file and type C-c C-t. In the mini-buffer, you’ll either see “type: ...“; “Point is not within a typechecked expression or pattern“; or “No annotation file...” If it says “C-c C-t is undefined“, then you have failed.

January 20, 2008

The Delegate Strategy

Filed under: Not Tech, Politics — Chris @ 7:45 pm

So, yeah, I’m a crank, but I’m not alone:

At the end of the day, you need delegates to win. A strategy to win delegates seems like a smart strategy.

The current fake tally is:

Democrats
Clinton: 3
Obama: 1
Edwards: 0

Republicans
Romney: 3
McCain: 2
Huckabee: 1

The current real tally is:

Democrats
Obama: 38
Clinton: 36
Edwards: 18

Republicans
Romney: 59
McCain: 41
Huckabee: 26

So who’s the front-runner again?

That said, less than 3% of the total delegates have been allocated on the Democratic side (it’s about 6% on the Republican side—presumably because red states like South Carolina and Wyoming get proportionately more delegates). What I expect will happen is that Clinton (and probably Romney) will win a slim majority or plurality February 5 (“Super Tuesday”) and more-or-less clinch the nomination. (I am willing to make a wager on that proposition. Anybody?)

In the end, I don’t think the “emotional moment” in New Hampshire or “momentum” have much to do with Clinton’s success. I think she has solid, proven support amongst the Democratic electorate, which just happens to be slightly larger in magnitude than Obama’s.

In retrospect, the real question will be: why did Obama do so well in Iowa? With Huckabee, you can point to the evangelical factor. What’s the deal with Obama?

« Newer PostsOlder Posts »

Blog at WordPress.com.