Saturday, November 8, 2008

KStars gets GPS sync support

By default, KStars can sync the telescope's time and location settings to that of KStars. This is an important step before you can properly control your telescope. However, some users, especially those who frequently change locations require syncing the PC time and location settings to those of the telescope, especially since many modern telescopes are equipped with GPS receivers.

Bug 147743 was opened to address this issue. I recently committed a change to KDE svn repository to add this feature to KStars. Now users can select the source of the time and location settings!

Barty barty barty!

Part of my weekly ritual is to dine at my favorite Thai restaurant in AlMuthanna Complex, Kuwait City. Just next to the Thai restaurant is another shop that has been out of business for quite a while. It has one of the most horrendously misspelled names to be conceived by homosapiens. I'll just leave you with the picture :-)

Using Zain 3G Modem in Linux

Zain (formerly MTC) offers 3G wireless internet via their unlimited 7.2 Mbps plan. Of course, the bandwidth is neither 7.2 Mbps, nor unlimited. More rather, it should be called Zain 128 kbps restricted and capped plan. It's presumably capped @ 30 GB per month, and if you exceed this limit, then they will degrade your speed. What a joke, degrade it to what? 1200 bauds? Maybe I won't even notice the difference.

Yes you can get 2 Mbps if you're lucky at times, but don't bet on it. Rumors has it that the closer you are to Zain's transmission towers, the faster your connection gets. In fact, someone was indeed able to download at 7.2 Mbps while camping near one of Zain's towers for the full 30 seconds it took the microwave radiation to fry him alive.

At any rate, what do you need to run Zain's 3G modem in Linux? With the 0.7 release of network manager, which is included by default in Ubuntu 8.10, it's a breeze (well, almost) to connect to the internet using Zain Huawei E220 HSDPA USB modem.

Once you plug in the modem, Ubuntu will detect it and then offers you to configure it.

1. Select A provider: Select Kuwait from the list of providers, and then select Vodafone:

2. Confirm provider selection:

3. Edit provider settings

You need to enter the username, password, APN, and PIN if you have it enabled. How do you get these settings? If you plug the USB dongle in an XP/Vista machine, it will be recognized as a modem and also as a read-only Mass Storage Device which installs the drivers and Zain's connectivity application. The USB contains a file named SYSCONFIG which lists the configuration of Zain connection profiles. This is an example of the 3G profile (Which can be used for the 27KD plan):

[Zain 3G]
IP Dynamic=0
Authentication protocol=1
Dns Dynamic=0
Wins Dynamic=0

Here is another profile for Bahrain Zain customers:

IP Dynamic=0
Authentication protocol=1
Dns Dynamic=0
Wins Dynamic=0

Please note that the password is NOT one character | but there are two unicode characters before the |, and they are %7F%7F. This is how you enter the password in the network manager:

1. Go to the password field.
2. Press Ctrl + Shift then u then 7F then press space, and you'll get your first unicode character.
3. Repeat #2 once more.
4. Enter the character |

Your password field should look like this (if you enable show password):

That's it, you're set!

Thursday, October 16, 2008

He must be raging mad!

He must be raging mad is probably the very thought of that high school teacher I met yesterday when I gasped in utter shock mixed with euphoria because openSUSE 11 worked on the damn projector without me tinkering with Xorg configuration for 20 or so minutes.

I was asked to give a lecture to an all-girl high school on the properties and evolution of stars, and I had an ODP presentation handy and ready to go. And to cover any contingency, I had it saved in Office 2003 version in case the laptop refuses to cooperate. A few minutes after my arrival at the school, I was at the auditorium setting up my laptop with the assistance of a very nice lady. I asked her if they have a spare laptop just in case my laptop experiences any problems, but there wasn't any. Then I explained to her that the laptop is running Linux and it might not work well with the projector, and she immediately replied:
Oh no, it's so easy, just press Fn + F4!
Yeah I wish. Usually, I use NVidia X Server Settings applet to setup a Twin View or a separate X screen, which doesn't work very well, if I don't lose my primary display to begin with. Sometimes, maybe depending on the projector itself, everything works fine, so in a way it was pretty much a gamble.

So I decided to do as the lady suggested, knowing in advance that this key combination never worked before. I pressed Fn+F4 and my screen flickered, a second after that, the projector was displaying a twin of my primary display in perfect resolution! I gasped with my eyes wide open, which probably perplexed the hell out of the teacher who probably thought there was some funny business going on.

So there you go, an issue that was a nuisance for many generations of distros and a source of embarrassment for many Linux users is now over, or at least over in openSUSE 11. Finally I can use Linux in my laptop without living in constant fear of being screwed over by X infront of 500 kids. I can already imagine myself saying:

Yeah, we use Linux to steer a 5 ton telescope, but the damn thing won't work with a 10 year old projector from Sony.

I don't think that will resonate very well.

But hey, it WORKS! Hats off to openSUSE 11! They really pulled off a solid distro this time around. Even the new NetworkManager supports my 3G Zain modem, so I can kiss goodbye wvdial hsdpa. In fact, I rarely need to fire up Konsole nowadays in my laptop to troubleshoot anything, and that's been since July 2008! Certainly looking forward to 11.1!

KDevelop installation nightmare

What's a better way to start ranting than to talk about package management in Linux! Yes, you've all heard that package management hell is over in Linux with all these FSM-sent repos supporting thousands of packages with just a few clicks!

Being an avid SUSE fan since the days of 7.2, I kept the tradition and upgraded to a clean install of openSUSE 11. After suffering horribly from previous upgrades, now I keep a separate partition for /home, and now I can comfortably tortue myself to the 6-month release cycle business. The KDE4 LiveCD installation was pretty straightforward, a few clicks and you're done.

OpenSUSE 11 ships with KDE 4.0.4, which might as well be called KDE 4.0 pre-alpha as far as most users are concerned. But hey, coming from a guy who compiles kdelibs/kdeedu from SVN trunk almost daily, I didn't mind that at all. In fact, it offers a better testing environment for me as a developer. Nevermind that it crashes on me every few minutes with no useful traces, but who am I to complain.

And so I wanted to start hacking right away, and after checking out the modules I needed from SVN, I wanted to load them in my favorite IDE: KDevelop. Except that it's not available in the default installation, which makes perfect sense for a LiveCD. So I fired up Yast2 and selected KDevelop. Apparently, the KDevelop team hasn't released any stable version for KDE4 yet, so I had to select KDevelop3, no problems, it works good enough for my needs. Then Yast2 asked me to agree to a huge list of dependecies that I didn't even look at before clicking OK, only to find out that I have to download ~400 MB worth of packages JUST TO INSTALL KDevelop?

Ok, so I can understand SOME of the dependencies, kdelibs3..yada yada, but why the hell do I need to install OpenOffice_org-thesaurus-en?!!! or gnomeui?!! or gnome-icon-theme?? I'm installing a KDE application after all, aren't I? I thought this is totally insane and just clicked the abort button. Hell, I'm not installing 400 MB of packages to get an IDE working. Anyway, why not use Kate? Sure, that would get the job done.

No, Thank-You-Very-Much

Except for the fact that it crashes everytime on startup. Hmmm, what choices am I left with? Hey, how about vi or Emacs? After all, real developers don't need pretty GUI to hack, right?!! Maybe, but you can call me a spoiled brat. At the end of the day, I decided to give Eclipse IDE for C++ a try and boy was I glad with the results, it's one solid IDE. Slow? yes. ugly? absolutely. functioning? Hell yes. Up until KDevelop4 matures enough to be usable (and useful for that matter), I'm sticking with Eclipse.

Wednesday, October 15, 2008

Frist Toast

Why does google shove blogspot's crappy Arabic UI down my throat? I can barely type this! Now I have to go hunting to change this mess to something I can actually use to write, you know, blogs. Enough with the first rant before I lose my sanity.