Archive for June, 2009

Permission problems with Samba

When mounting a samba share with smbmount, sometimes you get a permission denied error even though the remote user with which you have logged in has permission to read the file. The reason for this error is client side permission checking, this only makes sense when the user ids match the ones on the server.

To disable client side permission checking mount the share with the noperm option, for example:

sudo smbmount //myserver/myshare /mnt/myshare --username=user -o noperm

Tags: ,

Sunday, June 28th, 2009 Uncategorized No Comments

Dinomite.net » Setting Up Ubuntu for Building Kernel Modules

Setting Up Ubuntu for Building Kernel Modules

Filed under: Computers, Linux, Uncategorized — Tags: , , — Drew Stephens @ 2:16 pm

When you build kernel modules or other programs that depend upon the kernel you need to have the kernel source configured per the currently running kernel. To see what kernel your machine is running, simply run uname -a. To setup your machine to allow things to build against the kernel, you first need the source for your currently running kernel:

export KERNEL_VERSION=`uname -r|cut -d '-' -f 1`
sudo aptitude install linux-source-$KERNEL_VERSION
cd /usr/src/
sudo tar jxf linux-source-$KERNEL_VERSION.tar.bz2
sudo ln -s linux-source-$KERNEL_VERSION linux
ln -s /usr/src/linux /lib/modules/`uname -r`/build

First, in order to get things to build against the kernel you have to alter a single file to match the kernel you’re running. Run uname -r and note everything following the first three decimal-separated numbers:

$ uname -r
2.6.17-10-386

Just use a text editor (vi!) and edit /usr/src/linux/Makefile, changing the EXTRAVERSION variable to match yours from above:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 17
#EXTRAVERSION = .14-ubuntu1
EXTRAVERSION = -10-386
NAME=Crazed Snow-Weasel

Next, you need to get the .config for the running kernel and setup the kernel source:

sudo cp /boot/config-`uname -r` /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
make prepare0
make scripts

That’s it. Now you should be able to build things, like kernel modules, against the kernel source.

via Dinomite.net » Setting Up Ubuntu for Building Kernel Modules.

Tags: , ,

Thursday, June 18th, 2009 Uncategorized No Comments

Template classes in binary libraries

If you want to use templates inside a (binary) library, it is possible to compile specific instances into a library.

For example if you have defined the following class in a header file:

vector<typename T>

And you need integer and string instances compiled into a library, add the following declarations to the cpp file to compile the specified instances into the library:


template class vector<int>

template class vector<std::string>

You will be able to use the binary library and use vector<int> and vector<std::string>. When you try to instantiate the template class with a different type, you will get reference errors, because these instances are not compiled into the library.

Tags: ,

Thursday, June 18th, 2009 Uncategorized No Comments

Verifying global to local coordinate system conversion with Blender

  • make 2 empties A and B
  • give B the offset and rotation of the local coordinate system in terms of global coordinates
  • give A some point coordinates in the global system
  • make B parent of A
  • set B to 0,0,0 and rotation 0,0,0
  • unparent
  • check coords of A, that should be the local value
Friday, June 12th, 2009 Uncategorized No Comments