Posts

Showing posts from 2008
Image
I was leaving my office the other day and had my phone in my hand. Its a nokia 3120 ( i think ) and has a little camera in the front for video conferencing or something. Anyway - I accidently took a photo of myself. Initially I was just going to delete it but thought I would just post it here. Has anyone else taken an accidental photo of themselves? Maybe we should set up some kind of flikr page for it. Who is keen? Merry Christmas and a very happy new year to all who follow this blog!

Fedora 10 Install Success

I was very reluctant to install Fedora 10. Mainly because of the poor success I have had in the past with it all going smoothly. IE: Typically it all went very bad. I never do an upgrade. Always a backup of important data - never apps or configurations - then a fresh install. I like my system clean. So after about 5 days of having the new distro, I couldn't wait any more. I was just too curious so I carefully backed everything up not forgetting this time to dump my databases too. The install went absolutely swimmingly. It was like installing a vanilla ubuntu. Nothing went wrong - everything worked like it was supposed to. Just fantastic!!! I suggest you backup and install Fedora 10 today! Only thing... ( there is always a but ) Amarok in the new version is unusable. I had to trawl google for like minded individuals. Found a forum where I was able to download a compiled version of Amarok 1.4. ( v10 ) I think. I needed this desparately because I use the REPLAYGAIN exte

Switched to Orcon

Image
Our internet connection was switched over to Orcon today. First off I should say that everything worked! ( well almost everything ) The router arrived at about 13:30 The connection was made at the local exchange at about 15:45. 15 minutes earlier than promised by an email I received 3 days ago. When I arrived home, the Caller ID function on our phone was working. We can now check missed calls on our home phone which the wife thinks is FANTASTIC. ( hint: When ever you plan to spend extra on ICT then make sure the wife gets something out of it. ) I unpacked the router, plugged everything in, switched my pc over to DHCP and logged into the admin interface. There was a wizard so I tried that. Before I knew it, I had internet connecting at 8012 Mbit downstream and around 1024 Mbit upstream. In case you would like to know how that translates into actual download speeds then have a look at the screen shot of my Kubuntu download. My laptop can connect to the wireless network. Setting

Orcon Home+ Platinum

I have signed up with Orcon Home+ Platinum for my new ISP service to my house. They promised ADSL+2 which means faster internet as well as a whopping 25Gb per month with $1 / gb thereafter. This should come in handy with all the Linux Distro's I download. I am also looking forward to a new router that comes with the deal. The router is included in the monthly fee so that's a bonus. I chose the platinum plan because I liked the extra data, the included wireless router and the free homeline with all the bells and whilstles ( Caller ID, VoiceMail and Call Waiting. ) I was told it would take about 4 to 10 working days. In the mean time I have received an email telling me exactly the day on which the cut-over will happen. I hope the router arrives in time.

What's a kernel?

I tried to describe a kernel in jargon-free english today. It was pretty tough. Welcome to your new Linux Distro. Linux is the word we use to define a collection of software ( programmes ) that you copy on to your hard disk ( that metal thing inside your computer that uses magnetic magic to store a series of ones and zeros otherwise known as binary ) so that when you turn on your computer something useful will happen. The most important part of linux is the kernel. This is the programme and other resources that tell the different parts of your computer to do something. For example when you open your text editor programme, something has to tell the hard disk to start spinning around and then it needs to tell it how to retrieve the specific ones and zeros that define the text editor programme. Then the text editor programme is loaded into memory ( RAM ) which will then take control. The text editor programme will now tell the kernel to display something on the screen. The kernel
Image
Hi All, During Movember (the month formerly known as November) I'm growing a Mo. That's right I'm bringing the Mo back because I'm passionate about tackling men's health issues and being proactive in the fight against men's depression and prostate cancer. To donate to my Mo you can either: Click this link https://www.movember.com/nz/donate/donate-details.php?action=sponsorlink&rego=1550521&country=nz and donate online using your credit card Write a cheque payable to ‘Movember Donations Account', referencing my Registration Number 1550521 and mailing it to: Movember PO Box 12 708 Wellington 6144 Remember, all donations over $10 are tax deductible. The money raised by Movember is used to raise awareness of men's health issues and donated to the Cancer Society of New Zealand and the Mental Health Foundation of New Zealand. These two char

Printing from Linux to Vista

We bought a new printer yesterday. HP2280 All in one colour printer, scanner, copier. It was a cheap deal from QMB at just shy of $50 (NZD). As this is our second printer, bought to replace the one we have that hasn't yet died, we decided to install it on my wife's Windows Vista PC. The install and functions all went perfectly as one would expect with a "Made for Vista" product. The tricky bit turned out how to connect it to Linux for remote printing. I thought I could use the extra printer at times so went to install it... First step was drivers. I ended up installing a mammoth driver pack and utility tool-set I downloaded from Sourceforge . ( link provided by HP website. ) Next I needed to enable TCP Printing services on the vista host. Did this in control panel / Add remove windows components. Next I used the standard linux printer dialogue to attach the printer using Cups with the Samba backend. That worked just fine too. I could even send a test print

Setup Linux For Wndows Terminal Services

Image
Windows Server 2003+ only supports ( last I checked ) two remote desktop connections at the same time. At least that's the default behaviour. I believe one can increase this through the purchase of a Terminal Server license. Essentially in order to allow more than two users to use Remote Desktop to log in to a machine on your LAN at the same time, you need to start paying extra. The only reason - and its a good one - for needing to do this is because your vpn assigned ip address is not on the same subnet ( for security reasons ) as the servers you need to access. Specifically: your dynamically assigned VPN IP address is not listed as an object on your firewalls. So when you try to RDP from your laptop at home, to that server in your data centre you get nowhere because your IP address is blocked by the firewall. JUMP BOX TO THE RESCUE. I call that box you set up and leave running at work a jump box because you will use it for receiving your remote desktop connection and then es

Howto Install Microsoft Core Fonts on Linux

Linux does not ship with Microsoft's core fonts. This means that fonts like Arial are simply not available with a default distro. Here is how one gets them installed using Fedora 9 x86_64. I have posted them in an RPM on http://forum.thelinuxcdstore.com under the General section. ALL THANKS to http://corefonts.sourceforge.net/ for a great guide and for their hard work. 1. Set up a build environment in your home directory: Create a file in your home directory called .rpmmacros Add the following line to the file. %topdir %(echo $HOME)/rpmbuild 2. Create the following directories: ~/rpmbuild/BUILD ~/rpmbuild/RPMS/noarch 3. Log in as root and install some prerequisites. # yum install rpmbuild ttmkfdir cabextract 4. You will need chkfontpath. I found my copy here: http://dl.atrpms.net/all/chkfontpath-1.10.1-2.fc9.x86_64.rpm . I downloaded it and installed it with: yum --nogpgcheck localinstall chkfontpath-1.10.1-2.fc9.x86_64.rpm 5. Make a temporary directory for your spec file. m

Using SMBCLIENT to transfer files.

This information is gathered from a few different sources. I have it here for reference: Step 1: Create a file that contains authentication details. In my test case I had no domain to bother with so just added the username and password fields. I also made a point of ensuring that the file permissions for this file were set to the owner having access only. Ie: rw- --- --- or ( 600 ) Thanks to: http://www.javascriptkit.com/script/script2/chmodcal.shtml for the very useful chmod calculator. smbclient_authentication.txt username = backupuser password = Pa$$w0rd Step 2: In your script or whatever the way to put a file onto the windows share is like this: ~> smbclient -A smbclient_authentication.txt ////192.168.0.96//data -c "put myBackupFile.tar.gz" That's about it. Piece of cake. When I test this on an SELINUX environment, I am sure this tutorial will be extended somewhat!

VMWare Player and VMWare Server on same box

Darn it! I can't have my cake and eat it. Turns out that I can't install both VMWare server and VMWare Player on the same PC. BUT WHY would one want to dot that? The answer is simple. I was hoping to have access to the player so I could use my machines, and close them and restore them when I needed to. I don't leave my Desktop on all day every day. It would be handy to not have to save a snapshot of the guests I am using prior to shutting my machine down at the end of each day. Anyway - no hope. Too many conflicts and so trashed the player and am sticking with the server.

Canon LBP 3300 Driver for Fedora 9 x86_64

I have compiled the Canon Drivers for the LBP-3300 - B&W duplexing laser printer. A list of supported printers: LBP3310 LBP5100 LBP5300 LBP3500 LBP3300 LBP5000 LBP3210 LBP3000 LBP2900 LBP3200 LBP-1120/1210 I used to host a forum which had these drivers linked to them. A while a go, I removed the forum because it was not being used but have since found a posting on another forum that referred to them. So I have found them again in an old email I once sent and placed them here for people interested. http://www.thelinuxcdstore.com/pub/cndrvcups-common-1.70-1.x86_64.rpm http://www.thelinuxcdstore.com/pub/cndrvcups-capt-1.70-1.x86_64.rpm http://www.thelinuxcdstore.com/pub/guide-capt-1.7xe.tar.gz Here is the content of the email to lend it all some context: Ok - They are attached. Intall the common one first because the other one depends on it. I have also attached a text file that gives information about the driver. I downloaded the source, met the dependencies and compiled it. I do

Hex Editor for GNome

Image
Lately, I have been working on a project to parse a binary log file into text format. The requirements are that logs with 30 000 + records must parse quickly with low overhead on the production server. In order to achieve this, I needed to know how the binary log was formatted. This was the most difficult part and I quickly realised I needed a descent Hex Editor. I settled on GHex ( Hex Editor for Gnome. ) Fedora 9 ships GHex in the Yum repositories. # yum install ghex HEX data can be viewed as bytes, words or long words. The data can be selected and there is a search tool. Find the project's home page here: http://directory.fsf.org/project/ghex/

Google Gadgets on Fedora 9 x86_64

Image
If you have Fedora 9 64 bit and want to check out the google gadgets then read on. Google Gadgets is very much like the Windows Vista sidebar. You can add all sorts of little toys to the side bar. I have a resource meter, news feed and pictures gadget. Installing the gadgets application was relatively simple. Here are some links to get you started: http://code.google.com/p/google-gadgets-for-linux/ - The homepage http://code.google.com/p/google-gadgets-for-linux/wiki/HowToBuild - Official Build instructions http://groups.google.com/group/google-gadgets-for-linux-user/web/building-instructions-addendum - Build instructions for different distros. So here is a little command line script to make the instructions work. ( I executed this a root - and I run gnome so didn't worry about the QT stuff. ) # yum install dbus-devel js-devel libxml2-devel gstreamer-plugins-base-devel gstreamer-devel libtool-ltdl xulrunner-devel xulrunner-devel-unstable gtk2-devel librsvg2-devel curl-devel I

Allow httpd ( apache ) to write to files and folders with SELINUX

You may have read my previous post about configuring apache for public_html with selinux. Now today we look at extending this a little with enabling write permissions on special folders with SELinux enabled. There is sweet little help on this available on google so I thought I would throw in my two cents. In summary the file context needs to be changed for folders where the httpd daemon needs write access. These would folders that contain cache, images, logs and other things... To recap: Step 2 - Ensure that selinux is enabled for user_dir #> setsebool httpd_enable_homedirs true Step 3 - Ensure the correct access permissions are set on the home directory As normal user in home directory ~> chmod a+x ~ Step 5 - Create the public_html directory ~> mkdir public_html Step 6 - Set the selinux type label for public_html ~> chcon -t httpd_sys_content_t public_html Now your installer script for modx ( say for example ) tells you that it can not install because the cache folder

VMWare Server on Fedora 9 x86_64

A little while ago ( like when I first installed my 4Gb of RAM ) I thought I might give VMWARE server a try. VMWARE server is available for free from http://www.vmware.com/download/server/ . Needless to say it didn't work. There was an issue with compiling the 64bit modules for networking with the kernel and kernel-devel packages at the time. Happily, Fedora has updated the kernel and kernel-devel packages and the issue is gone! Last week I gave it another go and now have VMWare Server running smoothly on my Fedora PC. I use it for a range of different things and prefer it to Qemu for a range of different reasons. My list of VMWare pros over Qemu: VMWare is very good at sharing host resources amongst the guests. One can assign more virtual memory to each guest and have them run concurrently without incurring exorbitant overhead costs. VMWare deals with bridged networking without much input from the person behind the keyboard. All I had to do was tell VMWare server that my gue

Marshalling ones thoughts with Freemind

Not too long ago, I was sitting at work with a thousand and one things to do and no idea where to start. I ended up surfing the Internet. What else does one do when one is swamped with work? I was thinking at the time that I knew of a way to get things straight in my head. Mind Mapping was always a useful tool that allowed: Structure concepts in a logical order Link things together in ways that don't seem apparent at first Brainstorm Prioritise You have heard all this before. Mind maps were all the rage when I was in school and later in college. It was the miracle answer to study. Never worked for me though. At least in school. I guess, like so many things that other people suggest, application of ideas to one's own situation often requires a little experimentation, trial and error and a lot of perseverance. In short, there is no easy solution to anything. So back to my "hell day." There I was surfing the internet, steadfastly ignoring the pile of work I ha

pyVerify version 2

Following on from my previous post that shows how to verify cd or dvd integrity, I have this following update: The volumeid.sh script now reads the whole isoinfo -d -i from the dvd and pipes it through to md5sum to generate a "signature" that identifies the disk. The thinking here is that it would be near impossible to have have two disk headers that match completely. Even those that share volume ids... For example openSUSE 11.0 i386 and openSUSE 11.0 x86_64 The Verify class now includes checking for more than one row in the database that has the same volume label. ( md5sum result from volumeid.sh ) This is to catch anything that matches for some strange reason. The updated code for all the files is included below. volumeid.sh #!/bin/sh # # small utility to find the md5sum of the isoinfo header information # isoinfo -d -i /dev/cdrom | md5sum | cut -d " " -f 1 verify.sh #!/bin/sh # # Start with verifying CDs # device="/dev/cdrom" checksumtype=$1 #Find de

Python + Bash + isoinfo + mysql = Python CD Integrity Verifier

I have a requirement to verify by md5sum or sha1sum, CDs or DVDs that I burn - so I wrote a bunch of scripts. I am not saying that this is the best way to skin this particular cat, but it is working. First of all a bit of background info. This stuff only works on Linux because the commands make use of Linux tools such as isoinfo and dd. I am sure Windows command line equivalents exist... I have a mysql database with one table in it that has the following fields: distro_label --- Volume ID of CD or DVD distro_name ---- Name of the CD or DVD hash_type ------ 1 = md5sum, 2 = sha1sum hash_detail ---- Known good md5sum or sha1sum of the particular CD or DVD Here is an example record: distro_label --- Slack11d1 distro_name ---- Slackware 11 Disk 1 hash_type ------ 1 hash_detail ---- a7cfcb4be158beca63af21b3b4dbc69c In case you are wondering how I know the volume id - try this while you have a CD or DVD in your cd / dvd drive: [~]$ isoinfo -d -i /dev/cdrom Requirements T

Python + inotify = Pyinotify [ how to watch folders for file activity ]

Sometimes it just might be handy to be able to watch a folder on a hard disk for changes. For example: A client app might drop small files on a shared folder. A server app might be watching the folder for just such an event. Once the file is created, the server will kick into action and perform whatever tasks are required. This all comes from my CD burning application. I am currently thinking that the client apps will drop small xml files containing information about what to burn onto a folder the webserver has access to and the cdburner service will be watching... The linux kernel provides inotify. This from wikipedia : notify is a Linux kernel subsystem that provides file system event notification. It was written by John McCutchan with help from Robert Love and later Amy Griffis to replace dnotify . It was included in the mainline kernel from release 2.6.13 (2005-06-18), and could be compiled into 2.6.12 and possibly earlier releases by use of a patch . Its function is essen

Python + YAMI = 3 Tier

Background I have spent most of last night and this afternoon working out how to implement a website for my local LAN that would enable use of my DVD writer from a remote host over a web interface. I need to provide a small web application that can be used to burn ISO images onto CDs or DVDs. The application should also verify the CD or DVD once it has been burnt. Security To start with I needed to find out how to control the CD or DVD burner from the website. There is the small problem of security here. I could not simply add the Apache user access to /dev/sr0 ( the cd device ) because then it is conceivable that anyone or any rouge application might be able to use the Apache service to monkey with my device. I had to provide some kind of abstraction which could authenticate / authorise the request prior to performing it. Python Python is fast becoming my favourite scripting language for working in Linux. It has some very nice libraries that makes things like network programming

So Whatddya Know?

Social networking sites seem to tap in to the idea that we should all be connected together and on-line. We should be able to do something, upload a photo, write a comment, update a status or simply forward something along to all of our friends for them to see. Don't you mean, "So what do your mates know?" It's not what we know that is important any more. What is important is what we share. The information we give out to people about our feelings and experiences has suddenly - through the exponential growth [ reference ] of social networking sites - become valuable. Valuable to our friends who are now taking notice of us... and valuable to big business who piggy-back their relevant and targeted marketing. Every post you write will be read by at least half a dozen of your friends. If you have a popular profile / blog it will be read by half a dozen thousand people. That's a lot of people that know stuff about you. So what - I am more popular now than ever be

Command line to watch TV in Fedora

mplayer \ -framedrop \ -ao alsa:device=hw=1 \ -autosync 1 \ tv://7 \ -tv driver=v4l2:device=/dev/video0:chanlist=newzealand :norm=1:alsa:adevice=hw.2:audiorate=32000:amode=1:\ forceaudio:immediatemode=0:tdevice=/dev/vbi0:\outfmt=yuy2:\ channels=2-TV1,4-TV2,7-TV3,9-C4,41-Maori,57-Juice,59-Prime,62-Chinese \ -nolirc \ -aspect 1440:900 Mplayer with the following command options set: -framedrop => hard framedropping -ao:alsa:device=hw.1 => Sound output ( what you hear ) alsa card number 1. To be clear: THIS IS THE SOUND OUTPUT - not the INPUT from the TV card. That comes later. -autosync 1 => Something to do with trying to get sound and video in sync. Works in small increments... ? tv://7 => Play channel 7 tv: => Followed by all the sub options for tv :driver=v4l2 => the Video 4 Linux driver v2 :device=/dev/video => the video device as enumerated by the kernel :chanlist=newzealand => specify New Zealand channels. This is how the tuner gets tuned. :norm=1 => P

Fedora 9 x86_64 Install Notes

I have now installed Fedora 9 x86_64 on my home pc. The RAM issue has been largely solved. I am still missing 64Mb of RAM due to some kind of setting that my motherboard does not support. So I did a pretty big install. Well at first it was a small one, but then in the end, I went for a more full install from the DVD. The new package manager is not all that great so I thought it would be better to have a fuller install from the DVD. Everything seems to work just fine except for NVIDIA graphics driver and FLASH in firefox 3. The first issue will just have to wait till it gets fixed. Its related to the NVIDIA drivers that are available not being properly supported by XOrg 7. The flash-in-firefox-3 issue can be easily fixed by installing the i386 version of firefox instead. I also had some trouble getting my head around the NetworkManager. Once I had it going it was ok. I turned off SELINUX. Too hard to have a home system and worry about such fine grained security. I have decided to us the

4 Gigabytes of RAM

I know - its an obscene number - but there it is. I now have 4 Gb Ram installed in my computer. Its the most the motherboard can handle but seeing as though it's mother's day - I thought I would treat her... :) Here is what happened: The bios had no problems finding and providing the ram. My Fedora kernel ( i386 => 32 bit ) could only see 3 Gb. I installed the PAE variant of the kernel and that enabled all 4 Gb in Fedora. Had to switch from Freshrpms to Livna because Livna has more support for different kernels. I use livna for the NVidia and KQemu drivers. ( KQemu is what provides hardware acceleration for my virtual machines. ) NVidia module for the PAE kernel installed fine and works fine. KQemu module for the PAE kernel installed and loaded fine, but the Guest machines just crash. So I did lots of research and found out that 32bit OS's simply don't have a lot of support for more than about 3Gb Ram. The only solution to that was to install the PAE kernel. Th

The History of computers.

The History of computers. This is a very interesting read. We have come a long way. http://www.computersciencelab.com/ComputerHistory/History.htm

1 Million Random Digits

Can anything be truly random. Definitions vary. One I have heard states that something is random if it is impossible to understand how the number was produced / derived. This definition introduces context and level-of-understanding. The debate continues... Look here for another slant on this fascinating topic: http://wps.com/projects/million/

Linux From Scratch Results

FAIL. Its a common theme with my attempts to compile almost anything more than a basic app. I made it quite far but who knows where I went wrong. The problem really is that I have no way to know if everything compiled correctly. This time round I feel that I have managed to do all the compilation right but failed somewhere in the configuration steps right at the end. Oh well. The partition I used has once again cleaned out in anticipation of the next bit project. In all it took two evenings to compile everything. Not bad compared to my last attempt on my old computer which took a whole week of evenings. Go DUAL CORE CPU and 2 Gb Ram!!!

Linux From Scratch ( LFS ) - An experience!!!

I have toyed with LFS before, but never on a system where I had any real chance of it actually working. I am now currently half way through chapter 5 of the book. This is the chapter where one compiles ( from source ) all the necessary components so that one might compile the actual components. This process of building a toolchain on the target system is supposed to provide for a fully optimised Linux. The source code used is all released under the GNU license so it's a completely free operating system. There is no real reason for going through this ultimately very boreing and labourious excersise other than to say, "Yes - I too have toyed with and successfully built my own Operating system from source code downloaded off the internet." You can download the binary LFS, or by a CD with a fancy installer. LFS is a book with instructions on how to build an OS. The best way to read it is, of course, online so that the commands which are all nicely laid out in boxes with

Website hacked

My website was hacked and made into a phishing site. Some kind of issue with cross site ajax blah blah. What is a bit unhelpful is that there was no real information regarding this kind of hack ( I mean specifically ) that would help me to fix it. Anyway - The only thing I did find was that I should lock down the file permissions on the web server. I found all these renamed directories and one that didn't belong there at all. The lesson learned here is that even if you make a mistake with file permissions thus opening your web servives and sites open to attack, you should make a point of knowing all th files and folders so that you can spot an anomaly and fix it. Of course this doesn't mean that all attacks of this nature rename your folders and files. They may simply change the content so the result is still a comprimised website. I guess, a preemptive move ie: correcly setting up the website and server, is the best defense. After that be aware of strange things. I rec

Tiny MCE

A couple of days ago, I started preparing for the long and arduous journy where I would teach myself how to integrate a TinyMCE rich text editor on a web page. Here is how it went: Downloaded the source - This is always my first step. Get the source. Nothing to do without the source. Read the readme page which was really just a bunch of examples with the code all nicely rendered on the pages. Tried it out. Easy peazy!!! Went to bed - feeling VERY HAPPY with myself. Getting a TinyMCE rich text editor is so easy to setup its a wonder why we don't see it even more often on websites. I know that every wordpress site and most CMS sites have it by default but a lot dont. So just: upload the javascript files to your webhost. Add the tags to the head section of your site that identifies the source. ( see example below ) Add a small bit of JS to set up the editor. Add a <textarea> </textarea> on your form. Done. <script type='text/javascript' src='lib/jav

Qemu networking part 3

Finally I have worked out how to network multiple guests together. Its done through a socket interface. The first guest listens and the others connect. I havn't tried with more than two guests at this stage but it did work. Add the following net switches to the startup command. start first guest. -net nic,macaddr=52:54:00:12:34:56 -net tap,vlan=0 -net socket,listen=:1234 start second guest. -net nic,macaddr=52:54:00:12:34:57 -net tap,vlan=0 -net socket,connect=localhost:1234 And thats it then. Time to start playing with domain controllers et. al.

Qemu networking

I have been fretting over this issue for a while now. Have finally worked out how to give qemu a network connection that joins with a bridge and thereby a connection to the host. Qemu can create a tap interface that does all this magic networky stuff. It does work... :) Write 2 network scripts as below: ( don't forget the chmod +x on each file. ) [root@sitedesign ~]# cat /etc/qemu-ifdown #!/bin/sh /sbin/ifconfig virbr0 down /sbin/ifconfig down $1 /sbin/ifup eth0 [root@sitedesign ~]# cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif virbr0 $1 Then to start the VM: as root: #~> qemu-kvm -net nic,vlan=0 -net,tap,vlan=0 -hda winxp.img -hdb winxp_disk2.img -usb -usbdevice tablet -localtime -daemonize That should start you up with a connection to the default virbr that gets made by fedora at boot time.