Ubuntu Precise

ubuntu

I recently upgraded from Ubuntu Lucid (10.04) to Precise (12.04). Similar to my list of tips for Lucid and Fedora Core 3, here are some tips for Ubuntu Precise. (I’m running it on a Thinkpad X201).

  • I used to use xmodmap to swap the Caps Lock and left Control keys, but no longer. It’s evidently deprecated, and setxkbmap is now X.org’s preferred way to manipulate keymaps. This does the trick:

    setxkbmap -option ctrl:swapcaps
    
  • I used to use aumix as my volume control and mixer, but it couldn’t find the mixer device in Precise. I could have dug around for it, but instead I just switched to amixer, which works fine.

    …except that toggling mute with amixer ... toggle mutes ok but doesn’t unmute! A bit of investigation found that toggle mutes a bunch of channels, including (for me) Master, Headphone, PCM, and Front, but only unmutes the channel you tell it to toggle. Details in the bug report and these askubuntu questions. The solution is to toggle all of the channels explicitly:

    echo 'sset Master toggle
     sset Headphone toggle
     sset PCM toggle
     sset Front toggle' | amixer --stdin -q
    
  • On the topic of sound, it didn’t initially work on my laptop because /dev/snd/* weren’t world writable or readable. A quick sudo chmod a+rw /dev/snd/* fixed that, but it didn’t stick across reboots, so I put it in my .login. Oddly, my workstation didn’t have this permissions problem; it worked out of the box.

  • Precise’s NetworkManager package added nmcli and nm-tool, two great command line tools. No more clunky cnetworkmanager! I also hacked the status bar in notion (née ion3), my window manager, to use them to find the current network connection:

    nmcli -terse -field devices,name,state con status \
      | sed -r "s/activated/\*/; s/activating/.../; s/deactivated/X/; s/:/ /g"
    

    and Wifi signal strength:

    nm-tool | grep \*`nmcli -t -f name con status` \
        | egrep -o "Strength [0-9]+" \
        | cut -d" " -f2-
    
  • It’s not Precise-specific, but these AIM notifications have always annoyed me: AOL System Msg: Your screen name (mrEman) is now signed into AOL(R) Instant Messenger (TM) in 2 locations. I use Pidgin, so I finally looked around and found this plugin, which happily blocks them.

  • The font in Emacs changed, and it took me a while to figure out how to change it back. None of the usual methods (.Xresources, set-default-font) worked. I finally re-read the Fonts section of the manual and saw that the X resource is now emacs.font, not Emacs*font, which I’ve had in my .Xresources forever, but that still didn’t fix it.

    I finally figured out that --daemon in Emacs 23.3 now ignores anything related to windowing systems, including fonts. I have to run (set-face-attribute 'default nil :font "7x14") in Emacs after X is running. Sigh, oh well.

  • Is polkitd pegging your CPU and eating all of your RAM? Try restarting the DBUS daemon with sudo service dbus restart.

  • Here are some of the extra packages I installed:

    • apache2
    • apel
    • autocutsel
    • colordiff
    • emacs-goodies-el
    • emacs23-el
    • emacs23-lucid
    • exif
    • fbreader
    • flashplugin-installer
    • flickcurl-utils
    • gcalcli
    • git
    • imagemagick
    • imagemagick-doc
    • jnettop
    • lua-mode
    • lynx
    • mercurial
    • mercurial-git
    • mpg123
    • mplayer
    • mysql-client
    • mysql-server
    • php-elisp
    • php5
    • php5-cgi
    • php5-cli
    • php5-curl
    • php5-mysql
    • pidgin
    • python-mysqldb
    • rxvt-unicode
    • sshfs
    • sysfsutils
    • tkcvs
    • tp-smapi-dkms
    • udev
    • usbmount
    • xloadimage
    • xkbset
    • xscreensaver
    • xsltproc
    • yaml-mode

    …and I needed these to build notion, my window manager:

    • gettext
    • liblua5.1-0-dev
    • libsm-dev
    • libx11-dev
    • libxext-dev
    • libxinerama-dev
    • libxrandr-dev

Enjoy Ubuntu Precise!

Leave a Reply

Your email address will not be published. Required fields are marked *