Posts Tagged ‘ubuntu’

Fixing Apache Installation after Upgrade to Ubuntu 14.4

October 31, 2014

After an LTS upgrade, my Apache was no longer working. The new version of Apache came with two significant changes to the configuration file.

Virtual Hosts The filter for including hosts from /etc/apache2/sites-enabled had been updated to only match paths ending in the extension .conf. More about it here (see post by augustin from Sep 17).

Permissions outside of normal Document Root The default permissions had become more restrictive disallowing access outside the normal document root. More about it here (see post by Irve from May 22).

Upgrade to Oneiric breaks VMWare Player

November 28, 2011

After upgrading the Ubuntu install on my laptop from Natty to Oneiric my VMWare Player failed to start. It gave a error about not being able to compile the wmmon module. The compile process reported errors like:

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:783:59: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)

The fix was to repeat the official installation instructions. No need to remove the old one first. This upped the major version number in the progress.

Binary Drivers and Kernel Updates

June 26, 2011

Binary drivers tend to be build against a specific kernel. When the kernel is updated the driver will break if not rebuild. Ubuntu has a mechanism for dealing with this, but it depends on the linux-headers-generic package being installed:

sudo apt-get install linux-headers-generic

Specific drivers may need a few hints to realize that they should rebuild (normally done at boot-time). This page covers the specifics for the proprietary nvidia driver.

Gnome 3 Reference

June 24, 2011

To be updated …

Gnome 3 themes on Natty

June 20, 2011

Installed Natty Narwhal (Ubuntu 11.04) and quickly became annoyed with the new ‘unity’ interface. The old ‘classical gnome’ option worked fine, but I decided to try installing Gnome 3 from PPA.

I ended up with some fallback theme. With some inspiration I managed to fix it using

sudo apt-get remove gnome-accessibility-themes gnome-accessibility-themes-extras
sudo apt-get install gnome-themes-standard

and then choosing the ‘Adwaita’ theme.

Maverick and rpy

December 30, 2010

The version of python-rpy and r-base-core does not match in the current Ubuntu. A workaround is suggested via the relevant ubuntu bug entry: Pull python-rpy from ppa:bigmadwolf/misc instead.

BOINC Control Issues in Maverick

October 27, 2010

A bug in upgraded Ubuntu 10.10 (Maverick Meerkat) installations has caused the boinc manager to lose its menubar. As a result the option to control the execution policy is gone.

The same control is available through the commandline,

boinccmd --set_run_mode always

for starting and

boinccmd --set_run_mode never

for stopping.

Enabling Audio on Macbook Pro and Ubuntu 10.10

October 13, 2010

An update to Maverick Meerkat disabled sound on my laptop (a 13″ mbp7,1). I got it working again by following this guide, which states that:

  1. Add to the end of /etc/modprobe.d/alsa-base.conf the following line:
    options snd-hda-intel model=mbp55
    The file can be opened by running: gksudo gedit /etc/modprobe.d/alsa-base.conf
  2. Save the file and reboot the computer

Regaining Lost Touchpad Preferences on Ubuntu 10.10

October 12, 2010

After updating to Ubuntu 10.10 – the Maverick Meerkat – I discovered, that I had lost the touchpad preferences on my Macbook Pro 13″ (mbp7,1). A quick-google revealed this post, describing the solution:

  1. Install the driver: sudo apt-get install xserver-xorg-input-synaptics
  2. Log out and then back in
  3. Open System>Preferences>Mouse and go to the Touchpad tab

Facebook chat revisited

February 12, 2010

Earlier attempts at connecting Empathy (under Ubuntu) to the facebook chat have proven short-termed[1,2].

In a bizarre twist of fate, the people at Facebook have put on their white hats and done the right thing by exposing their chat functionality under the banner of XMPP/Jabber. There is an official guide with step-by-step instructions for a few specific clients and the general information needed to connect any other client.

There also exists a step-by-step guide for Empathy. Do note, that when adding the account, you want to “Reuse an existing account”, and not “Create a new account”.

I might come up with some cleaner instructions …

Making BOINC work under Karmic

November 5, 2009

Since installing Karmic on my laptop, it has consistently failed to connect to the World Community Grid server.

Symptoms: When going the the ‘Messages’ tab of the ‘Advanced View’, one is greeted by lines of the form:

2009-11-05T12:56:47 CET|World Community Grid|Sending scheduler request: Project initialization. Requesting 1 seconds of work, reporting 0 completed tasks
2009-11-05T12:56:50 CET||Project communication failed: attempting access to reference site
2009-11-05T12:56:52 CET|World Community Grid|Scheduler request failed: Peer certificate cannot be authenticated with known CA certificates
2009-11-05T12:56:53 CET||Internet access OK - project servers may be temporarily down.

Solution: After some googling I came across this page, which basically gives a simple workaround:

sudo su
cd /var/lib/boinc-client
mv ca-bundle.crt ca-bundle.crt.backup
wget http://boinc.berkeley.edu/trac/export/16195/trunk/boinc/curl/ca-bundle.crt

I’m not convinced that it will survive an update though.

Measuring the Desktop

November 1, 2009

From time to time one needs to measure stuff on the desktop. You might – for instance – want to know whether some region of an image will fit nicely into some part of a webpage.

In ubuntu (both jaunty and karmic releases) the screenruler application provides an easily available mean to do just that. This application is available through a package of the same name and can be found in the menu under Applications -> Accessories -> Screen Ruler.

Screenshot of two instances of 'screenruler' application

The screenshot above shows two instances of screenruler along with the contextual menu (available through right-click or a menu button which appears when the mouse hovers over the ruler). Through this menu the metric can be changed. The length of the ruler can be changed by pulling in the ends and the orientation can be flipped by middle-clicking.

Sharing a network connection

October 28, 2009

Note: This applies to multiple flavors of Ubuntu; Jaunty as well as Karmic. Also, it might be generic to all distributions based on Network Manager.

At the university we have a eduroam-based wireless network. It has not been very dependable yet; sometimes you can log on, sometimes you cannot. It doesn’t seem to be directly related to signal strength.

It seems that Ubuntu – which uses Network Manager – is quite well suited for this environment. Our setup is based on two laptops; one which can connect to eduroam and one which cannot. These are connected by a standard ethernet cable. The laptop connected to eduroam is then set up to share the connection.

The Guide

First open up the network connections dialog. Do this by right clicking on the Network Manager icon in the notification area and choose ‘Edit Connections …’. In the ‘Wired’ tab, click ‘Add’ to add a new connection. Fill it out like so:

Add connection dialog box

The important parts are

  1. The method. This should be ‘Shared to other computers’.
  2. The unmarking of ‘Connect automatically’. This will make sure other connections (like DHCP) take precedence.

After confirming this dialog (by clicking ‘Apply …’) the list of network connections should look like this:

List of network connections

Thats it! When you whish to share a wireless connection, click on the network manager icon in the notification area and choose ‘Share Connection’ under ‘Wired networks’.

Facebook chat with Empathy under Ubuntu (Karmic)

October 26, 2009

Update 2: New solution.

Update 1: This no longer works for me. I’m getting the feeling that Facebook might be messing around with the protocol …

The solution for Jaunty seems to have degenerated.

I recently installed Karmic (Koala) Beta and decided to give it a try again. For me, installing the pidgin-facebookchat package and following the instructions at the relevant (bottom) part of the official documentations page regarding protocols. The experience is not entirely stable, but for a beta release I guess it’s ok.

Evolution unable to generate folder list

September 6, 2009

After a system freeze, evolution ceased to be able to generate the folder list for my inbox. The statusbar said Error While Generating message list. Clicking on the message popped up this dialog:

Error dialog

According to this bug report the issue might be linked to evolutions use of SQLite.

In the same bug report it was suggested that the following command might solve the issue.

cd ~/.evolution/mail ; for i in `find . -name folders.db`; do echo "Rebuilding Table $i"; sqlite3 $i "pragma integrity_check;"; done

I didn’t have sqlite3 installed, so I ran sudo apt-get install sqlite3 first. For me this command located a handful of files called folders.db and sqlite3 did find errors in one of them: ~/.evolution/mail/local/folders.db.

To make sure that I had the right file I ran

sqlite3 ~/.evolution/mail/local/folders.db "pragma integrity_check;"

which again presented the errors. In the bug report someone explained that missing folder.db files would be regenerated, so I tried stopping all evolution-related processes (evolution-data-server and evolution-alarm-notify will linger after exitting the main program) and removed the file. I then started evolution and everything came up nicely.

Radeon Mobility 7500 under Jaunty

September 2, 2009

Update 2: On a clean install of Karmic Beta, this was fixed out of the box.

Update: The config below results in some stability issues on my machine. It might be isolated and it might not be. But for me it triggers random restarts once a day or so and a reproducible restart when I try to run

cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x

which really doesn’t make sense. I have reverted to this xorg.conf (which is slow) and hope for the best in Karmic …

Original post:

Since the arrival of Jaunty Jackelope (Ubuntu 9.04) my laptop has performed miserably on the 2D side of things. It’s an IBM ThinkPad T42 2379-R4U. Thats an ATI Radeon Mobility 7500 with 32MB and a 1400×1050 screen.

Today I found this page and as a result my /etc/X11/xorg.conf now contains this device section:

Section "Device"
Identifier "Configured Video Device"
Option "AGPMode" "4"
Option "AGPFastWrite" "True"
Option "EnablePageFlip" "True"
Option "AGPMode" "4"
Option "AGPSize" "64"
Option "RingSize" "8"
Option "BufferSize" "2"
Option "EnableDepthMoves" "true"
Option "RenderAccel" "true"
# Eyecandy Stuff
Option "AccelMethod" "XAA"
Option "EnablePageFlip" "true
Option "DDCMode"
Option "SubPixelOrder" "NONE"
Option "ColorTiling" "false"
Option "MigrationHeuristic" "greedy"
EndSection

This gives me decent, but not great, performance.

Building DEB packages

July 28, 2009

A good starting point is the Debian Binary Package Building HOWTO. The postinst and prerm scripts can be placed in /DEBIAN/ and dpkg-deb will do the right thing when building the package.

The ubuntu wiki also has a nice introduction.

Installing STY files in Ubuntu

July 22, 2009

This article explains how to install a LaTeX style file – as found in CTAN – under Ubuntu.

Facebook chat with Empathy and Ubuntu

June 21, 2009

Update 3: New solution.

Update 2: With the forthcomming release of Karmic Koala this guide becomes (more or less) obsolete. This guide deals with the new situation.

Updata 1: This guide no longer seems to work for me.

This article explains how to configure Empathy under Ubuntu (9.04 Jaunty Jackelope) to interface with Facebook Chat.

On the technical side of things, the indea is to use pidgin-facebookchat – a libpurple plugin – through telepathy-haze – a telepathy connection manager based on libpurple – to establish and maintain the connection. The plugin can be used directly with Pidgin for similar results.

First, we need to install the needed packages (I assume that empathy is installed):

sudo apt-get install pidgin-facebookchat telepathy-haze

As described here and here you then need to do some fiddling. This might change in the future. What you need to do is:

cp /usr/share/telepathy/managers/haze.manager /tmp/
wget https://bugs.freedesktop.org/attachment.cgi?id=20810
sudo mv attachment.cgi?id=20810 /usr/share/telepathy/managers/haze.manager
wget https://bugs.freedesktop.org/attachment.cgi?id=20811
sudo mv attachment.cgi?id=20811 /usr/share/mission-control/profiles/bigbrownchunx-facebookim-haze.profile

Note: The two sudo lines will override any existing files. Since the first file should exist prior to the operation, one should make sure that nothing is removed from it during the operation. Do this by comparing /tmp/haze.manager and /usr/share/telepathy/managers/haze.manager. The latter should be the prior plus a section for the bigbrownchunx-facebookim protocol.

Seemingly random 403 errors on Apache

May 21, 2009

At some point I realized that apache was giving seemingly random “403 Forbidden” errors. This when under high load and yet, not really high at all. I would be able to trigger it by reloading some page a few times quickly in a row or loading a page with a lot of images.

The problem was mod_evasive, a module designed to protect against DOS attacks. The above usage pattern was being categorised as an attack and rejected. This page explains the details and this page explains how to deal with it in Ubuntu.

I did have to loosen up some settings, namely:

  • DOSPageCount 10 (the number of pageviews allowed within DOSPageInterval secs)
  • DOSSiteCount 10000 (the number of object requests allowed within DOSSiteInterval secs, that is images, stylesheets, javascrip files ...)

Creating a debian/ubuntu meta package

May 11, 2009

This article explains how to create a DEB-style meta package.

Creating a personal APT repository

May 11, 2009

This guide seems to explain it all.

You may run into errors of the form:

$ reprepro -Vb . includedeb jaunty /path/to/package.deb
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$ reprepro -Vb . dumpreferences
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$

In that case, try removing all from the “architectures” line of nano conf/distributions.

Dealing with AppArmor

January 19, 2009

Ordinary file-permissions are apparently not sufficient anymore. Ubuntu, and others, therefore uses AppArmor to associate programs with certain permission filters.

One such program is MySQL. When changing the datadir, it will most likely land somewhere outside the permissions granted by AppArmor and as a result fail. I would get errors (from /var/log/syslog) of the form:

Jan 19 00:41:12 asjo kernel: [262573.788599] type=1503 audit(1232322072.553:28): operation="inode_permission" requested_mask="r::" denied_mask="r::" fsuid=116 name="/vol/mysql/" pid=18262 profile="/usr/sbin/mysqld"

Others were having similar problems, as described in this thread among others.

This page solved my problem. Basically, you first put AppArmor in complain-mode regarding the specific program (in this case /usr/sbin/mysqld) by running this command:

sudo aa-complain /usr/sbin/mysqld

This will temporarily turn off the security and log the offending actions. Generate the offending actions by running the program:

sudo /etc/init.d/mysql start

Next you run

sudo aa-logprof

When asked if I wanted to “enable access to the profile repository” I answered L for ‘later’. Next it displays the offending action previously logged, at which point a allow it by answering A. At this point I am asked if I would like to save the changes. S for yes (save).

In order to re-enable security you simply run:

sudo aa-enforce /usr/sbin/mysqld

Pidgin unable to confirm certificate for rsi.hotmail.com

January 11, 2009

Today pidgin started displaying errors saying that it was unable to confirm the root certificate for rsi.hotmail.com. It turns out to be a missing ‘pem’ file on my Ubuntu Intrepid Ibex (8.10) desktop.

It can easily be fixed by following this guide.

Missing sound after resume on Intrepid

December 7, 2008

After upgrading from Ubuntu Hardy Heron (8.4) to Intrepid Ibex (8.10) my audio has been prone to stop working after resuming from suspend. This is caused by bug #275630. The temporary bugfix is to hit CTRL-ALT-F6 followed by CTRL-ALT-F7.

Return of the broken ACPI laptop disk problem

November 4, 2008

As reported earlier some laptop disks have a broken bios. The mentioned fix works for Hardy Heron (Ubuntu 8.04), but won’t work for Intrepid Ibex (Ubuntu 8.10). Bug 59695 seems to cover it.

Running this script by hand seems to solve it.

Gimp 2.6 released

October 1, 2008

The Gimp, version 2.6, was just released. Release notes are here.

Guide for installing under Ubuntu Hardy Heron (8.04) here.

Building UFRaw on Ubuntu

July 19, 2008

UFRaw is a free converter for RAW images. Like so many others it is based on DCRaw. The latest official release is from late 2007. This is more or less what is provided by Ubuntu.

The current CVS holds a few interesting additions, most noticeable the use of lensfun for doing lens corrections. There is a demo.

The following steps made the CVS compile for me. The result will be placed within the confines of /opt/ufraw-cvs/ and dpkg.

First we need to get the lensfun packages. I found some at this location. Add the following lines to /etc/apt/sources.list (use su to become a privileged user):

# lensfun
deb http://mirror.pcode.nl/ubuntu/ hardy lensfun

Next, install needed deb packages:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install lensfun-data lensfun-manual liblensfun0 liblensfun0-dev
sudo apt-get install libgtkimageview-dev libgtkimageview0

In case you don’t have a /opt directory:

sudo mkdir /opt

Then build the programs:

cd /tmp
cvs -d:pserver:anonymous@ufraw.cvs.sourceforge.net:/cvsroot/ufraw login
cvs -z3 -d:pserver:anonymous@ufraw.cvs.sourceforge.net:/cvsroot/ufraw co ufraw
cd ufraw
./autogen.sh
./configure --prefix=/opt/ufraw-cvs
make
sudo make install

And you should then be able to run UFRaw:

/opt/ufraw-cvs/bin/ufraw

Danske Bank og Java

June 5, 2008

This post is in danish. If you do not read danish you will not find this of interest.

Danske Bank‘s netbank benytter Java. Under Ubuntu Hardy Heron betyder det, at man har valget mellem sun-java5-plugin, sun-java6-plugin og de mere eksotiske udgaver. sun-java6-plugin lader kun delvist til at virke og virker ikke de vigtige steder. Eftersom de tidligere har haft problemer med Java er det nok fair at gå ud fra, at de eksotiske implementationer heller ikke virker. Efter at have installeret sun-java5-plugin lader tingene til at virke.

Official Ubuntu VmWare images

March 23, 2008

Ubuntu provides some ‘official’ VmWare images here. These can be played using the VmWare Player. Password is ‘ubuntu’ without the quotes.

Images for Hardy Heron are not up yet, but then again it hasn’t been (officially) released yet.