Thursday, April 7, 2011

AirPrint for iPad and FC14

I bought a new toy - an iPad 2.

Great toy - having a lot of fun with a device with a good size screen, but portable.  Slowly working out the apps that I require to make it useful.

The other day I thought I should look into printing, and started reading about AirPrint and then I saw the list of AirPrint printers that are supported, the official list only had HP devices, although I have since heard that a number of brother devices also support AirPrint.

After looking around on the web, I found a number of references to setting up a linux machine as an Airprint Server.

Using http://www.micromux.com/2010/11/22/airprint-for-mac-on-linux/ and http://lists.fedoraproject.org/pipermail/users/2010-November/387560.html
I started to configure it.

To my surprise it took about 15 minutes, and I can print from my iPad through CUPS on Fedora 14 and out comes a print on my Brother MFC-7420.

I have managed to print images from the photo app, and also anything that I can view in Safari, so it does not seem to have the limitations that Steve found when he posted his information.  So you don't have to race out and buy a new printer, unless of course you want a new printer.

I have now done the same with Fedora 15 -  so simple
  1. Add ServerAlias * to the /etc/cups/cupsd.conf file
  2. Download airprint-generate.py from https://github.com/tjfontaine/airprint-generate
  3. Run airprint-generate.py
  4. Copy resulting files to/etc/avahi/services
  5. Restart cups and  avahi-daemon
2018 - update on airprint

Time to get a new printer, need colour, did some research and price checks, remembered my views on brands just before purchase and go an HP Color LaserJet Pro MFP M281dfw
wifi, airprint....  printing from MacOS, IOS, Windows all works great.
 

Tuesday, March 22, 2011

Skype - Fedora 14

I have just installed Skype 2.1 Beta 2 on Fedora 14 x86_64.

To get it to work I had to install the following 32 bit packages -

yum install libX11.i686
yum install libv4l.i686
yum install alsa-plugins-pulseaudio.i686
yum install qt.i686
yum install libXScrnSaver.i686
yum install libXv.i686
yum install libQtGTL.i686

You can check the objects you need using ldd to show you all the libraries you are missing.

# ldd /usr/bin/skype
 linux-gate.so.1 =>  (0xf7798000)
 libasound.so.2 => /lib/libasound.so.2 (0xf7686000)
 libXv.so.1 => /usr/lib/libXv.so.1 (0xf7681000)
 libXss.so.1 => /usr/lib/libXss.so.1 (0xf767e000)
 librt.so.1 => /lib/librt.so.1 (0x46c69000)
 libQtDBus.so.4 => /usr/lib/libQtDBus.so.4 (0xf7605000)
 libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xf6b77000)
 libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xf6a60000)
 libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xf67cc000)
 libpthread.so.0 => /lib/libpthread.so.0 (0x46c38000)
 libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf66df000)
 libm.so.6 => /lib/libm.so.6 (0x46df7000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x46ffc000)
 libc.so.6 => /lib/libc.so.6 (0x46aac000)
 libdl.so.2 => /lib/libdl.so.2 (0x46c55000)
 libX11.so.6 => /usr/lib/libX11.so.6 (0x4709e000)
 libXext.so.6 => /usr/lib/libXext.so.6 (0x472c2000)
 /lib/ld-linux.so.2 (0x46a8b000)
        ... 
 
yum - Yellowdog Updater Modified

The difficult part is finding which packages the libraries that are missing are in.

The best tool to learn to use for managing rpm packages on Fedora is yum.
yum install <packages>  will install the package and all the dependencies get installed too (after prompting you with the total list)

You can find the package that provides a file with a command such as

yum provides libX11.so.6 

If you want to update the packages on your system to the lastest for your version of Fedora then
yum update
If You just want to list them then
yum check-update
The power of yum is great and I use it in preference to the PackageKit widget in Gnome as it gives me the control of when and what I download to my machine.

Tuesday, February 15, 2011

VirtualBox - a great way to keep your old PC image

I have an old Windows XP machine that the motherboard has failed on.  It has a lot of data and programs on it that I use from time to time (it was my primary PC for 6 years).  I have found that Oracle VirtualBox (from their purchase of Sun) can be very helpful in allowing me to have an image of my old machine running on my new machine as I transition.  This has greatly reduced the pain of loosing the old machine.

I put the XP disk in a USB carrier and plugged it into my Linux machine.  Using command like

cat /dev/sdg | VBoxManage convertfromraw stdin OutPutFile.vdi NUMBEROFBYTES

I managed to image the disk to a file on the linux machine. I then started VirtualBox and created a virtual machine using the disk image.

On startup the machine blue screened, just like windows does from time to time. Not to worry, I got my original XP CD and told virtualbox it was in the cd drive. Then on booting the virtual machine I did a windows repair. Windows now booted and after a couple of windows updates I have my machine back in a virtual environment.

A couple of things I found along the way -

The VirtualBox that is distributed with Linux is the Open Source Edition and does not have the extensions to use USB - download the executable from http://www.virtualbox.org - They even have a fedora repo file so you can keep it up to date with yum.

Follow the instructions on getting the kernel extensions built - you will have to do this each time you update you linux kernel.

I had problems where after installing the VirtualBox extensions I could not get shared folders to work, it kept saying they do not appear to be installed. It turns out the Kaspersky Internet Security was blocking the install - disable it and try again, magically the install works. After doing this and rebooting it is working fine.

Sunday, February 13, 2011

Squid Proxy

Given my main home machine is now running Fedora 14 rather than windows I have decided to install the squid proxy to have a look at how this can help with caching web pages locally.

The install was very straight foward

yum install squid
vi /etc/squid/squid.conf

I then uncommented the squid_dir line in the file to allow it to write a disk cache and started the proxy with

service squid start

Then configured the browser (firefox) to use the squid proxy on the default port 3128.

Thats it.

To look at the contents of the squid logs I installed calamaris

yum install calamaris
cd /var/log/squid
cat access.log | calamaris -a | more

Further steps I will look at is allowing access from other machines on my home network - likely I will have to adjust the iptables firewall to allow them to connect, but this is something you should take the time to understand if you don't already.   (you can always use the GUI tools to configure these things, but that does not help me long term when administering machines through terminal sessions, so I like to use the command line where possible)

Saturday, February 12, 2011

Welcome

Well this is the start of the ramblings of an IT professional that fills in his spare time turning wood.  The main point of this blog is for me to store notes for myself about the attempt to use OpenSource software as much as possible and the tools I have found that help.  There may also be a bit of woodturning sneak in for a peek from time to time.

I am a huge fan of Linux based systems, as my first jobs it IT were using AIX, Solaris and IRiX my experience of various Unix derivatives is extensive.  Linux has presented a path where we can us commodity hardware and have a stable reliable server platform without the degree of investment that was required 20 year ago.

My Linux flavour of choice currently is Fedora for the cutting edge and Redhat Enterprise for the stable backend services.  When it comes to commercial software on a Linux platform you are normally looking at full support on either Redhat of SuSe, and it just makes life easier if you work with a consistent platform rather than changing every time you install a new system.