Apparently, dpkg is so fsck-happy and ext4 is so poorly optimized for fsck
that a new Ubuntu install can take twice as long using ext4 as it would with ext3. Also, apparently, the solution to this is a wonderful little library called libeatmydata. This library basically causes fsck
calls to be ignored. Should you install libeatmydata
? Probably not, as you might guess from the name. If you install it, you risk losing much more data if your machine crashes than you would otherwise. It may also may pose a shutdown issue, since the OS will call fsck
before shutdown to help ensure that buffered data is written out to disk. The primary application for libeatmydata
seems to be for OS installs. If your machine crashes during an OS install, you'd probably just re-start the install. So, why waste your time with excessive fsck
calls?
Tuesday, November 23, 2010
libeatmydata
Thursday, November 11, 2010
Latex: Printing Letter vs. A4
I love the fact that math can be typeset so easily in Latex. But, I hate the fact that it can be so difficult to get it to format documents for letter paper. Previously, I've been able to edit /etc/texmf/dvips/config/config.ps
and either move "Letter" entries to the top and/or comment-out "A4" entries. That trick didn't work this time. What did work was to skip dvips and use pdflatex. Somehow, it was already configured properly ("p letter" in /etc/texmf/dvipdfm/config/config
) to use the Letter paper size. Not a problem since pdflatex works great and PDF is easy to print. I just wish someone would simplify the dvips configuration...
Friday, October 29, 2010
Another Smooth Ubuntu Upgrade
Just upgraded my desktop Maverick Meerkat 10.10 which is a tad more complicated than my laptop because it runs apache2 to serve web pages (including 2 trac instances) and weewx to log weather information from my weather station. Thankfully, the upgrade went smoothly. When prompted for what to do with my existing apache2 config, I made a backup copy, then asked to have it overwritten. When the upgrade was complete, I uncommented the server root and copied over the trac configuration sections. After restart, everything worked as before.
The only two minor hiccups were the font (didn't look as good on the desktop as it did on the laptop) and the version of Chrome. It downgraded my chrome from 7 to 6. 'course, both of those (extremely minor) issues were easy to fix.
Update (10/30/10): I realized the difference in fonts. It was technically the same font (Ubuntu), but different rendering. It chose "Best shapes" on my desktop which resulted in a very skinny font. Whereas on my laptop, it chose "Subpixel smoothing". The subpixel smoothing resulted in a much thicker font. So much so that it looked like a different font!
Tuesday, October 26, 2010
Ubuntu Window Border Thickness
When I use Ubuntu on a high-resolution monitor or on a laptop (which is appx. 100% of the time), I have difficulty clicking the border of a window to resize. Apparently, I'm not alone and this has been a standing issue for years. It seems to me that it would be trivial for them to add a configuration option under "Appearance Preferences"/"Theme"/"Customize..."/"Window Border" for frame/border thickness. But, it doesn't exist yet. However, if you don't mind editing XML, the above bug describes how to make the necessary change (at least for the default, Human, theme; it looks like changing other themes would be similar). Here's the process:
- Edit the XML config:
sudo emacs /usr/share/themes/Human/metacity-1/metacity-theme-1.xml
- Increase the values for
left_width
,right_width
andbottom_height
. - Restart the window manager (e.g. by logging out and back in)
Update (10/26/10): You'll also want to increase left_titlebar_edge
and right_titlebar_edge
to the same value. Also, AFAICT it's not possible to change the top/titlebar border. This is a bit of a pain since I frequently try to grab the top border for resizing.
Monday, October 25, 2010
Upgrading Ubuntu
Just upgraded my laptop from Lucid Lynx 10.04 to Maverick 10.10. It was (happily) largely uneventful. One thing that I had to figure out was that Upgrade Manager had been configured to only show long term support (LTS) releases, meaning it wouldn't pop-up the helpful "Upgrade" button. Once I changed "show new distribution releases" to "Normal", it showed the "Upgrade" button and the upgrade proceeded.
One touch I like in the new release is the use of round-er sans-serif fonts everywhere. Feels a bit more inviting than before. Python is 2.6.6 by default with 2.7 and 3.1 available. Unison has been upgraded to 2.32.52 which means that I'll need to upgrade my desktop before I can synchronize again.
Tuesday, September 14, 2010
Typing Breaks
I've written about my mild tendinitis in the past. As anyone with tendinitis who types will tell you, it's essential to run a program which reminds you to take breaks. I've recently been using Gnome's Typing Break feature. But, with the latest Ubuntu update, I found that it would lock up the screen for 5 seconds at break time without the chance to postpone. This, combined with the fact that the smallest break it allows is one minute spurred me to action.
I've since turned off Gnome's Typing Break and installed WorkRave. WorkRave is much more flexible, allowing any combination of small micro-breaks, larger rest breaks, and daily typing limits. I greatly appreciate the fact that it allows you to specify times in hours:minutes:seconds since my doctor recommends a 30 second break every 5 minutes. Another nice feature of WorkRave is that you don't have to stop working exactly when your time is up. It flashes a small, annoying sign, but doesn't lock-up the entire screen. This allows me to finish up what I'm immediately working on, then take a break.
Sunday, August 22, 2010
Emacs Fonts
I just upgraded to Ubuntu 10.04 and the "fixed" font is atrocious. "fixed" is what I've been using for years for emacs and xterm since it's the smallest I've found that looks reasonable and is easy to read. This Chris Lea article provides another good suggestion, "Monospace-10". It's a bit large. A commenter, Olle, notes that "Monospace-9" is a bit smaller and also nice. Olle also provides a good suggestion for how to set your font, the .emacs file:
(if (>= emacs-major-version 23) (set-default-font "Monospace-9"))This seems like a more reliable way than .Xdefaults, especially considering that the program name sometimes changes from version to version.
Update (8/22/10): I found my old-faithful. It's called "6x13" (how creative!). Yes, it can be set using .emacs code like above. However, "6x13" existed in prior versions of emacs. It worked fine when I used a (>= emacs-major-version 22) condition. Other fonts I discovered while looking for my favorite include "fixed-8" and "DejaVu Sans Mono-9" (same as Monospace?).
Update (8/25/10): How ridiculous! The .emacs setting only seems to work for the main/first "frame" (aka window). If I open a 2nd frame/window (C-x 5 2), it uses the hideous font. So, .Xdefaults appears to be the better way to set the font.