New Technology

I’m away a lot at the moment, so It’s hard to do any website stuff :(

Anyway by a strange twist in fate I’ve ended up with a new latop & mobile phone in the same week !
My New Laptop, HP nc6000

HP Home Page

Fedora Core 3 works out if the box, and google seems to find quite a lot, so it’ll be fun getting things working again ;)

My New Phone, SonyEricsson P910i

Sony Home Page

The phone has bluetooth so straihgh away I’m able to upload stuff to the phone :D Google throw’s up alot about p900 & p800 but initial playing shows that theses don’t necessarily work :( , again I’m sure my BLOG will reflect what I find ;)

I’ve Made $1.04 !!!!

I’ve been offline for a bit due to work commitments, and my laptop has just died, so I’m in the process of restoring to a new one :)

I thought I have a random look at my adsense account, and to my supprise I’ve made a $1.04 which is about 54p ! – wow.
so…
Keep Clicking People ! Thanks

Beagle is Driving me MAD !

beagle logo

grr… I need to vent some frustration… if you don’t know what the beagle is you should check their website:

http://www.gnome.org/projects/beagle/

In a nutshell it’s a cutting egde gnome search tool, and everything I’ve read about it is really positive, the problem is there doesn’t seem to be many Fedora Users using it, so there isn’t much documentation on getting it working… I was thinking about doing my own, but I’ve messed about with my laptop so much, that even if i do get it to work I’ll have forgotten what I’ve done !

Anyway I’d like to send a Big Thanks to Ben Konrath who has just compiled a new inotify kernel for me.

Building the inotify kernel

I’m in the process of tring to get beagle working on my FC3 Laptop, being my usual read the instructions later self, I added the yum repo suggested on Beaglewiki.org and it resolved all it’s dependencies, and I thought all was good, but it wasn’t :( .

Turns out my laptop installed the latest kernel from the official fedora updates, rather than a custom one that i needed… So I decided to have a go at building it myself :D

The beagle guys provide their own src.rpm so I just tried using the “patch” info in that to patch the latest proper kernel from Fedora/Redhat… but no joy :’( …but then I found a cracking thread on fedoraforum.org

http://www.fedoraforum.org/forum/showthread.php?t=29434&page=1&pp=15

So this is what I did….

(1) Install the “proper” source kernel rpm kernel-2.6.10-1.770_FC3.src.rpm
(2) From the src.rpm provided by beaglewiki/Ben Konrath I extracted inotify.patch
(3) Then from my ~/rpmbuild/SPEC dir I ran

$SHELL>rpmbuild -bp –target=i686 kernel-2.6.spec

(4) make your custom kernel custom edit ~/rpmbuild/BUILD/kernel-2.6.10/linux-2.6.10/Makefile

EXTRAVERSION = -inotify_linickx

(5) apply the inotify patch from ~/rpmbuild/BUILD/kernel-2.6.10/

$SHELL>

patch -p0 < /path/to/patch/inotify-0.19.patch

(6)Check the patch went on…. run:

$SHELL> make menuconfig

and check that Device Drivers -> Character Devies – Inotify is “stared”
(7) Build your kernel/rpm

$SHELL>time make rpm

time show how long the command took

Now that I’d built my kernel, I needed to install it…

(8) the rpm/kernel is in ~/rpmbuild/RPMS/i386, so I installed it

$SHELL>sudo rpm ivh kernel-2.6.10inotify_linickx-1.i386.rpm

but for some reason this isn’t enough… :( so the next step was to …
(9)

$SHELL>cd /boot
$SHELL> sudo /sbin/mkinitrd /boot/initrd-2.6.10-inotify_linickx 2.6.10-inotify_linickx

(10) and finally /etc/grub.conf needs some new entries… mine look like:

title Fedora Core (2.6.10-inotify_linickx)
root (hd0,2)
kernel /boot/vmlinuz-2.6.10-inotify_linickx ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-inotify_linickx

and then I was able to reboot into my new kernel :)

Please note: If you want to use the inotify device you will also have to add a line to your /etc/udev/permissions.d/udev.permissions. You will need to add

inotify:root:root:666

to the very bottom so that it will hold its permissions on each reboot.

Hopefully now I can press on getting the beagle to work ;)

References
kernels = http://www.bagu.org/inotify/
orriginal patches = http://www.kernel.org/pub/linux/kernel/people/rml/inotify/v2.6/0.19/
inotify 4 linux = http://www.edoceo.com/creo/inotify/
custom kernel rpms = http://www.fedoraforum.org/forum/showthread.php?t=29434&page=1&pp=15

Using Legacy Sound Cards In FC3

For a short time I had a Sony PCG-C1F laptop …

Now these boxes are quite old, so it get sound working in Fedora Core 3 we’d need some legacy sound card support. Sound cards in FC3 are powered by ALSA & the alsa project is very comprehensive, and support the sound card in this box… BUT surprisingly, on a clean install of fedora it doesn’t work :(

So what do we need to do to get legacy sound cards to work ?

According to the ALSA documentation we need to run a configuration utility called alsaconf.. but it doesn’t exist. I found a thread on the fedora list that explained this…

https://www.redhat.com/archives/fedora-list/2004-November/msg08614.html

As you can see bug was filed, and closed, since aslaconf was removed by the FC team due to the possabiliy that the probe it runs may crash your machine…

So to get alsaconf back we need to 1st un-install the current version & it’s depandancies.

[root@localhost ~]# rpm -ev firstboot-1.3.33-1.noarch
[root@localhost ~]# rpm -ev system-config-soundcard-1.2.10-1.noarch
[root@localhost ~]# rpm -ev alsa-utils

Now we need to get a new version, you now have a choice.

  1. Install my RPM http://www.linickx.com/files/rpm/fedora/alsa-utils-1.0.6-3.i386.rpm
  2. Build your own ! :)

Installing my RPM
This is quite simple as root

[root@localhost ~]#rpm -ivh http://www.linickx.com/files/rpm/fedora/alsa-utils-1.0.6-3.i386.rpm

Building your own RPM
again.. not too complicated ;)

To start with you need the source rpm from redhat:

http://download.fedora.redhat.com/pub/fedora/linux/core/3/SRPMS/alsa-utils-1.0.6-3.src.rpm

Then install it into your build directory.. if you don’t know how.. have a quick read of this Rebuilding RPMS – Getting started guide

In alsa-utils.spec you need to remove the following lines:

%{__rm} -f $RPM_BUILD_ROOT/sbin/alsaconf \
$RPM_BUILD_ROOT%{_mandir}/man*/alsaconf*

then rebuild the rpm

$SHELL>rpmbuild -ba alsa-utils.spec

and install the rpm

[root@localhost ~]#rpm -ivh alsa-utils-1.0.6-3.i386.rpm

And FINALLY Configuring the Sound Card

to configure your sound card run /sbin/alsaconf , follow the onscreen instuctions and you’re sorted, further documentation on configuration is available at alsa-project.org

ahh, it’s all music to my ears !

Rebuilding RPMS – Getting Started Guide.

I’ve got a few posts in my wordpress drafts that are based around rebuilding RPMS, I figure that before I finish them it makes sense to wrte a Getting Started Guide.

The first thing is based around the “Unix Golden Rule”: Only use root when you have to.

To rebuild rpms you need a cirtain directory stucture, it is located in /usr/src/redhat, but since it is owned by root you’re gonna need on in your $HOME. The following does the job:

$SHELL>cd $HOME
$SHELL>cp -a /usr/src/redhat/ rpmbuild
$SHELL>echo ‘%_topdir %(echo $HOME)/rpmbuild’ >> .rpmmacros

Next: you need a Source RPM, these are usually found with any other RPM, except they end .src.rpm rather than .i386.rpm or similar. Start with something simple like wget; (Sometimes building rpms requires dependancies) now this import, install as your normal user NOT root.

$SHELL>rpm -ivh wget-1.9.1-17.src.rpm
1:wget ########################################### [100%]
$SHELL>

This will put all of the source in wget-1.9.1-17.src.rpm into your $HOME/rpmbuild directory, specifically you’lll find the actual sources in $HOME/rpmbuild/SOURCES and a SPEC file in $HOME/rpmbuild/SPEC. The Sources are all the files you need; so the source.tar.gz that you’d usually run the “holy trinity” (configure, make, make install ) against, and any patches. The SPEC file is what turns the sources & patches into the RPM, so if you want to change the RPM in anyway, like change the changelog (i.e. packaged by [NICK] ) you edit the spec file.

So to turn the src.rpm into an installable file you run.

$SHELL>cd $HOME/rpmbuild/SPECS
$SHELL>rpmbuild -ba wget.spec

and in $HOME/rpmbuild/arch/will be wget-1.9.1-17.arch.rpm (in my case arch is i386; oh and sometimes you get a debug rpm, which gives you some developemnt stuff you might need), and now you have an exact copy of the wget RPM built by Redhat but this one was built by your fair hands ;)

So to Install as root or using sudo

rpm -ivh wget-1.9.1-17.i386.rpm

& you’re done ! So now if you find a src.rpm but not one to install, now you can build your own.

Here are some useful References :

Better Living Through RPM, Part 1
Better Livig Though RPM, Part 2
How to Sign Custom RPM Pakages with GPG
How to create rpmbuild directory

Finally, a decent “Mail Notification” applet !

It was lunchtime, & I was broswing the web, I stumbled across a $HOME of gnome applications http://gnomefiles.org/ and there in the top 10 most popular applications something caught me eye… what was Mail Notify?

After a short broswe of the pojects home page, I was already searching for a RPM to install, and to my suprise those smashing people on the Fedora Extra’s team have already made one ! …

mail-notification-1.1-1.i386.rpm

I loaded it up & this is great ! a system tray application that can check multiple mail accounts (including gmail), and it don’t look half bad either !

Mail Notify Screen Shot

I’d definatley recommend it ! :D

PHP-ICES BETA Released !

This is my 1st mini-project ! :D

Written completely in PHP it’s a web front end to manage ices.

A short while ago I stubled across www.icecast.org whilst looking for a way to stream MP3′s from my house to my desk @ work ;) To Stream MP3′s you need a Streaming Server , i.e. something to stream audio to the clients and a Broadcast Server i.e. something to broadcast your audio file (*.mp3) to the streaming server. I’ve used both icecast (Streaming Server) & ices (Broadcast Server) , both of which only have shell (command line) & text file config tools, not exactly pretty & lots of typing :(

So to make things easier I decided to start wrting my own, I wrote some alpha code which did the job , but I wasn’t happy with the code. I posted the icecast-mailing list to see if anyone else had already done something I could use. It turns out that no one had :( , a guy called Chuck was also thinking of doing the same thing; so I asked him if he’s interested in sharing what he’s done, actually I’m a little further than him, but because I was ashamed of my alpha code, I decided to finish my BETA, and here it is :D !

It’s realsed under GNU GPL. A HTML version can be found at http://www.linickx.com/index.php?content=gnugpl and a text version can be found at http://www.linickx.com/files/COPYING

Have a go, and let me know how you get on . Please report bugs on my Contact Page.

DOWNLOAD: php-ices-BETA.tgz

TO DO:
Things I’d like to do for a next version. (In no particular order).

  • File Browser Cookies (so it remembers the last directory your loaded files from)
  • Skining (This version isn’t exactly pretty)
  • More control over ices.conf
  • Config via gui rather than config.php

Install Instructions

This hopefully should be quite straight forward.

  1. Unpack php-ices into your webservers root.
  2. Create a temp directory in php-ices. Something like /var/www/html/php-ices/temp
  3. Make the temp directory writeable to the webserever process. Something like
    chmod 666 /var/www/html/php-ices/temp or chown apache /var/www/html/php-ices/temp
  4. Edit config php to meet your needs ;-) At the very least set the stream password on line 31 !
  5. Point your Web browser at php-ices !