Digital Life

Portfolio and blog of digital media artist Otto Salminen

Change “primary” display on OS X

April 23rd, 2008

Open system preferences -> displays -> arrangement. Just click and drag menu bar on display of your choice.

Server monitoring

March 5th, 2008

There are many alternatives to choose from when we are talking about *nix server monitoring. Just tested two, ntop and munin. Both comes with a nice browser user interface. Ntop is focused on network traffic monitoring. Munin draws nice graphs and it’s really easy to setup. I choosed munin for my file server because it gives a clear overview of used system resources.

Sharing a folder in local netwok

February 7th, 2008

Mounting a remote folder in local network with nfs is quite simple and the topic is covered in many sources before but this formula worked for me. This example is for Debian server and clients. All steps are done as root.

Setting up the server

1. Install packages for nfs server:

# apt-get install nfs-kernel-server nfs-common portmap

2. Edit exports file:

# nano /etc/exports

3. Add wanted clients:

/path/to/shared/folder client1-ip(rw,sync)
/path/to/shared/folder client2-ip(rw,sync)

Note. No space between client-ip and (permissions).

3. Load new settings and restart related services:

# exportfs -a
# /etc/init.d/portmap restart
# /etc/init.d/nfs-kernel-server restart
# /etc/init.d/nfs-common restart

Setting up a client

1. Install nfs support for a client:

# apt-get install nfs-common portmap

2. Test mounting with:

# mount server-ip:/path/to/shared/folder /path/to/local/folder

3. If that worked you can add it to fstab. Open fstab for editing:

# nano /etc/fstab

4. Add the nfs mount :

server-ip:/path/to/shader/folder /path/to/local/folder nfs rsize=8192 0 0

That’s it. Now the remote folder is automatically mounted every time the client is booted.

Binary Tree

February 4th, 2008

What kind of plant is binary tree? Never seen one alive but on this t-shirt it looks pretty neat. Binary tree actually means a tree where every branch has at most two child branches.

Infector Wars

February 3rd, 2008

Just finished a new visual theme for Vector Wars by pyMike.

GetDeb

January 24th, 2008

Found a nice source of fresh deb packages. Just download and install no compiling required.

Kaukajärvi freezes

January 5th, 2008

Winter is weird this year. Kaukajärvi freezes for a 10th time.

How to cd with sudo in Ubuntu

September 15th, 2007

In Ubuntu you cannot directly sudo cd folder. But in sudo bash you can.
So enter to bash mode:

$ sudo bash

Now you can sudo etc.

# cd

Leave sudo bash with exit-command:

# exit

Back up folder in tar.gz and split it to smaller chunks

August 6th, 2007

Making compressed archive from a folder:

tar -czvf destination.tar.gz source_folder/

Use split to slice the file. Slice size can be defined with -b option:

split -b 1100m destination.tar.gz destination_

To join parts use cat:

cat destination_a* > destination.tar.gz

To extract the compressed file:

tar -zxvf destination.tar.gz

Installing pyGame for OS X

July 24th, 2007

Find out the version of installed Python.
Type to terminal:

$ python -V

Load packages for your version of Python from:
http://pythonmac.org/packages/

Install needed packages:

  • pygame
  • PyObjC