Archive for August, 2010

2010-08-31

Living with Lucid: AppArmor strikes

AppArmor and NFS appear not to mix in 10.04.  Here is a good AppArmor overview.  The short version:

sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disabled

or

sudo aa-complain /etc/apparmor.d/*

The hint: An obtuse error about gnome2_private/accels: Permission Denied, coupled with kernel audit errors in dmesg.

Ugh.  At least SELinux tells you something that you can work with.

Advertisements
2010-08-29

LXDM and Ubiquity don’t mix either

Here’s another strike against LXDM:  Ubiquity, Ubuntu’s installer, doesn’t play nice with it with Wubi.

Wubi basically copies the ISO to the hard drive and then boots a custom grub boot that feeds ubiquity a preseed set of instructions on how to install into the Wubi-created loopback device.  Unfortunately, this only works with a handful of Linux display managers.  We had to dump lxdm for gdm in the labs, as lxdm can’t deal with NIS accounts.  Now we have had to dump it on the Live CD as well.  It’s too bad, too, as I’m not a GDM 2.30 fan at all.

2010-08-29

1.8″ ZIF PATA Enclosure instruction

I recently replaced the 1.8″ ZIF PATA drive in my HP 2710p with a solid state drive.  I love it.  It’s now completely silent except under the heaviest of loads, and it’s quite a bit faster in both Linux and Windows.

However, I saw no sense in having a perfectly good small, slow, 80GB drive hanging around on a shelf, so I bought a USB enclosure for it.  There are loads of these on ebay for a couple of dollars, so what the heck?

The enclosure arrived but for the life of me, I couldn’t figure out how to put the ZIF cable into the HD.  Well, after much poking around, I finally found some reasonable instructions.  Now all is well.

ZIF stands for Zero Insertion Force.  It was certainly greater than zero for me.  Sheesh.

2010-08-16

LXDM and NIS authentication don’t mix.

Eeep.

2010-08-11

My Butter Tea Latte

And now for something completely different.

I’ve been reading up on Buddhism quite a bit lately and one thing that has been mentioned a few times is Tibetan butter tea.  In Tibet, it is apparently made with rancid dri (female yak) milk.  Obviously, that’s in short supply here.

My butter tea latté

I searched on-line for a few recipes and found ones that called for blenders, made mass quantities etc.  I also looked for butter tea somewhere from a restaurant to see what it should taste like.  It turns out that the closest restaurant serving butter tea is in Toronto.  Having tasted the real thing (or at least as close to it as you can get here) I have come up with my own recipe that makes use of the milk frother on our espresso maker.  It isn’t as good as what was served at the Little Tibet Restaurant but I can swing it and find it less trouble to make than digging out a blender.  Here’s the scoop:

  • Make a decent black tea with about an inch of clearance at the top of the cup.  Let it steep for 5 minutes, remove the tea bag/pouch.  I prefer black lose leaf.  I’m using “Sylvakandy” at the moment but have been told that “Tou cha” leaves are best.  I haven’t found them in Kingston.
  • Add 1/4tsp of salt, stir
  • Melt a tablespoon+ of unsalted butter in the microwave
  • Add this to about 1/4 cup of milk
  • Froth the milk/butter
  • Slowly add milk/butter to the tea while stirring
  • Enjoy slowly

The butter tea in the restaurant was very thick, buttery and relaxing.  I haven’t completely recreated it but I’m getting close.  One recommendation I have is not to skimp on the salt or butter.  If you can, I heartily suggest making the trek to your closest Tibetan restaurant for the real thing as a point of reference.  I found it to be quite the pleasant experience.

2010-08-08

Living with Lucid: New System Setup

Here is the summary of what I change/add when setting up a new Linux box after first uncommenting backports, partner, updates, and replacing the sources with my local mirror:
:%s/us.archive.ubuntu.com/ubuntu.caslab.queensu.ca/

At work:

# TB, FreeNX, Font, latest Firefox 10.04

sudo add-apt-repository ppa:ricotz/ppa && sudo add-apt-repository ppa:freenx-team/ppa && sudo add-apt-repository ppa:webupd8team/ubuntu-font-family && sudo add-apt-repository ppa:mozillateam/firefox-stable; sudo apt-add-repository ppa:bisigi/ppa

# Reasonable dev, latex, env. pwgen, tb, freenx.

sudo apt-get update && sudo apt-get install mc vlc pyroom gimp slingshot audacity nautilus-open-terminal chromium-codecs-ffmpeg-extra xul-ext-flashblock mozplugger openjdk-6-jre openjdk-6-jre-headless ttf-liberation ttf-mscorefonts-installer ttf-ubuntu-title inkscape xaralx lyx latex-beamer gnome-network-admin gstreamer0.10-plugins-ugly ttf-dejavu ttf-droid slingshot fbreader pingus libmp3lame0 build-essential fakeroot vco-plugins tap-plugins swh-plugins rev-plugins mypaint thunderbird latex-xft-fonts thunderbird-gnome-support freenx-server build-essential automake cmake libboost-all-dev libvtk5-dev libvtk5-qt4-dev jedit glutg3-dev libghc6-glut-dev libglui-dev libghc6-opengl-dev eclipse-jdt eclipse netbeans flashplugin-installer ttf-ubuntu-font-family openssh-server denyhosts pwgen

# If it's 64 bit:
sudo apt-get install ia32-libs

# VirtualBox 4.1 instructions from UnixMen

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free"

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

sudo apt-get update && sudo apt-get install virtualbox-4.1

# TB, FreeNX, 11.04

sudo add-apt-repository ppa:freenx-team/ppa # change /etc/apt/sources.list.d/free* to point to lucid still.

# Reasonable dev, latex, env. pwgen, tb, freenx, 11.04.

sudo apt-get update && sudo apt-get install mc vlc pyroom gimp slingshot audacity nautilus-open-terminal chromium-codecs-ffmpeg-extra mozplugger openjdk-6-jre openjdk-6-jre-headless ttf-liberation ttf-mscorefonts-installer ttf-ubuntu-title inkscape xaralx lyx latex-beamer gnome-network-admin gstreamer0.10-plugins-ugly ttf-dejavu ttf-droid slingshot fbreader pingus libmp3lame0 build-essential fakeroot vco-plugins tap-plugins swh-plugins rev-plugins mypaint thunderbird thunderbird-gnome-support freenx-server build-essential automake cmake libboost-all-dev libvtk5-dev libvtk5-qt4-dev jedit glutg3-dev libghc6-glut-dev libglui-dev libghc6-opengl-dev eclipse-jdt eclipse netbeans flashplugin-installer ttf-ubuntu-font-family openssh-server denyhosts pwgen

Expire the initial password for the new user

passwd -e NEW_USERNAME

Reasonable TeX setup

sudo apt-get install dvipng groff iamerican ispell lacheck latex-beamer \
latex-xcolor libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libaudio2 \
libboost-regex1.40.0 libboost-signals1.40.0 libjpeg-progs libmng1 \
libnetpbm10 libqtcore4 libqtgui4 librsvg2-bin libt1-5 \
libtiff-tools lmodern luatex lyx lyx-common netpbm pgf \
preview-latex-style prosper ps2eps psutils tex-common \
texlive-base texlive-bibtex-extra texlive-binaries texlive-common \
texlive-doc-base texlive-extra-utils texlive-font-utils \
texlive-fonts-recommended texlive-fonts-recommended-doc \
texlive-formats-extra texlive-generic-extra texlive-generic-recommended \
texlive-latex-base texlive-latex-base-doc texlive-latex-extra \
texlive-latex-extra-doc texlive-latex-recommended \
texlive-latex-recommended-doc texlive-luatex texlive-math-extra \
texlive-pictures texlive-pictures-doc texlive-plain-extra texlive-pstricks \
texlive-pstricks-doc texmacs texmacs-common texmacs-extra-fonts tipa \
transfig ttf-lyx wcatalan xaw3dg xfig xfig-libs

Bind Windows key to show desktop

gconftool-2 --set /apps/metacity/global_keybindings/show_desktop --type string "Super_L"

Reasonable dev environment
More additions to come when I think of them.

sudo apt-get install build-essential automake cmake libboost-all-dev libvtk5-dev libvtk5-qt3-dev libvtk5-qt4-dev jedit glutg3-dev libghc6-glut-dev libglui-dev libghc6-opengl-dev

Other Miscellaneous software

Rotate script for my 2710p


#!/bin/bash
#get current setting
testrot=`xrandr -q |grep LVDS1 | awk '{print $3}'`
#test if screen is rotated in protrait mode
if [ "$testrot" = "800x1280+0+0" ];then
xrandr -o normal
xsetwacom set "Serial Wacom Tablet" rotate NONE
killall onboard
else
xrandr --output LVDS1 --rotate right
xsetwacom set "Serial Wacom Tablet" rotate CW
fi

Some of my favourite packages:
(First uncomment backports and partner sources line in /etc/apt/sources.list)

sudo apt-get update && sudo apt-get install mc vlc pyroom gimp slingshot audacity nautilus-open-terminal chromium-codecs-ffmpeg-extra flashplugin-installer xul-ext-flashblock mozplugger localepurge openjdk-6-jre openjdk-6-jre-headless ttf-liberation ttf-mscorefonts-installer ttf-ubuntu-title inkscape xaralx lyx latex-beamer gnome-network-admin gstreamer0.10-plugins-ugly ttf-dejavu ttf-droid slingshot fbreader pingus libmp3lame0 build-essential fakeroot vco-plugins tap-plugins swh-plugins rev-plugins mypaint openssh-server denyhosts

Thunderbird 3.1

sudo add-apt-repository ppa:ricotz/ppa && sudo apt-get update
sudo apt-get install thunderbird latex-xft-fonts thunderbird-gnome-support

FreeNX

sudo add-apt-repository ppa:freenx-team/ppa && sudo apt-get update && sudo apt-get install freenx-server