Entries Tagged 'Linux' ↓

Disabling a cpu-core in Ubuntu

When we play unreal tournament GOTY it always runs bad on newer machines. One of my collegues found it the problem was the smp support of UT. Disabling all cores except the first on solved the problem. In Linux that’s like doing:

echo 0 > /sys/devices/system/cpu/cpu1/online

To get it back online:

echo 1 > /sys/devices/system/cpu/cpu1/online

More on cpu hotplugging.

Ubuntu 8.04 released

Ubuntu 8.04 (Hardy Heron) is released. And they have already provided some netboot/mini images too. I was looking for the jeos images. But that mirror seems down.

Nice! Ubuntu rocks!

Reading blog posts

I daily read a lot of blog posts. To keep up with what’s happening in the ruby/linux community and what’s the latests buzz in the webdeveloper world.

I’m now using google to keep track of the RSS feeds. I’ve used some desktop applications in the past (like rssowl and liferea). I think I’ll switch to a desktop application again. Liferea has the nicest gui. So I think about using that one.

I also found Blam! and Straw. But blam looks very gtk1-ish and the news for Straw hasn’t been updated in 4 months and has no screenshots. And you have to have good documentation as an open source project.

Tutorials on writing linux kernel device drivers (usb)

12 inch touchscreenMy boss recently bought some inexio touchscreens. Including a nice little 12.1 inch variant. I thought about using it in my living room for controlling audio et cetera. But alas, a no go. Because there weren’t any linux device drivers available for it. So I played with the idea of creating my own driver for it.

Examples enough: usbtouchscreen and mtouchusb. But how to start (I have totally no c experience). I think the biggest problem is getting to know the kernel api. After reading through the source code of some modules I realised that a lot of the lines were kernel macro’s & functions and just a little bit of real coding.

Searching for tutorials produced some nice results. But a lot of the tutorials were of a real “hello world” level. And very few (no?) tutorials/how to’s rose above the mediocre level. Some few I found:

Helpful, but not really geared towards my problem. So I ordered some books, asked the manufacturer for some info on the protocol (hope they will co-operate!) and spent a lot of time reading tutorials and source code.

But I still have a lot of questions. What is the best IDE (kdevelop I believe)? Why has no c IDE/editor descent auto-completion for kernel functions/macros? Where can I ask my question without being flamed to death?

When the driver is ready (or when the project has failed) I’ll post some tips and maybe a full blown tutorial on (not) writing device drivers.

Not installing the default nvidia drivers

Do you want to install the restricted modules but not the nvidia driver? I do! Because I want to install the newest & latests nvidia driver directly. Then read the following post:

http://ark.asengard.net/blog/2008/02/19/nvidia-api-mismatch/

But do not use “nvidia” but use “nv”. “nv” disables the three nvidia drivers.

Some great ideas in the ubuntu comunity

Lately, whenever I’m feeling bored and I don’t feel like programming or watching tv or anything (well, I can’t actually. Because my tv is not connected at the moment) I browse to the new Ubuntu brainstorm website. There are a _lot_ good ideas for Ubuntu (and some really, really, really bad ideas). And some ideas are already implemented by some piece of (open source) software.

For example, I found this one.

Installing all restricted extras in ubuntu

I always installed the flash plugin by hand, unrar all the codecs et cetera. But on the forum I found someone who recommended the package ” ubuntu-restricted-extras”. Did an apt-get install and I worked great! Installed all the stuff I needed:

[quote]
flashplugin-nonfree, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-bad-multiverse, gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-ugly-multiverse, libdvdread3, liblame0, msttcorefonts, sun-java6-jre, unrar
[/quote]

Installing jruby

I used this resource:

http://rorblog.techcfl.com/2008/02/19/create-and-deploy-a-jruby-app-to-the-glassfish-gem-in-10-minutes-or-less-on-mac-os-x/

How to install jruby on Ubuntu:

sudo -i
mdir -p ~/src/jruby/trunk
cd ~/src/jruby/trunk
svn svn.codehaus.org/jruby/trunk/jruby/ .
ant
~/src/jruby/trunk/bin/jruby --version

The current version doesn’t work to well with rails’ script/console. It is very, very, very slow. So I keep using Yarv until this is fixed. It seems really promising though. Can’t wait for Rubinius to become stable!

Ubuntu changed default editor

 Ubuntu changed the defaut editor to ViM? At least: my Hardy Heron installation suddenly changed editor. This is the command you can use to determine which editor you want to use by default:

sudo update-alternatives –config editor

The beauty of Ubuntu

A.k.a. “installing something that would take ages in another OS”

For a client of ours I’m doing a project. But I had to wait at my new house today for my new tiles. And at my new address I don’t have internet yet. So I made a local copy of the project and had to install apache, mysql and phpmyadmin.

sudo aptitude install libapache2-mod-php5 phpmyadmin mysql-server apache2 php5-gd

And it worked! Linux not user-friendly? Pfffttt!