Sony VAIO Power Management as a Limited User

I recently switched to running XP as a limited user after getting a virus. However, I soon realized that I couldn’t use my Sony VAIO S260’s power management features anymore. When I went into the VAIO Power Management tab, everything was grayed out. Logging in as Administrator, I could create profiles, but then I wouldn’t be able to see them in a regular user. Here’s the solution:

  1. Allow the limited user account (LUA) to change power options. This will let you change the Windows built-in options, but not the VAIO-specific options.
  2. Temporarily make your LUA administrator either manually (requires logout/login) or using MakeMeAdmin.
  3. Open up the Power Options control panel (powercfg.cpl).
  4. Set up your power profiles as you want them, using the VAIO Power Management tab. These will be visible since they’re created in your own user account, rather than Administrator’s.
  5. Now you’ll be able to switch between profiles without using MakeMeAdmin–just click the battery icon in the notification area. Changing the VAIO-specific options of profiles still requires MakeMeAdmin though.

Using Charts in LaTeX

Finding out how to get my charts into LaTeX took way longer than it should have. First, I tried pasting it into a Writer document and then using Save As Picture, but its EPS output resulted in 0-byte files, SVG output was broken, and raster images came out at screen resolution. (I couldn’t find a way to export higher-resolution charts in Excel either!) So here’s how I finally did it:

  1. Copy and paste the chart from Calc into Draw.
  2. Export the drawing as PDF.
  3. Use pdfcrop <image.pdf> (provided in the texlive-extra-utils package on Ubuntu 8.10) to crop out the whitespace
  4. Now just use the image with includegraphics{image-crop.pdf}.

The results are crisp and clean. Amazing!

Cryptic errors from mod_fcgid and Perl

For future reference, the cryptic error from mod_fcgid:

[Thu Feb 12 22:10:27 2009] [warn] (104)Connection reset by peer:
    mod_fcgid: read data from fastcgi server error.
[Thu Feb 12 22:10:27 2009] [error] [client X.X.X.X] Premature end of
    script headers: dispatch.fcgi

means that dispatch.fcgi failed to start. Possible reasons are:

  1. Missing Perl modules. Unfortunately, I don’t know where the stderr output ends up. Try running the script directly; e.g. perl dispatch.fcgi.
  2. Missing Perl modules that you installed locally (e.g. local::lib) but Apache doesn’t have it in $PERL5LIB.

Remember that the folder must not be group-writable, and that any executable must be run from the directory root that suEXEC was compiled for! These will fail with a more useful error though, complaining of “suexec policy violation: see suexec log for more details” (the log is at /var/log/httpd/suexec.log for CentOS systems).