Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Wednesday, May 30, 2012

Apple:Hype::Poteto:Potato

The more I spend time drooling about a Macbook Air or similar apple laptop, the more I realize that it's more hype and less substance (in comparison). Of course Jobs had a taste and Apple has added some quality tweaks in the hardware-software parts, apart from the synergy between OS and the underlying hardware, since they own both. Everything is sleek and chic and minimalist and beautiful and perfect and top class etc etc. Or so they say. They? who? Apple fanboys mostly, and then some people influenced by sheer deluge of oh-so-awesome reviews, many of which are posted by those who buy Macs because (they think) it makes them look cool and sets apart. I was/am partially influenced as well. Jobs was afterall one of the sharpest and shrudest salesman of all time.

Macbook vs Others

The hinge of my netbook got broken recently, and that was enough of a reason for me to get engrossed in one of my favourite-most pastimes - looking for a new netbook/laptop. I came across and was impressed by the specs of this ultraportable - Lenovo (previously IBM) Thinkpad X220 - when I was looking for something powerful, yet small and light. This 12" 1.5kg intel core-i3 runnning laptop fit the bill perfectly. It felt like exactly the thing I was looking for. Feature-rich, small and light-weight, yet very rugged, lots of ports, verry good battery life for such a loaded configuration and less than $888 (starter). There was just nothing wrong with it ... but for the dated looks. But even my Palio's dashboard has dated looks, so I have learned to dig under the show-off elements. It came across as one of the most practical ultra-portables ever. So out of curiosity, I checked what people were saying about this. And lo behold, I came across this Thinkpad X220 review on Engadget.

More than the scintillating review, which was equally all agog with the performance, the best part on the engadget review post was the comments section. There was a hillarious war that took place between Apple fanboys and IBM old-timers. And the later literally destroyed the Apple fanboys. There were some very informative, some very hillarious and some highly scathing remarks from both sides, mostly from the IBM'ers and I found their views very sound and balanced. The conclusion I found was simple, Apple is not the only company which makes well thought out, one of its kind machines - a view smartly propagated by their fanboys. But even IBM also makes some really really well thoght out, rugged products, catering to the needs of a different creed (the programmers, the engineers) that I identify with more, than I do with the Apple crowd.

While Apple gadgets are excellent and well designed beyond doubt, what I have started to realise is that they are also subjected to some real high marketing hype, which is like some kinda (unintended) FUD, generated through those users who "want to buy laptops which matches with their clothes and shoes". Or sometimes through those who are switching from Windows to Mac platform, and have obviously got impressed.

Mac OS X vs Ubuntu

Taking a clue, I tried to find out how someone who has switched from Linux to Mac, finds the new envioronment. And I was so lucky, I came across this blog-post by a programmer who switched from Ubuntu to Mac out of curiosity. If I had gone on to switch to Macbook, it would have been a Deja-Vu vis-a-vis this blog. So very similar a condition. I read with interest. And there I came to know that I wont have much to expect from Mac, except for some jazzy new UI luxury. Till the novelty wears out, that is. The fact that a long time Ubuntu user who was a programmer and hence a power user himself, finds Ubuntu to be the ultimate programmer's OS, after spending time on both sides of the fence, and returns back to Ubuntu, was enough of a testimony for me to start removing Macs from my wishlist, slowly but certainly.

Saturday, October 16, 2010

Tryst with HDR on Linux


Another delightful experience with Ubuntu and opensource in general.

I had been to a Raigad trip recently, and had got some pics in my DSLR. On checking out the photos, I realised I had couple of genuine cases for trying out HDR technique. Unfortunately, for each of the cases, I had only one image, and not an exposure-bracketed set of three images, as is usually required for composing an HDR image. Yet I had to try something. So what I did was to prepare three (virtually) exposure-bracketed copies from the same RAW image through ufraw, and thou
ght of feeding them into some HDR software.

Having those three differently exposed images in hand, allowed me to start looking for an HDR software for Linux. It's sometimes disappointing to see lots of such softwares are created mainly for the Windows platform, or sometimes for a Mac. An example would be the popular one - Photomatix

On my previous Ubuntu (Jaunty), I had this Qtfpsgui software. But it didn't appeal, and confused me a bit. Besides, it requires K-Desktop libraries, which would take quite some time for download and installation. So I kept searching for an alternative. And this is when I chanced upon this software called - Enfuse. It's available as part of the Enblend software pack for Linux, and is there in the Ubuntu repository. So all you need to do, to install it, is to type "sudo apt-get install enblend" in the terminal and press enter!! I got it installed
on my Lucid Lynx setup.

In addition to Enfuse and Ufraw, I used one enfuse_raw.sh script mentioned on this page
. That script uses ufraw in batch mode to expose a RAW file using different exposure compensation levels. It then uses enfuse to combine those images into an HDR image. So all you have to do is - to feed your RAW file to the enfuse_raw.sh script and specify how many different expousures to process/extract from the RAW file, for combining into an HDR. Run the command, wait for maybe couple of minutes, and bingo! Your HDR image is ready.

Here, check these few images after they were processed into HDR using ufraw-enfuse combo on Linux. To emphasise how HDR has impacted the image details, against mere exposure adjustments, I have prepared a collage of each HDR (big size) surrounded by exposure adjusted images (thumbnails). I am sure you will appreciate what a fine job Enfuse does.

1. Varandha Ghaat:
The mountain on the left side is in dark shadows. You increase the exposure, the details in the shadow become clearer, but the sky and the area in sunlight blows out. Decrease the exposure, skies and the area in the sunlight is detailed but details in the shadow are gone. Enter HDR.


2
. Shivaji Maharaj:
Similar case here. Increase the exposure to get details in the statue, and you end up blowing up the blue sky white. Decrease the exposure, get a cool blue sky, but the statue appears as a silhoutte. Now check the HDR.



3. Varandha Ghaat (again):
Same dilemma. Left side area is in dark shadow, while the right side area is in bright sunlight. Camera doesnt know how to balance. Hire HDR.



Summary of what I did:
1. Install enblend and ufraw - "sudo apt-get install enblend, ufraw"
2. Get the enblend_raw.sh script from this page - http://ubuntuforums.org/showthread.php?t=741161
3. Feed the RAW file to the script. e.g. "./enfuse_raw.sh my_snap.raw -3"

Time to marvel at what you can quite easily achieve using opensource, without spending a penny. *Legally*.

Friday, April 24, 2009

Connecting to Internet on Ubuntu using GPRS on HTC PDAs

I own an awesome O2 XDA Orbit (base model - HTC P3350) PDA which has kept me satisfied with its features for almost last 2 years. Coupled with a fantastic GPRS plan from Idea (with really good connection speeds, I admit), it was very easy for me to remain connected  24x7. When my laptop had Windows (OEM version that came with my Dell Vostro), the internet connection sharing feature on the PDA allowed me to use GPRS internet on my laptop whenever I visited Sangli. Windows used to automatically configure itself to use this GPRS internet (I didn't like it though, as these things were happening without me knowing any details).

Then came a day when I got frustrated enough with Windows, and destroyed windows (with all its partitions) once and for all, from my laptop, and installed 3-4 different linux flavours instead. That (golden) day was Sunday 8 March 2009.

Since then, I have never missed windows again, but for some exceptions like iTunes, which is just not available on windows (see my previous post about this - iTunes for Ubuntu) or configuring different networking interfaces (like autoconnecting to wireless networks). Connecting to GPRS internet connection provided by my PDA to Ubuntu, had been one such problem that I didn't have a clue about.

The solution, though, turned out to be pretty simple. There are two ways to share Internet Connection from a windows mobile 6 device, like my O2 XDA Orbit -
  1. USB
  2. Bluetooth PAN

USB Connection (RNDIS)


What is needed is an RNDIS (Remove Network Device Interface Specification) driver on Ubuntu.
So get the sources of one such driver, build it and install the kernel module -

shreyas@ghatotkatch:~$ svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
shreyas@ghatotkatch:~$ cd usb-rndis-lite
shreyas@ghatotkatch:~/usb-rndis-lite$ make
shreyas@ghatotkatch:~/usb-rndis-lite$ sudo ./clean.sh
shreyas@ghatotkatch:~/usb-rndis-lite$ sudo make install


Then edit the network interface file -

shreyas@ghatotkatch:~/usb-rndis-lite$ sudo emacs /etc/network/interfaces

Add following entries to the interfaces file -

auto rndis0
iface rndis0 inet dhcp


Save the file and restart your network interfaces -

shreyas@ghatotkatch:~/usb-rndis-lite$ sudo /etc/init.d/networking stop
shreyas@ghatotkatch:~/usb-rndis-lite$ sudo /etc/init.d/networking start


That's it. Now on your WM6 PDA, select Start>Programs>Internet Connection Sharing.
I assume you have already configured GPRS on your PDA. So in the Internet Connection Sharing app, select USB as PC-Connection type, and click Connect. Now connect your PDA to the USB port.

The RNDIS connection should be automatically configured and the rndis0 interface should have got an IP address. To check this, run /sbin/ifconfig command, and verify the rndis0 interface.

Reference - http://forums.opensuse.org/1579065-post1.html


Bluetooth PAN

It has been my experience that Bluetooth PAN (Personal Area Network) slows down the internet connection a bit (as compared to connecting to USB) and also eats into the device battery.

Anyway, to configure a Bluetooth PAN on Hardy Heron (8.04), you need to install atleast following packages -

shreyas@ghatotkatch:~$ sudo apt-get install bluez bluez-compat

The network interfaces file will need to be edited -

shreyas@ghatotkatch:~$ sudo emacs /etc/network/interfaces

Add a new interface for our Bluetooth PAN -

auto benp0
iface benp0 inet dhcp


Then add the bnep module to the kernel. This module takes care of the Bluetooth PAN interface. By the way, BNEP stands for Bluetooth Network Encapsulation Protocol.

shreyas@ghatotkatch:~$
sudo modprobe bnep

Now select Bluetooth PAN as PC Connection type in internet connection sharing app on your PDA, and try to find the PDA from your laptop / PC - 

shreyas@ghatotkatch:~$ hcitool scan
Scanning ...
    00:17:E5:3F:BE:E8    hexaM!ner


Use the hex string to connect to the PAN network -

shreyas@ghatotkatch:~$ sudo pand --connect 00:17:E5:3F:BE:E8


That's it. You should be connected, and your bnep0 interface should have got a brand new IP address. You can verify it using /sbin/ifconfig.

Reference: This article on samiux.wordpress.com


Technorati Tags: , , , ,

Sunday, March 15, 2009

iTunes for Ubuntu

Since long I have been finding a replacement for iTunes on Ubuntu, but in vain. I don't want to use CrossOver Office as it's proprietary, and don't want to install the bloated Windows Vista in VirtualBox and waste many GBs of storage just for the sake of one iTunes. Since making the switch to Ubuntu/Kubuntu twins, I haven't missed Windows at all. In fact, now I am realising what I was missing with OEM windows running on my Dell laptop. Nowadays, I feel disgusted even at the thought of going back and installing Windows.

The next thing on my agenda is of-course trying to get iTunes running through Wine, though, I have read pretty many comments about problems in this approach. I am not very positive about it.

That leaves me with the thought - why doesn't Apple come out with an iTunes version for ubuntu (or linux in general)? Especially when Ubuntu has gone mainstream with a bang, with many hardware manufactures (like Dell) shipping their units with Ubuntu. Though I don't know exact figure of ubuntu users, given the life in the ubuntu community and forums, it's easy to guess that there is a sizeable amount in there.

If you are an ubuntu user, and you think on the similar lines, I request you to sign the iTunes for Ubuntu Petition.

There are currently 2000 odd signatures there. It doesn't take time to sign the petition. Every sign will help, so please sign the petition.


Saturday, March 14, 2009

Skype / Ekiga on Ubuntu 8.04 Hardy Heron

As GTalk doesn't support Linux for VoIP communication, I needed some alternative VoIP software, that works well on Ubuntu. There were couple of them Ekiga and Skype.

Ekiga comes pre-installed in Hardy. So I started with Ekiga and registered for a SIP address on ekiga.net. But unfortunately, ekiga failed to communicate with sound hardware on my Dell Vostro 1500 laptop. So I downloaded Skype for Ubuntu. Same story.


So I searched the net, and finally got it working. It turned out that the pulseaudio package was the culprit. Skype and Ekiga both don't work with pulseaudio. They work with esound package. So I decided to remove pulseaudio and install esound instead. Before removing pulseaudio, I disabled PusleAudio Session Management from System->Preferences->Sessions.




And then -

killall pulseaudio
sudo apt-get remove pulseaudio
sudo apt-get install esound

On some setups (probably on intrepid), it might be required to remove a file from /etc/X11/Xsession.d so that the Ubuntu login process doesn’t break.

sudo rm /etc/X11/Xsession.d/70pulseaudio

This is not required on Hardy though; there is no such file in Hardy. I think disabling of PulseAudio Session Management, does the trick instead.

After installing esound, and restarting both skype and Ekiga, though I could hear Ringing, and Sound Outs from Skype, the mic was still not working in test call. Then after playing with the system for sometime I realised that the mic was muted. I had to enable mic boost control from Volumn Control->Edit->Preferences and tick Capture and Capture-1.



And then, when I un-muted the mic, skype worked flawlessly. And after skype, Ekiga also started working when I set Audio In and Audio Out devices to HDA Intel.


Interesting Part

Now, here is the interesting part. After playing around with skype and ekiga for a lot of time, I came to know that I had an uninterruptible process (elisa media player) parented by a python zombie process. I rebooted the system, since there is no other effective way to get rid of these zombies, and elisa was consuming 100% of my CPU2 (at least that's what the system monitor reported).

Ubuntu got stuck during reboot, I am not sure for what reason. So I had to power the system off. When I powered it back up again, I could login and there were no error messages related to pulseaudio. But the UI was totally unresponsive, as if it has hanged. iThen I switched back to command line mode using CTRL-ALT-F5, logged in, removed esound and reinstalled pulseaudio.

sudo apt-get remove esound
sudo apt-get install pulseaudio
sudo reboot


And after reboot, the UI was back to life again. So it was the pulseaudio which caused this freeze. Out of curiosity, I started Skype and made a test call. And to my surprise, both mic and audio playback worked!!! Now this was not expected, as skype initially refused to work with pulseaudio. So did ekiga.

I started the PulseAudio Session Management as well, still Skype and Ekiga worked perfectly.


Conclusion

It seems that, on Hardy, Skype and Ekiga, both work with pulseaudio, and it was probably due to  the zombie process of elisa media player hogging the sound device that caused problems with audio playback and mi, in Skype/Ekiga.

So finally, it seems that, on Ubuntu 8.04 Hardy Heron, you don't need to remove anything or install anything, to get Skype and Ekiga working!!! And this whole post of mine turns out to be a pure waste of time and energy!!!! :(


An Update -

Just in case somebody is interested, there is a very informative post about pulseaudio and how to get it working, on ubuntuforums.org - HOWTO: PulseAudio Fixes & System-wide Equalizer Support


Technorati Tags: , , , , ,