Upgraded to Linux

So after suffering tons of crashes (likely due to AMD drivers) and general system lagginess, I finally decided to ditch windows and move to linux full time.
This is on my home desktop which is more a family computer than something that only I would use.
I was a little apprehensive with driver support as usual and tricky stuff like suspend to ram (s3) which always seems highly driver dependent and problematic on Linux (it is still a pain on my XBMCBuntu box). Anyway, nothing like trying it out.

After looking around a bit, downloaded Linux Mint 15 (default and KDE). Booted with the Live CD and liked the experience – though GNOME seems a bit jaded and old. I liked KDE much better – esp since it seems more power user friendly.

So after testing hardware stuff (Suspend, video drivers and so on) – all of which worked flawlessly, I must say, I decided to go ahead and install it on one of my HDDs. Unfortunately, installation was rocky a bit – I don’t know if it was just me – the mint installer would progress up to preparing disks and hang there for 10+ minutes without any feedback I’m assuming it is reading partition tables and so forth – but no idea why it took so long. A thought it’d hung a couple of times – so terminated it and it was only accidentally that I found that it was still working – when I left it on its own for sometime and got back. It presented my the list of options (guided partition on entire disk, co locate with another OS etc) – but things actually went worse after this.

What seems to have happened is that my pending clicks on the UI all were processed and it proceeded to install on my media drive before I had a chance … wiped out my media drive. Thankfully, before installation I had a backup of the important stuff on that drive and so it wasn’t a biggie…
At this point, I was having serious doubts of continuing with Mint and was ready to chuck it out of the window and go back to Kubuntu or just back to Windows. However, I hung on – given that I’d wiped a drive, might as well install it properly and then wipe it if it wasn’t good.

Anwyay, long story short, I restarted the install, picked my 1TB drive and partitioned it as 20GB /, 10Gb /var, 1Gb /boot and remaining as unpartitioned.
Mint went through the installation and seemed to take quite sometime – there were a couple of points where the progress bar was stuck at some percentage for
multiple minutes and I wasn’t sure if things were proceeding or hung. In any case, after the partitioning window, I was more inclined to wait. Good that I did since the installation did eventually complete.

Feedback to Mint devs – please make the installer be more generous with feedback – esp if the installer goes into something that could take long.

First boot

Post installation, rebooted and grub shows my windows boot partition as well as expected. I still haven’t tried booting into windows so I that’s one thing to check. Booted into Mint and things looked good. Set up accounts for my dad and my wife. one thing I had to do was edit /etc/pam.d/common-password to remove password complexity (obscure) and set minlen=1

     password   [success=1 default=ignore]  pam_unix.so minlen=1 sha512

Next was to set up local disks (2 ntfs and 1 fat32 partition) so that they are mounted at boot and everyone can read and write to them. I decided to go the easy route and just put entries in /etc/fstab

UUID=7D64-XXX  /mnt/D_DRIVE    vfat      defaults,uid=1000,gid=100,umask=0007                   0       2
UUID="1CA4559CXXXXX" /mnt/E_DRIVE ntfs rw,auto,exec,nls=utf8,uid=1000,gid=100,umask=0007                0       2
UUID="82F006D7XXXX" /mnt/C_DRIVE ntfs rw,auto,exec,nls=utf8,uid=1000,gid=100,umask=0007                 0       2

That fixed the mount issue but still need to have them surface properly on the file manager (dolphin) – this was actually quite easy – I just added them as places, removed the device entries from the right click menu. This worked for me – I’d have liked to make this the default but didn’t find a way. Finally decided to just copy the ~/.local/share/user-places.xbel file to each local user and set owner.


Other than that, I also need to be able to connect my nexus 4 and 7 as MTP devices. I had read that this doesn’t work out of the box – but looks like that’s been addressed in ubuntu 13.04 (and hence in Mint)
I also need adb and fastboot – so just installed them through synaptic. BTW, that was awesome since it means that I didn’t have to download the complete android SDK just for two tools.

General impressions

Well, I’m still wondering why I didn’t migrate full time to linux all these years. THings have been very smooth – but I need to call out key improvements that I’ve seen till now

  1. Boot – fast – less than a minute. Compare that to upto 3 mins till the desktop is loaded on Win 7
  2. Switching users – huge huge speed up. On Windows, it would take so long that we would most of the times just continue using other’s login.
  3. Suspend/Resume – works reliably. Back in Windows, for some reason, if I had multiple users logged in, suspend would work but resume was hit and miss.
  4. GPU seems to work much better. Note here though that I’m not playing any games etc. I have a Radeon 5670 – but somehow on windows even Google Maps (new one) would be slow and sluggish while panning and zooming. Given that on Linux, I’m using the open source drivers instead of fglrx, I was expecting the same if not worse. Pleasantly surprised that maps just works beautifully. Panning,zooming in and out is smooth and fluid. Even the photospheres that I had posted to maps seem to load a lot more quickly.

Well, that’s it for now. I know that a lot of it might be ‘new system build’ syndrome whereas on windows gunk had built up over multiple years. However, note that my windows install was fully patched and up to date. Being a power user, I was even going beyond the default levels of tweaking (page file on separate disk from system etc) – but just got tired of the issues. The biggest trigger was the GPU crashes of course and here to updating to latest drivers didn’t seem to help much. I fully realize that its almost impossible to generalize things. My work laptop has Win 7×64 Enterprise and I couldn’t be happier – it remains snappy and fast in spite of a ton of things being installed (actually, maybe not – the linux boot is still faster) – but it is stable.
And of course, there might be a placebo effect at some places – but in the end what matters is that things work.


Yoohooo!! Successfully compiled Android from source


So my last weekend project had been to compile Android ICS from source. Given that the size of the repo itself is in excess of 6Gigs, just getting it down itself took the better part of Friday night and Saturday night. When I got down to running make on it, it was Sunday afternoon.

Needless to say, things didn’t work too well. I’m running this on a 32 bit Ubuntu 10.04 Virtualbox with a piddly 1GB RAM. When make failed the first time, realized that swap was a measly 300Mb. First steps first, went on to increase memory to 2GB (that’s all I can spare) and increased swap to 2Gs.

Compilation next round started and that failed too – ran out of disk space – and this was Sunday night. Things kind of stayed there and finally this evening, resized the disk in virtualbox to 50Gigs. Again started the compilation and this time ran into linker errors when building webcore. One more round of troubleshooting involved deleting the previously built static library and then running make again. Surprisingly, this time make completed successfully – to the point where I wasn’t sure if it had succeeded or just failed silently on something else.

The next step was to run the emulator to see if it really would boot up. Over at source.android.com, they oversimplify it when they say that you just run emulator from the android root folder. That didn’t work for me – and this time it was because I hadn’t sourced the envSetup.sh file… this thread http://groups.google.com/group/android-platform/browse_thread/thread/91ff18e034acf951 helped in tracking that one down.

So finally, after all that trouble, I have my very own ICS build running!!!!

For now, its onward ahoy to setting up Eclipse and starting with a fix I’ve been mulling about for sometime now..

Signing off from cloud nine

Ubuntu, Console VIM – weird characters in insert mode

Now that I feel quite comfy with VIM, over the weekend I needed to edit a config file in my Ubuntu 10.10 Virtualbox machine quickly. Instead of GVim, I just opened the file in console VIM. As I hit i to get into insert mode, a bunch of weird character boxes were inserted. That was not good at all ๐Ÿ˜ฆ – just when you think you’re comfortable with something if it does something totally weird. In any case, I was in too much of a hurry to bother and went about editing my file with gVim. Also, backspace was wonky (same weird characters) – so I felt better. For some reason that I fail to understand, why must Linux make proper backspace and delete handling such a pain! In any case, it’s something that I’ve dealt with enough times to know that there’ll be something on Google.

Later on, tried to see what all the fuss was about. Googling around, I found :help :fixdel and that seemed simple enough. Alas, when I tried it out, it didn’t fix the issue at all. Also, I seemed to be getting weird characters just pressing i to get into insert mode – and the VIM wiki page didn’t have anything about that. Neither did Google turn up anything that seemed related.

So today early morning, on a whim, read up a little on VIm terminal handling. I have the following in my .vimrc

set t_Co=256

Maybe it was the color escape code that was coming in – so checked out :echoe &term which returned xterm under gnome-console and builtin_gui under gvim. So I’ve put the following bit in my .vimrc and it seems to have fixed things nicely:

if &term == "xterm"
    set term=xterm-256color

Compiling VIM

Running ubuntu 10.10 here and ubuntu repos have only vim 7.2. I’m sure there’s a ppa out there that has 7.3, but thought
that compiling vim from source would be a good exercise – plus I get to compile it with the options that I’d like
rather than relying on someone’s build.

Here’s the options that I enabled:

    CONF_OPT_PERL = --enable-perlinterp=dynamic
    CONF_OPT_PYTHON = --enable-pythoninterp
    CONF_OPT_RUBY = --enable-rubyinterp
    CONF_OPT_GUI = --enable-gui=gtk2
    CONF_OPT_FEAT = --with-features=huge
    BINDIR   = /usr/bin
    DATADIR  = /usr/share

Here’s hte other dependencies I had to install

    sudo apt-get install libperl-dev ruby-dev python-dev libgtk2.0-dev

Once you have the deps installed, just run

    sudo checkinstall

Blogging with Vim

So now I’m in Vim land and this is the first time I’ve gotten far enough to feel a bit comfy. Decided to dust off my blog and start at it again – what better to do it in than in VIM.

So – TA-DA – here’s the first post – courtsey VIM on ubuntu. However, as usual, it was rougher than it’s supposed to be. IN any case, I’ll forget how I got this far the next time so the next few posts will be around recording how to get VIM to post to WP.com blogs.

But before that – the first thing to to is to get the VimRepress plugin. Better if you have pathogen installed, in which case you can do

    cd .vim
    git submodule add https://github.com/raghur/VimRepress bundle/VimRepress.git

That’s my fork on Github of https://github.com/connermcd/VimRepress.git which fixes a few things:

  • Makes VimRepress work properly through a proxy
  • Changes the attachment filename to a ‘.odt’ since WordPress.com doesn’t allow a text file attachment.

I still dont have a clue if doing this will break the plugin – but nevertheless, basic case of posting to my blog works and at this stage that seems good enough for me.

PS as you can see from this post – I’ve not yet got a hang of markdown syntax ๐Ÿ™‚

Dec 29th – PPS a couple of posts and one more tip for WordPress.com. WP.com does <br/> for hardbreaks in the markdown text. Obviously, this doesnt leave the post looking very good. I have the following in my .vimrc to get around this

        augroup Markdown
            autocmd FileType markdown set wrap 
                                    \ linebreak
        augroup END

You will also need to have python markdown installed once you have VimRepress running.

    easy_install markdown

A new tool for the toolbox!

Firstly – my VM setup:

I’m running Virtualbox with Xubuntu 9.10 on Win7 host – and its pretty. Its on a office standard issue Dell D531 – meaning they’re AMD Turion X2 TL-60 and 2GB of RAM.

Now the Turion’s supposed to have hw virtualization (AMD-V) however, the moment hw virtualization was enabled in virtualbox and I tried starting the vm, the machine would hard reboot!!!

After searching high and low, turns out that its an issue with Dell bioses and they dont have any updates. Here’s a page that tracks the issue. Imagine my happiness when a couple of days ago, found that dell had released an unofficial bios update (T12).Well, its gone in, and things are running swimmingly well – my VM now has 2 procs, is stable and I hardly feel I’m in a VM :). In fact, this post is coming from the VMย  – firefox with 12 tabs, a few terminals and emacs running on 600 MB of RAM.

Now let me come to the new tool I was talking about

I like to run the VM full screen – feels best that way. After trying out enough and more of multiple desktop softwares, have finally settled on VirtuaWin – beats the crap out of other tools, systray integration is great, has window rules and so on. Over the past couple of weeks, its come close to the ideal tool – does the job well and you hardly know its there ๐Ÿ™‚

andLinux with Hardy Heron

andLinux isย  built on top of co-linux (co operative linux) and basically runs side by side with Windows. andLinux packages the whole thing better (coLinux bundled with Xming and a nice systray app allowing you to launch Linux apps right in windows).

Here’s details on getting off the ground – and the reason that I have this post is that though andLinux comes with an installer application, it still needs some amount of fiddling under the hood to make it work. This post is just to make sure I can go through the process again when the time comes

  1. When installing andlinux, choose the COFS option for making your hard drive visible in Linux
  2. Install with the command line option to launch andLinux (do not install it as a service just yet)
  3. Post installation, tweak andlinux’s network setup – set up a couple of virtual TAP adapter . You will have to tweak things both on the linux side and on the windows side. Basically, you create a 2 TAP adapters – one is a loopback and another for sharing your LAN connection. Your wireless network is shared via Slirp (doesnt need a TAP adapter setup).
  4. Keep in mind a gotcha – slirp wont allow you to ping – so if you have only slirp working, then try a wget http://www.google.com to check if you have network connectivity.
  5. Start the andlinux server (or if its already running) make sure that your c drive is shared – on the bash prompt you should be able to do ls /mnt/windows
  6. do a apt-get update to update your package list. run an update. As of this time, the only prebuilt images on andlinux.org is gutsy.
  7. do a apt-get install update-manager-core
  8. run do-release-upgrade – and you should see apt running and updating your system to hardy.