Old blog posts
Here are some posts from an old blog where I occasionally made technical-ish notes. This is all horribly outdated, but I’m leaving it here in the hopes that it may help someone someday.
2009-12-26: brokenness after upgrading to karmic
Some stuff broke today when I upgraded my Ubuntu Jaunty machine to Karmic. Here’s what fixed the problems that I’ve run into so far:
The version of GDM in Karmic no longer runs ~/.xsession
at login. To add an xsession option to
GDM, create an /etc/X11/sessions/Xsessions.desktop
file containing:
[Desktop Entry]
Name=Xsession
Comment=This runs ~/.xsession
Exec=/etc/X11/Xsession
(from this bug report)
I also ended up with a long delay between entering my password and seeing the window manager start.
This page suggested
that xsplash may be to blame. Sure enough, /var/log/gdm/xsplash-user.log
showed the same
15-second delay and sudo dpkg --purge xsplash ubuntu-desktop
fixed it.
GDM’s “ready to log in” sound came back even though I’d previously disabled it in /etc/gdm/custom.conf
.
While I haven’t confirmed that it’s fixed yet,
this page suggests
that sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
will
take care of it (yes, it does).
I’m using Nvidia’s TwinView stuff to stretch the display over two monitors, and GDM’s login prompt now ends up on the right-most monitor instead of the left one. I haven’t tried to track this down yet.
I’ve noticed a few pops over my speakers when booting up / logging in / starting apps, so presumably something weird is going on between PulseAudio and ALSA.
A script that was using ruby’s xosd bindings suddenly stopped being able to find the Trebuchet MS font;
the upgrade process uninstalled the msttcorefonts
package, but it looks like the font is still
installed, and the XLFD that I was using looks like it works in xfontsel
. I switched the script
to use liberation.sans
instead and it seems fine.
Everything else seems okay so far. I was expecting encfs problems, but it worked after manually porting over
a change to /etc/pam.d/common-auth
.
Edit: I was a bit hasty; sound playback is hosed after a reboot. I was expecting it to be
the same issue that Jaunty had with everything getting muted at boot, but I still get nothing after
adjusting levels with alsamixer
. On a brighter note, I was sure that my laptop would be
rendered unbootable due to initrd vs. full-disk-encryption issues as happened after going from Intrepid to
Jaunty, but this upgrade seems fine on that front.
Edit again: Sound seems to be working after running gnome-volume-control
once.
Beware, the levels are kind of wonky (~30% in gnome-volume-control seems to equal 77% in alsamixer), so
don’t almost blow out your speakers and ears like I just did. I ran into problems with MPD hanging after
seeking a few times until I switched it to use PulseAudio instead of ALSA by replacing my old audio_output
section with:
audio_output {
type "pulse"
name "PulseAudio output"
}
and adding mixer_type "disabled"
. Who knows if it’ll still work after a reboot? I miss the
days when everything was controlled by easy-to-edit config files. :-(
One more edit: To make sound not muted at startup, I had to do the same thing as in Jaunty,
namely comment out the mute_and_zero_levels
call in the stop
handler near the end
of /etc/init.d/alsa-utils
. I’m happy to see that cpufreqd
works correctly now
— there appeared to be a kernel bug in Jaunty that erroneously rejected some frequency changes as invalid,
which resulted in my 1.835 Ghz laptop being always stuck at 1 Ghz, even when plugged in to AC.
2008-03-25: getting encfs set up on ubuntu or debian
Just so I don’t forget later, here’s how to set up an encfs directory on a Debian-like system such that the directory will be automatically mounted the first time you log in.
- As root, install the
encfs
andlibpam-encfs
packages. - As root, add your user account to the
fuse
group in/etc/group
. Log out and back in as your regular user. - As your regular user, run
encfs $HOME/.enc $HOME/enc
to create the filesystem. Choose the default options and enter your password. - As root, edit
/etc/pam.d/common-auth
to look like this:auth sufficient pam_encfs.so
auth required pam_unix.so nullok_secure use_first_pass
- As root, edit
fuse.conf
to look like this:user_allow_other
- As root, make
/etc/security/pam_encfs.conf
look like this:drop_permissions
fuse_default nonempty
<user> /path/to/.enc /path/to/enc -v allow_other
2007-12-18: making ctrl-u work in firefox
I try to avoid the mouse when I’m using my computer. In Firefox, I commonly want to clear the text in the
location bar and type in a new URL. Focusing the location bar is easy (Ctrl-L
), but GTK
doesn’t appear to have a default keybinding to clear a text entry. End, Shift-Home, Delete
works but has the unpleasant side effect of replacing the contents of the clipboard with the previous
location — I’m often clearing the location bar so I can visit the URL that was previously in the
clipboard.
You can tell GTK to use an Emacs/readline()-like keyboard theme by adding gtk-key-theme-name = "Emacs"
to ~/.gtkrc-2.0
, which allows you to use Ctrl-U
to clear text entries, but it also
adds a binding for Ctrl-W
, leaving you with no Firefox keyboard shortcut to close a window.
GTK added an “unbind” directive
that presumably would allow one to remove the Ctrl-W
binding, but it’s only present in 2.12
or later.
The solution is to just add the Ctrl-U
binding itself by putting the following into ~/.gtkrc-2.0
:
binding "gtk-clear-text-entry" {
bind "<ctrl>k" {
"delete-from-cursor" (paragraph-ends, 1)
}
bind "<ctrl>u" {
"move-cursor" (paragraph-ends, -1, 0)
"delete-from-cursor" (paragraph-ends, 1)
}
}
class "GtkEntry" binding "gtk-clear-text-entry"
class "GtkTextView" binding "gtk-clear-text-entry"
You can test your bindings with zenity --entry
.
(Most of this was cribbed from MozillaZine.
I don’t have the issues that the author describes with Firefox ignoring user-defined bindings, but I
suspect that may be because he/she is not unbinding the old Ctrl-U
binding before defining a
new one.)
2007-09-06: reinstalling apps on a Symbian phone after a hard reset
The Symbian Series60 3rd Edition OS (used on Nokia’s E61, E62, and E70 phones, for instance) can be more than a bit flaky. My E70 suddenly stopped receiving SMS messages a few days ago, and the only fix that I found was to perform a hard reset on the phone to wipe all my settings.
The list of installed applications persists across a reset. Furthermore, the phone will try to reinstall missing applications every time it starts up, and will pause for a while and then beep and give you a bitchy message if it’s unable to install any of the apps. You can see the missing apps in Menu → Tools → App. mgr., but the list unfortunately displays a hexadecimal GUID-looking-thing for each missing app instead of its actual name. I haven’t found any good way to get the name, so I’m stuck trying to remember what I had installed before the reset.
For reference, though, a00007a6.sis is
Y-Browser and
I think that 200018ff.sis is IM+, although I haven’t been able to install
it successfully. I don’t speak (or read) French, but a post on planete-nokia.com
(now owned
by a scummy domain squatter) appears to claim that you can delete a file using a program like Y-Browser to
make the phone stop trying to install an app. I couldn’t find the file on my phone.
I also had trouble getting Internet access up and running again after the reinstall. I’m on Cingular-I-mean-AT&T as a former AT&T Wireless customer (a.k.a. “Cingular Blue”). This means that I’m using mMode rather than MEdia Net. Nokia provides a service that will send you an SMS message containing settings for your phone, but I still didn’t have any luck after using it (“Nokia E70” → “WAP/GPRS” → “United States” → “AT&T (Former AT&T Wireless customers)” → “mMode”). To finally get things working, I had to go to Menu → Tools → Settings → Connection → Access Points, select the new “mMode” connection that was created by the SMS message, choose Options → Advanced settings, and clear “Proxy serv. address” and set “Proxy port number” to 0 for good measure. Whew.
I swear, one more problem and I’m buying an iPhone. :-(
2007-09-05: burning man clothing
I went to Burning Man for the first time this year and found that I brought too much of some things and not enough of others. I’m going to write down my experiences while they’re still fresh so I can refer to them next year.
- sturdy pair of shorts
- two t-shirts
- three pairs of socks and underwear (eww, just three?)
- long pants
- sweatshirt
- wide-brimmed hat
- sandals suitable for walking long distances on hard ground
- closed-toe shoes
- a dust mask or two
- closed goggles
- sunglasses, if sunniness irritates your eyes
- a plastic poncho, if you’re worried about rain
- two bottles of high-SPF sunscreen
You’re going to be disgusting after a week in the desert, regardless of your typical hygiene standards. I erred on the side of bringing too many items of clothing (which isn’t really a big deal; you’re car-camping, not backpacking).
Most days were sunny and in the 90s, and I generally walked around wearing just a pair of shorts, sandals, and my hat. It didn’t get as cold as I’d heard at night; I was generally okay wearing long pants, a t-shirt, socks, and shoes. There wasn’t more than a few minutes of rain, and I think I would’ve been fine just staying under shelter without raingear if there’d been more.
There were hour-long dust storms the last few afternoons, so don’t forget the dust mask. I had brought ventilated safety goggles and found that dirt got into my eyes when I was perpendicular with the wind. Swimming goggles would’ve been a better choice.
You’ll want to bring or borrow some costumes too.
More to come later.
2007-01-28: mpd in debian stable is unable to play some files
I had trouble for a long time getting the version of MPD in Debian
Stable (0.11.5-3) to play certain MP3 files through ALSA. See, for example, this one (old broken
link, move along, nothing to see here). I’d get errors from MPD along the lines of “problems
opening audio device while playing [filename] ALSA snd_pcm_hw_params_set_channels error: Invalid argument
”.
After looking at the files in question and seeing the patch given at http://mednafen.com/forum/index.php?t=msg&goto=643
for a similar error in a different program, I’m pretty sure that this is an issue with MPD trying to
output monaural MP3 files in stereo (maybe something is messed up in the files themselves that’s telling
it to do this). It seems to be fixed in the version in Debian Unstable, 0.12.1-1.