Mac OS X Leopard printing to Linux CUPS server

20090909-printing-press

I generally use my MacBook (running Mac OS X 10.5 Leopard) at work and it is essential for me to be able to print documents on my network printers attached to a Linux CUPS server (running CentOS Linux 5.3.)

What needs to be done on the Mac OS X Leopard computer

For some reason, Leopard cannot see printers shared by CUPS by default (it only sees Bonjour printers.) To rectify this, open a terminal and type:

sudo vi /etc/cups/cupsd.conf

and add “BrowseProtocols all” so that the file looks like this:

# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
BrowseProtocols all
DefaultAuthType Basic
<Location />
# Allow shared printing…
Order allow,deny
Allow @LOCAL
</Location>
# Enable printer sharing and shared printers. Browsing On BrowseOrder allow,deny BrowseAllow all BrowseAddress @LOCAL BrowseProtocols all DefaultAuthType Basic &lt;Location /&gt;  # Allow shared printing...  Order allow,deny  Allow @LOCAL &lt;/Location&gt;

Then restart the CUPS daemon running on the Mac with

sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist

What needs to be done on the Linux server

Modify /etc/cups/cupsd.conf so that its beginning somewhat looks like this:

# Share local printers on the local network. Browsing On BrowseOrder allow,deny BrowseAddress @LOCAL DefaultAuthType Basic &lt;Location /&gt;   # Allow shared printing...   Order allow,deny   Allow @LOCAL &lt;/Location&gt;

and restart the CUPS server with one of:

/etc/init.d/cups restart /etc/init.d/cupsd restart

and everything should work from there. Go on your Mac and add your Linux printers in the usual way.

One observation I made

Printing generally works great but sometimes stop working when either the Mac or the Linux server are updated. What happens is that, during the update, the CUPS configuration (/etc/cups/cupsd.conf) gets slightly changed to something much more restrictive for security reasons (i.e. network printing is disabled.) I guess this is because both the Apple and Linux people think that it’s better be prudent than sorry especially in our era of fully opened Wifi network.

You’ve been warned :-)

X-Plane 9 simulator on Linux

20090902-x-plane-9

X-Plane 9 is the best flight simulator available on home computers. It has the best flight-model, the best scenery (60Gb of space required for installation!) and best performance. As Microsoft has killed Flight Simulator, I can easily foresee that a lot of people will get into X-Plane in the coming years.

For me (and I blogged on that before), the greatest thing about X-Plane is that it is multiplatform: it runs equally well on Linux, on Mac OS X and on that thing from Redmond… provided you have some decent hardware.

As I own a MacBook with an integrated (crap) Intel GMA950 GPU, X-Plane does not run well on it. Consequently, I run X-Plane 9 on my desktop PC which is a 3-4 years old AMD Athlon64 with 2Gb of RAM and an Nvidia GeForce 7 GPU. I run X-Plane under Linux Mint 7 (as I currently believe it is the best Linux distribution for home users.) And I have to say that I am very satisfied with the performance and the looks.

From Faro to Ibiza

Just to give you an idea of how X-Plane looks under Linux, here are some screenshots from my flight from Faro (in the south of Portugal) to Ibiza (which is an island off the coast of Spain.) The flight took some two hours (real flight simulator addicts do not use accelerated time!) and was very nice…

Here I am in my Piper Malibu, which has a single piston engine, over the south of Portugal. The scenery below is magnificent (don’t you think so?) and 100% realistic. The weather effects (real-time of course) are also very believable. We will reach Ibiza (in principle) in around two hours…

20090902-ibiza-1

After two hours of uneventful flight hopping from an NDB to a VOR back to a NDB (I didn’t want to use GPS), Ibiza in sight (I wonder where are parties are organised???):

20090902-ibiza-2

Landing at Ibiza on runway 06 is interesting as it does not have an ILS. Instead I used a VOR positioned at the airport for the approach and used the autopilot to align myself with the runaway. I also used the autopilot to give me a 500fpm rate of descent until at about 2-3 NM from the threshold:

20090902-ibiza-3

I landed manually and I have to take care because of some crosswinds. What is great about X-Plane (and so unlike Flight Simulator) is that runways are not flat: they follow the contour of the terrain below and the aircraft bumps and jumps (like real small aircrafts do when landing):

20090902-ibiza-4

After taxing to a nice parking slot, I switched off the engine and the avionics of the Piper Malibu:

20090902-ibiza-5

Get me the beer now!

Green is more peaceful than Blue…

20090730-windows-bsod

A few weeks ago, I got a network attached storage device (a D-Link DNS-323 if you want to know) and it works perfectly with Mac OS X and Linux. I must have transferred more than 500Gb to and fro up to now without any glitch.

Yesterday, I was feeling bored and I decided to boot into Windows XP (I have it on one computer and I have stopped using it) to see if the NAS works well with it. The initial connection went well but I got a Blue Screen of Death (pictured above) during transfer of data.

I rebooted the PC in Windows and tried again. Once more I got the BSOD.

I wonder what normal people do when they get a BSOD? Do they contact their system administrator or technical support group as advised? Or do they just reboot and pray that the problem will go away?

Personally, I only have to reboot the PC and, after a few seconds, something magical happens: the Linux login screen appears.

20090731-mint

This is when I realise how lucky I am.

Noulakaz.net is five years old today

20090316-five

I wrote my first post, Noulakaz.net Weblog online!, on 16 March 2004, exactly five years ago. Since then, the following took place:

  • I wrote 456 posts,
  • containing 146,141 words,
  • received 6,115 comments (13.5 comments per post on average),
  • with 438,726 words in them (exactly 3 times more than what I wrote myself.)

I would like to thank all of you who have contributed to my blog. I sincerely think that without your insightful comments, it would have made no sense for me to continue writing.

Someone once asked me: “How can I create a successful blog?” I gave that a thought and rapidly came up with: “A successful blog is one which is read!” with its corollary: “A successful blog is one which is read because it has interesting posts!” and its uber-corollary: “A successful blog is one which is read because it has interesting posts which prompt people to leave comments!”

As this is a special birthday post, I’m going to revisit some posts I wrote from 2004-2006 (say 2 per year to keep the length of this post reasonable.) They are not necessarily interesting but they count for me:

20040325-win_bust.jpg

25 March 2004: Kill Bill

The European Union had just fined Microsoft 497.2 million euros (more than Rs 15 billion at that time) for using its monopoly to hinder the progress of competitors and this was my first anti-Microsoft post. Of course, I was already a geek at that time having founded the Linux User Group of Mauritius around 2000 but still…

Since then, nothing substantial has changed. Microsoft is still hindering the progress of humanity by harming competition and Bill is still one of the richest guys on the planet. Fortunately, we Apple fanboys and *nix geeks have found a way to limit our exposure to Microsoft and we are very happy. Unfortunately, there are still a lot of people suffering…

Naturally, the title refers to Quentin Tarantino’s two masterpieces as well as the infamous William Henry “Bill” Gates III.

20040915-kyan-maman-papa-2.jpg

15 September 2004: Kyan is here !

Our son, Kyan, who is four now, was born in the morning and I wasted no time making the whole world aware! In a certain sense, this was a first. It was the first time (I think) that a dad in Mauritius blogged on the birth of his son on the very same day he was born! And I have to tell you all that that photo was made using my previous film camera, a Canon EOS 500N, and I had the film developed on the same day, dashed home, scanned the photo and wrote the post. Things are much simpler now with digital cameras but I’m sure Kyan will love that story when he’ll be a bigger boy.

Interestingly, Kyan was a name Christina and I came up by simplifying Keanu (Reeves.)

28 February 2005: A new adventure begins

I left the Mauritius Chamber of Commerce & Industry on the 28 and started at the University of Mauritius as a lecturer in the Department of Computer Science and Engineering the next day on the 1st of March.

The reason why I left the MCCI was that I felt I had done everthing that I could have done there and that I wanted a fresh challenge. The reason I opted for the UoM was that I really wanted to be in an environment full of intellectuals, both academics and students. Unfortunately, I got bored after less than three years. I was disappointed to discover that some academics were not really intellectuals. I was also disappointed to discover that some students did not really care about acquiring knowledge. And I was also disappointed in the lack of support and facilities exiting there for academics to do their work properly.

So, last year, I decided to quit the University and try to obtain a visa for the USA. Of course, that didn’t work out but I never thought about going back to UoM. I belong elsewhere I guess.

25 May 2005: Liverpool King of Europe

Liverpool is the most successful football team in England and I’ve been a Liverpool fan for at least 20 years now. On 25 May 2005, something magical happened: Liverpool won the Champions League for the 5th time after having been down 3-0 at half-time.

How? By combining the brains and brawns of two special persons: Steven Gerrard and Rafael Benitez.

The match was practically lost at half-time. And then something happened: the Liverpool right back got injured. Normally, when this kind of thing happens, a manager tends to ask a defender to come on. But Benitez did differently. He introduced Hamann, a midfielder, to mitigate the effect of Pirlo et al and asked Gerrard to help the (now) three man defense cope with the AC Milan attackers. And Gerrard did something only a handful of players throughout history can do: he did everything. He headed. He tacked. He marked. He passed. He shot. And he scored. From every position on the field. And, of course, he won.

Zidane was god. Gerrard is next to godliness. Zidane says so. And who am I to argue?

20090316-avinash

18 August 2006: Hello World! My MacBook has arrived!

I finally got an Apple computer after years and years of craving. When I was still at college, I discovered screenshots of the NeXTstep operating system and it was love at first sight. When Apple acquired NeXT and Steve Jobs announced that their new operating system, Mac OS X, was going to be NeXTstep and Unix based, I knew it was time for me to make the plunge. And still it took some years before I actually did it.

But now, after having used a Mac for about two and a half years, I can say that there is nothing comparable on the desktop: neither from Microsoft and, unfortunately, nor from the open source world. In fact, I can safely say that Mac OS X is the best desktop operating system ever and Linux (et al.) is the best server operating system which can be easily obtained and installed on commodity hardware.

I love both.

29 November 2006: We are going to India

I don’t like watching Indian movies a lot. I feel most of them have feeble scenarios and I find the actors very caricatural (the actresses are beautiful though…) So, I had a somewhat distorted image of India, partly caricatural (because of the films) and partly frightening (because of what people have told me of India over the years.)

But when I went there, sponsored by Data Communications Ltd, for the ACM Inter-Collegiate Programming Contest to accompany three UoM students, I found out that India was just a great place to visit! I loved the people, the food, the trains, the auto rickshaws, everything! And I loved the fact that I felt practically at home all the time even though I didn’t understand a word of Hindi.

Incidentally, I have just watched Slumdog Millionaire and I think it is a very good film. Not exceptional but very good and which gives a relatively true image of India as far as I know.

~

Once again, thank you a lot for your participation on my blog. Let’s hope we’re all still around in 2014 to celebrate the 10th anniversary. (Tomorrow, I’ll do the same exercise for posts written from 2007-2009.)

Audio nirvana with the Airport Express

20090309-airport-express

Today, I bought an Apple Airport Express. And I can say I’m very very impressed!

The Airport Express is tiny and plugs into the mains directly (there is no need for an external transformer.) It is a fully-featured Wifi 802.11n access point (which means it has theoretically five times the bandwidth of a 802.11g device like the MyT Livebox) which can also work as a simple bridge (if you already have a router with a DHCP server for example which is true for the Livebox.) Personally, I’ve connected mine to my MyT Livebox and disabled the Wifi on the latter.

If you look at the picture above, you’ll notice three cables: an Ethernet cable, a USB cable and an audio cable. The Ethernet connection is used to connect the Airport Express to the Internet (the Livebox in my case.) The USB cable connects to a printer and the latter immediately becomes available through Wifi (the Airport Express essentially contains a print server.) As I have one USB printer (a HP P1006 black and white laserjet) at home and three computers, I think I’ll use that a lot.

The third cable is where the real magic occurs. The Airport Express can connect to your audio amplier or home-cinema receiver either using an analogue or a digital connection! The digitial output is bit accurate meaning that the Airport Express does not in any way modify the audio (audiophiles and music lovers will love that! I know I do.)

And where does the Airport Express get the audio? From any application running on any of your computers!

Out of the box, it works with iTunes (which I use for listening to my MP3s and AACs) and I can say it works flawlessly even when moving my MacBook around the house. To be honest, I had to stop using a dashboard widget, Airport Radar, because it is incompatible with the Airport Express but that’s not a big deal.

Interestingly, I can also listen to all the Last.fm radio stations using iScrobbler because the latter uses iTunes to play the audio.

20090309-airfoil

With the addition of the $25 Airfoil, it becomes possible to stream the output of any application to the Airport Express. For instance, I’ve streamed the audio from Safari and Firefox when watching YouTube videos. I’ve also streamed audio from FStream and RealAudio Player which I use to listen to internet radio.

In the US, the Airport Express costs $99. In Mauritius, it’s more expensive (obviously) and I’ve managed to get one at Rs 4300 + VAT at LCI. Personally, I find the price acceptable. LCI makes a Rs 800 profit and gives the VAT to the Governement.

Verdict

The Apple Airport Express, like most things Apple, is a bloody excellent gadget! Rating 9/10 (easily 10/10 if it came with Airfoil.)