Suramya's Blog

Visit Who am I?

September 27, 2016

How to install Tomato Firmware on Asus RT-N53 Router

Filed under: Computer Software,Knowledgebase,Techie Stuff,Tutorials — Suramya @ 11:43 PM

I know I am supposed to blog about the all the trips I took but wanted to get this down before I forget what I did to get the install working. I will post about the trips soon. I promise 🙂

Installing an alternate firmware on my router is something I have been meaning to do for a few years now but never really had the incentive to investigate in detail as the default firmware worked fine for the most part and I didn’t really miss any of the special features I would have gotten with the new firmware.

Yesterday my router decided to start acting funny, basically every time I started transferring large files from my phone to the desktop via sFTP over wifi the entire router would crash after about a min or so. This is something that hasn’t happened before and I have transferred gigs of data so I was stumped. Luckily I had a spare router lying around thanks to dad who forced me to carry it to Bangalore during my last visit. So I swapped the old router with the new one and got my work done. This gave me an opportunity as I had a spare router sitting on my desk and some time to kill so I decided to install a custom firmware on it to play with it.

I was initially planning on installing dd-wrt on it but their site was refusing to let me download the file for the RT-N53 model even though the wiki said that I should be able to install it. A quick web search suggested that folks have had a good experience with the Tomato by Shibby firmware so I downloaded and installed it by following these steps:

Download the firmware file

First we need to download the firmware file from the Tomato Download site.

  • Visit the Tomato download Section
  • Click on the latest Build folder. (I used build5x-138-MultiWAN)
  • Click on ‘Asus RT-Nxx’ folder
  • Download the ‘MAX’ zip file as that has all the functionality. (I used the file.)
  • Save the file locally
  • Extract the ZIP file. The file we are interested in is under the ‘image’ folder with a .trx extension

Restart the Router in Maintenance mode

  • Turn off power to router
  • Turn the power back on while holding down the reset button
  • Keep holding reset until the power light starts flashing which will mean router is in recovery mode

Set a Static IP on the Ethernet adapter of your computer

For some reason, you need to set the IP address of the computer you are using to a static IP of with subnet and gateway If you skip this step then the firmware upload fails with an integrity check error.

Upload the new firmware

  • Connect the router to a computer using a LAN cable
  • Visit
  • Login as admin/admin
  • Click Advanced Setting from the navigation menu at the left side of your screen.
  • Under the Administration menu, click Firmware Upgrade.
  • In the New Firmware File field, click Browse to locate the new firmware file that you downloaded in the previous step
  • Click Upload. The uploading process takes about 5 minutes.
  • Then unplug the router, wait 30 seconds.
  • Hold down the WPS button while plugging it back in.
  • Wait 30 seconds and release the WPS button.

Now you should be using the new firmware.

  • Browse to
  • Login as admin/password (if that doesn’t work try admin/admin)
  • Click on the ‘reset nvram to defaults’ link in the page that comes up. (I had to do this before the system started working but apparently its not always required.)

Configure your new firmware

That’s it, you have a router with a working Tomato install. Go ahead and configure it as per your requirements. All functionality seems to be working for me except the 5GHz network which seems to have disappeared. I will play around with the settings a bit more to see if I can get it to work but as I hardly ever connected to the 5GHz network its not a big deal for me.


The following sites and posts helped me complete the install successfully. Without them I would have spent way longer getting things to work:

Well this is it for now. Will post more later.

– Suramya

February 20, 2016

How to encrypt your Hard-drive in Linux

We have heard multiple stories where someone looses a pendrive or a laptop containing sensitive/private data which is then published by the person who found the drive embarrassing the owner of the data. The best way to prevent something like that from happening to you if you loose a disk is to make sure all your data is encrypted. Historically this used to be quite painful to setup and required a lost of technical know-how. Thankfully this is no longer the case. After trying a bunch of different options I found Linux Unified Key Setup-on-disk-format (LUKS) to be the most user-friendly and easy to setup option for me.

Setting it up is quite easy by following the instructions over at However since things on the internet have a tendency of disappearing on a fairly frequent basis, I am using this post to save a paraphrased version of the installation instructions (along with my notes/comments) just in case the original site goes down and I need to reinstall. All credit goes to original author. So without further ado here we go:

Install cryptsetup

First we need to install cryptsetup utility which contains all the utilities we need to encrypt our drive. To install it in Debian/Ubuntu you just issue the following command as root:

apt-get install cryptsetup

Configure LUKS partition

Warning: This will remove all data on the partition that you are encrypting. So make sure you have a working backup before proceeding amd don’t blame me if you manage to destroy your data/device.

Run the following command as root to start the encryption process:

cryptsetup -y -v luksFormat <device>

where <device> is the partition we want to encrypt (e.g. /dev/sda1). The command will ask you for confirmation and a passphrase. This passphrase is not recoverable so make sure you don’t forget it.

Create drive mapping

Once the previous command completes you need to create a mapping of the encrypted drive by issuing the following command:

cryptsetup luksOpen <device> backup2

You can also map a partition to using its UUID (which is what I do) by issuing the following command instead (This works great if you want to script automated backups to an external drive):

cryptsetup luksOpen UUID=88848060-fab7-4e9e-bac2-f9a2323c7c29 backup2

Replace the UUID in the example with the UUID of your drive. (Instructions on how to find the UUID are available here).

Use the following command to see the status for the mapping and to check if the command succeeded:

cryptsetup -v status backup2

Format LUKS partition

Now that we have created the mapping we need to write zeroes to the encrypted device, to ensure that the outside world sees this as random data and protects the system against disclosure of usage by issuing the following command:

dd if=/dev/zero of=/dev/mapper/backup2

Since this command can take a long time to complete depending on the drive size and dd by default doesn’t give any feedback on the percentage completed/remaining I recommend that you use the pv command to monitor the progress by issuing the following command instead:

pv -tpreb /dev/zero | dd of=/dev/mapper/backup2 bs=128M

This will take a while to run so you can go for a walk or read a book while it runs. Once the command completes you can create a filesystem on the device (I prefer to use ext4 but you can use any filesystem you like) by formatting the device:

mkfs.ext4 /dev/mapper/backup2

After the filesystem is created you can mount and use the partition as usual by issuing the following command:

mount /dev/mapper/backup2 /mnt/backup

That’s it. You now have an encrypted partition that shows up as a regular partition in Linux which you can use as a regular drive without having to worry about anything. No special changes are needed to use this partition which means any software can use it without requiring changes.

How to unmount and secure the data

After you are done transferring data to/from the drive you can unmount and secure the partition by issuing the following commands as root:

umount /mnt/backup

followed by

cryptsetup luksClose backup2

Creating a backup of the LUKS headers

Before you start anything else, you should create a backup copy of the LUKS header because if this header gets corrupted somehow then all data in the encrypted partition is lost forever with no way to recover it. From the cryptsetup man page:

“LUKS header: If the header of a LUKS volume gets damaged, all data is permanently lost unless you have a header-backup. If a key-slot is damaged, it can only be restored from a header-backup or if another active key-slot with known passphrase is undamaged. Damaging the LUKS header is something people manage to do with surprising frequency. This risk is the result of a trade-off between security and safety, as LUKS is designed for fast and secure wiping by just overwriting header and key-slot area.”

Create a backup by issuing the following command:

cryptsetup luksHeaderBackup <device> --header-backup-file <file>

Important note: a LUKS header backup can grant access to most or all data, therefore you need to make sure that nobody has access to it.

In case of disaster where our LUKS header gets broken, we can restore it by issuing the following command:

cryptsetup luksHeaderRestore <device> --header-backup-file <file>

How to remount the encrypted partition?

Issue the following commands in sequence to mount the partition:

cryptsetup luksOpen <device> backup2
mount /dev/mapper/backup2 /mnt/backup

Please note that data encrypted by LUKS is quite obvious with most Linux systems identifying it as an encrypted partition automatically. So if someone examines your system they will know you have encrypted data and can force you to divulge the password by various means (including the use of Rubber-hose Cryptanalysis. )

If you want the encrypted partition to be hidden then you can use Deniable encryption/Hidden Partition or use steganography. I haven’t really used either so can’t comment on how to set it up correctly but maybe I can talk about it in a future post after I explore them a bit more.

Well this is all for now, hope you find this useful. Will write more later.

– Suramya

May 6, 2015

How to Root a second generation Moto x running Lollipop

Filed under: Knowledgebase,Techie Stuff,Tutorials — Suramya @ 11:22 PM

I got my new phone today and as usual the first thing I did was root it before I started copying data over so that I don’t loose data when I unlock the boot loader. The process required a bit of work mainly because I was following instructions for KitKat while my phone was running Lollipop. That caused the phone to go into this funky state where the Play Store API’s went MIA and the entire thing stopped working to the point that I had to do a hard reset to get back to a stable state.

BTW, before you continue please note that this will delete all data on the phone so you need to ensure that you have a proper backup before proceeding. Without further ado, here are the steps I followed to get things to work using my Linux (Debian) desktop:

Unlock the Bootloder

The first thing you have to do is unlock the Boot loader on the phone:

  • Install the Android SDK by issuing the following command:
    apt-get install android-tools-adb android-tools-fastboot
  • Run the following command:
    fastboot oem get_unlock_data
  • Take the string returned, which would look something like this:
    (bootloader) 0A40040192024205#4C4D3556313230
    (bootloader) 30373731363031303332323239#BD00
    (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
    (bootloader) 1A3E5#1F53280002000000000000000
    (bootloader) 0000000

    and concatenate the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. Your string needs to look like this:

  • Visit the Motorola Website.
  • Paste the string you got in the previous step on the site, and then click on the ‘Can my Device be Unlocked?’ button and if your device is unlockable, a “REQUEST UNLOCK KEY” button will now appear at the bottom of the page.
  • Click on the “REQUEST UNLOCK KEY” Button.
  • You will now receive a mail with the unlock key at your registered email address
  • Start your device in fastboot mode by pushing and holding the power and volume down at the same time. Then release the power button followed by the volume down button. The device will now power up in fastboot mode.
  • Run the following command to unlock the bootloader:
    fastboot oem unlock 
  • If the code was correct then you will see a message confirming that your device was unlocked and the phone will reboot.

Enable Developer Options/USB Debugging

In order to proceed further we need to enable USB Debugging and in order to do that we need to enable Developer Options following these steps:

  • Pull down the notification drawer and tap on ‘Settings’
  • Scroll down to ‘About Phone’
  • Now scroll down to ‘Build Number’
  • Tap on ‘Build Number’ 7 times.
  • It’ll now say that you are a developer. Now press back, You should now see Developer Options above About Phone.

  • Click on ‘Developer Options’
  • Check the box next to ‘USB debugging’ and save

Root the Phone

First we need to download the correct image file for the model of your phone. I had to look up my model on Wikipedia because for some reason my phone decided not to share that information with me. Use the appropriate link for your model in the list below. I have a XT1092 but the XT1097 image worked fine for me.

After downloading the file, extract it. Run the following command:

adb reboot bootloader

This will restart the phone in the fastboot mode. Then boot using the image you downloaded in the previous step using this command:

fastboot boot /path/to/image/file/CF-Auto-Root-victara-victararetbr-xt1097.img

Once you run the command the Device will boot up, install su and quickly reboot (this is automatic, no user intervention is required). After the phone starts up, you need to install Chainfire’s SuperSU from the Play Store.

After that you are done and your phone is rooted. You can verify the same by installing a ‘Root Verifier’ application from the store.
Well this is all for now, will write more later.

– Suramya

April 26, 2015

How to create Electric Ink for projects

Filed under: Interesting Sites,Knowledgebase,Techie Stuff — Suramya @ 9:48 AM

At times using wires in a project might not be the most practical option because of space/weight limitations. If that is the case then you should take a look at Electric Ink for creating cheap circuits. In fact you can make your own Electric Ink using a process which is quite simple. The good folks at the Popular Science site have provided us with an instruction guide that I am reproducing here so that I don’t loose the instructions in case PopSci decides to reorg their site:


  • Powdered graphite
  • White vinegar
  • Syringe
  • Elmer’s clear glue (I think any clear glue should work)


  • To make the ink, put powdered graphite in a cup, cover with vinegar, and stir. Let it sit for a few minutes.
  • Once the graphite settles on the bottom of the cup, remove the clear liquid on top with a syringe.
  • Stir in about a teaspoon of glue to keep the graphite suspended. A thick line of paint has a resistance of a few kilohms per inch.
  • Draw the circuit, wait for it to dry and then you can test it out.

I was wondering if this would work on T-Shirts, under a laminate or other such protective coating to prevent the circuit from getting washed out. Maybe I should try this out over the weekend on one of my old T-Shirts. Wonder what kinds of design’s I would be able to make before hitting issues if this works.

– Suramya

April 17, 2015

How to find information when Google can’t find it

Filed under: Computer Tips,Interesting Sites,Knowledgebase,Techie Stuff — Suramya @ 10:36 PM

For most people if you can’t find something on Google then it’s not there on the internet. However that is not true and there are other ways to find the information you are looking for even if Google can’t find it. Now some of you might be wondering, how can something be online without Google knowing about it because don’t they index everything? Unfortunately, that is not true. According to studies there are a lot of sites out there that are not indexed by any search engine. This part of the internet is called the Deep Web. Deep web is not to be confused with Dark Net which contains sites that can’t be reached via the regular internet. Deep Web sites are accessible via the regular internet and it is a lot bigger than the visible internet. In-fact some estimates suggest that the deep web is 400 to 550 times larger than the surface web.

So how do you find something that is in the Deep web or just not indexed by Google? Well, you can always try one of the following options depending on what you are looking for.

Wolfram Alpha

For example, if you are making factual queries about data (e.g. facts, figures, etc) then you should take a look at Wolfram Alpha. Their Wikipedia page explains how the engine works:

Users submit queries and computation requests via a text field. Wolfram Alpha then computes answers and relevant visualizations from a knowledge base of curated, structured data that come from other sites. The curated data makes Alpha different from semantic search engines, which index a large number of answers and then try to match the question to one.

Using the Mathematica toolkit, Wolfram Alpha can respond to natural language questions and generate a human-readable answer.


Topsy maintains a comprehensive index of tweets and since Twitter is the best place for real-time sharing of thoughts/news then it is a good place to search for current events/trending topics. I just tried it out and it looks to be pretty effective and efficient.

Image Search

If you are trying to identify an image, or find more information about a particular Image then you can always try Google image search. However if that doesn’t return any relevant results then you should try out specialized Image search engines like Tin Eye or I use a Firefox Extension called Who Stole my Pictures that lets you search across multiple engines in one shot from your context menu. Side note: This also search on Bing but 99.99% of the time Bing doesn’t return any results no matter what you search for.

On the other hand if you are just searching for images you should try which is a image search service allowing a user to search across over 3 billion pictures (as per the site).

WebForums and Discussion boards

Another great way to find answers is to search on enthusiast forums and discussion boards. These forums have a whole community of folks who are passionate about that particular topic and would love you to point you in the right direction or walk you through figuring out the solution. Just ensure that you are asking Questions The Smart Way. allows you to search across multiple discussion boards and forums available on the net. has multiple sub sections on hundreds of topics, has subreddits that focus on thousands of topics and most of them have actual relevant information as not all of the site is dedicated to cat video’s.


IRC stands for Internet Relay Chat and is designed to facilitate group communication in discussion forums, called channels hosted on IRC servers. There are channels dedicated to pretty much any topic you can think of on some IRC server somewhere and you can get answers to questions or help with a problem in real time.

The difficult part is finding the appropriate channel to ask your question.

I have used IRC Search in the past to find channels with a good success rate. Another option is

In addition to the options listed above, you should also check out the following resources for additional information and search options/methods that you can try out when searching for data:

That pretty much covers what I wanted to talk about in this post so this is all for now. Will post more later.

– Suramya

March 29, 2015

Rosetta Stone for Unix/Linux

Filed under: Knowledgebase,Linux/Unix Related,Techie Stuff — Suramya @ 9:53 PM

If you have been in the industry for a while then you have been in a situation where you need to do something on the server but have no idea what the appropriate command is because you always worked on a different variant/version of the Operating System. Think having to work on Solaris or Linux when all you have worked on is the Mac OS. To make things easier for the poor admins that have to keep switching OS’s, Bruce Hamilton has created a site he calls the ‘Rosetta Stone: A Sysadmin’s Universal Translator‘. This site has a list of tasks and the corresponding command that you would have to run for each of the OS’s. The Stone supports the following OS’s:

  • AIX
  • A/UX
  • DG/UX
  • FreeBSD
  • HP-UX
  • IRIX
  • Linux
  • Mac OS X
  • NCR Unix
  • NetBSD
  • OpenBSD
  • Reliant
  • SCO OpenServer
  • Solaris
  • SunOS 4
  • Tru64
  • Ultrix

and covers tasks in the following categories:

  • hardware
  • firmware
  • devices
  • disks
  • kernel
  • boot
  • files
  • networking
  • security
  • software
  • patching, tracing, logging

Check it out, bookmark it. It will save you some grief down the line the next time you are in this situation.

– Suramya

December 14, 2014

Cleaning your Linux computer of cruft and duplicate data

When you use a computer and keep copying data forward everytime you upgrade or work with multiple systems it is easy to end up with multiple copies of the same file. I am very OCD about organizing my data and still I ended up with multiple copies of the same file in various locations. This could have happened because I was recovering data from a drive and needed a temp location to save the copy or forgot that I had saved the same file under another directory (because I changed my mind about how to classify the file). So this weekend I decided to clean up my system.

This was precipitated because after my last system reorg I didn’t have a working backup strategy and needed to get my backups working again. Basically I had moved 3 drives to another server and installed a new drive on my primary system to serve as the Backup drive. Unfortunately this required me to format all these drives because they were originally part of a RAID array and I was breaking it. Once I got the drives setup I didn’t get the chance to copy the backup data to the new drive and re-enable the cron job that took the daily backup snapshots. (Mostly because I was busy with other stuff). Today when I started copying data to the new Backup drive I remembered reading about software that allowed you to search for duplicate data so thought I should try it out before copying data around. It is a good thing I did because I found a lot of duplicates and ended up freeing more than 2 GB of space. (Most of it was due to duplicate copies of ISO images and photos).

I used the following software to clean my system:

Both of them delete files but are designed for different use cases. So let’s look at them in a bit more detail.


FSlint is designed to remove lint from your system and that lint can be duplicate files, broken links, empty directories and other cruft that accumulates when a system is in constant use. Installing it is quite easy, on Debian you just need to run the following command as root

apt-get install fslint

Once the software is installed, you can either use the GUI interface or run it from the command line. I used the GUI version because it was easier to visualize the data when seen in a graphical form (Yes I did say that. I am not anti-GUI, I just like CLI more for most tasks). Using the software was as easy as selecting the path to search and then clicking on Find. After the scan completes you get a list of all duplicates along with the path and you can choose to ignore, delete all copies or delete all except one. You need to be a bit careful when you delete because some files might need to be in more than one location. One example for this situation is DLL files installed under Wine, I found multiple copies of the same DLL under different directories and I would have really messed up my install if I had blindly deleted all duplicates. has a nice FSlint manual that explains all the other options you can use. Check it out if you want to use some of the advanced features. Just ensure that you have a good backup before you start deleting files and don’t blame me when you mess up your system without a working backup.


BleachBit is designed for the privacy conscious user and allows you to get rid of Cache, cookies, Internet history, temporary files, logs etc in a quick and easy way. You also have the option to ensure that the data deleted is really gone by overwriting the file with random data. Obviously this takes time but if you need to ensure data deletion then it is very useful. Bleachbit works on both Windows and Linux and is quite easy to install and use (at least on Linux, I didn’t try it on Windows). The command to install it on Debian is:

apt-get install bleachbit

The usage also is very simple, you just run the software and tick the boxes relevant to the clutter that you want gone and BleachBit will delete it. It does give you a preview of the files it found so that you can decide if you actually want to delete the stuff it identifies before you delete it.

Well this is all for now. Will write more later.

Thanks to How to Sort and Remove Duplicate Photos in Linux for pointing me towards FSlint and Ten Linux freeware apps to feed your penguin for pointing me towards BleachBit.

– Suramya

October 7, 2014

Find Recent Files in Windows with the Run Dialog

Filed under: Computer Tips,Knowledgebase — Suramya @ 5:40 AM

Tip for all you windows 8 users out there, If you want to see a history log of every file that you have touched on your computer, there is a easy built-in way of getting that information without installing any special software on Windows 8 by following these steps:

  • Open the run dialog box by pressing Win + R
  • Type in “recent” (without the quotes)
  • Click ‘OK’

This will display any file you’ve touched, as well as the last time it was modified all in one place. You can also access this data by browsing to the following location using ‘Windows Explorer’:



– Suramya

March 8, 2013

Citrix on Raspberry Pi: Updated instructions and working download image

Filed under: Knowledgebase,Linux/Unix Related,Techie Stuff,Tutorials — Suramya @ 2:36 PM

A couple of folks have reached out to me via email/messages to tell me that the instructions I posted at the Raspberry Pi forums don’t work with the latest version of Rhaspbian. Basically the problem is that the latest version of the Citrix client is not compiled for the armhf architecture (Which is what the latest version of Rhaspbian OS is compiled for), so you need to download and install the armel version of the OS (‘Soft-float Debian “wheezy”’) from

To make life simpler for people I have created a snapshot of my Pi install with Citrix installed and configured. You can download it from here. The image is 4GB so you will need to use a card of atleast that size when using this image. Follow these steps to install the image to an SD card in Linux:

  • Download the image file from the mirror (Approx 1GB compressed)
  • Unzip the file using the command
  • unzip
  • Find out what the partition the SD card you are using has been assigned running the following command as root
  • fdisk -l

    Once you run the command, you will get an output that will show you all the disks attached to your system, look for the entry that corresponds to your card. In my case it looked like this:

     Disk /dev/sde: 3965 MB, 3965190144 bytes
    122 heads, 62 sectors/track, 1023 cylinders, total 7744512 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016187
       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1            8192      122879       57344    c  W95 FAT32 (LBA)
    /dev/sde2          122880     7744511     3810816   83  Linux
  • So now we know that the card is at /dev/sde. All we have to do is write the image to the card and that is done using the following command. Make sure you replace the /dev/sde with the correct path otherwise you will end up destroying all data on the wrong drive.
  • dd if=Raspberry_Citrix.img of=/dev/sde bs=4096

    You will not see any output on the screen so don’t worry about it, just let it run and wait for the process to complete as it will take some time because of the amount of data being written. Once the process completes you can eject the card and if all went well you should be able to boot the Raspberry Pi from the card.

The login password for this image is root/password, please do change the password if you use the image. Let me know if you have any questions or have an issue using this image.

Update (3/28/2013): Adding instructions on how to write the image when using windows. (Please note that I haven’t tested the windows instructions as I don’t have a windows machine. Use at your own risk)

Once you download the zip file from the mirror, right-click on it and select extract (I think that’s what it says, but I don’t have a windows machine so can’t confirm). After the image is extracted you will have a file called Raspberry_citrix.img on your computer. Now follow these steps to write the image to an SD card (Instructions taken from eLinux)

  • Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. If the card is not new, you should format it and make sure there is only one partition (FAT32 is a good choice); otherwise Win32DiskImager can make corrupt your SD card!
  • Download the Win32DiskImager utility. The download links are on the right hand side of the page, you want the binary zip.
  • Extract the executable from the zip file and run the Win32DiskImager utility. You should run the utility as Administrator!
  • Select the Raspberry_citrix.img image file you extracted earlier
  • Select the drive letter of the SD card in the device box. Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer’s hard disk!
  • Click Write and wait for the write to complete.
  • Exit the imager and eject the SD card.

You should also go through the Basic setup guide for Raspberry Pi. Hope this helps.

– Suramya

August 4, 2012

Reinstalled system after accidental removal of KDE. Pleasantly surprised by ease of configuration

Filed under: Computer Tips,Knowledgebase,Linux/Unix Related,Techie Stuff — Suramya @ 11:19 PM

Last night I was trying out stuff on my computer and decided to install virtual box on the system to allow me to install Windows in a virtual environment. I ran the command to install virtual box and then said ok without paying too much attention to what it was doing. As a punishment for that, the apt-get program proceeded to uninstall most of the KDE environment on the system leaving me with Gnome as my primary desktop (and there is no way I am using Gnome as my primary desktop). I could have fixed it by reinstalling KDE but since I had been thinking about removing the 32 bit Debian and installing the 64 bit version I decided to use this opportunity to do so and downloaded the 64 bit version from the Debian site, put it on a USB drive and proceeded with the install which took about an hour to complete.

After the install completed, I upgraded the system to the latest ‘Unstable’ build (Debian Unstable has the latest software packages so I prefer using it as opposed to Stable which is rock solid but has fairly dated software versions.) which took most of the night thanks to the no of packages to download and install. Once everything was upgraded I started customizing my setup and initially was dreading the amount of time it would take to get both my monitors working (based on previous experience) but surprisingly this time I didn’t have to do a lot to get both the monitor’s working.

If you remember, the last time I tried enabling the second monitor I hit a lot of hurdles mostly thanks to the mess I had made with my previous meddling and experimentation but this time it was fairly simple. I thought that I would follow the same steps I had the last time I installed the monitor so I started by installing the fglrx driver but the latest version of the driver no longer supports my chipset (ATI RS880 [Radeon HD 4250]) and the installer told me to install the free Radeon driver in the package xserver-xorg-video-radeon instead. So I did that after purging the fglrx driver (See here for instructions). I also had to install the Firmware for the Radeon card which I did by issuing the following command:

apt-get install firmware-linux-nonfree

After the driver was installed I rebooted (to make sure all systems started up clean) and setup my dual monitors by following these steps:

  • Click on Start -> System Settings
  • Click on ‘Display and Monitor’ under Hardware.
  • Under ‘Size & Orientation’ change the ‘Position’ dropdown to ‘Left Of’ the first (If your second monitor is to the left of the first one)
  • Set the Primary output to the monitor where you want the Task bar etc to show up. If you don’t know which monitor is which, click on the identify Outputs button.
  • Once you are done, Click on ‘Apply’ and if all looks good you can set it as default by clicking on the ‘Save as Default button’.

If you are ok with the resolutions available to you in the dropdowns above then you are done and you can skip the steps below.

Unfortunately for me I wanted a resolution of 1440×900 as the default instead of 1600×900 which was too small & the fonts looked pretty bad at that resolution and the 1280×1024 which was the next available size looked worse because my of my monitor shape (16:9 resolution as opposed to 4:3). So I had to do a bit more work to fix the problem.

First I tried manually setting the mode to 1440×900 using xrandr but I got an error message that “xrandr ‘cannot find mode'”. So I did a little Google search and found a forum post where another person was having the same issue. That link told me how to add a custom mode to my system which I did using the following steps:

First we need to figure out if our configuration will support the mode we are trying to use and if so get the modeline we need for the new config, so we run this command:

cvt 1440 900

If the system can support the resolution specified (1440×900 in the above example) it will return a line that looks something like:

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

Luckily for us my system can support the resolution so we then need to tell xrandr about the new mode using the following command:

xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync 

Where the first paramter (“1440×900” in this case) is an identifier and the rest is the information returned by cvt. (If successful the command will return no output.)

Then we need to tell the system that both the displays (called DVI-0 and VGA-0 on my system) should use the new mode which is accomplished using the following commands:

xrandr --addmode VGA-0  "1440x900"
xrandr --output VGA-0 --mode 1440x900
xrandr --addmode DVI-0  "1440x900"
xrandr --output DVI-0 --mode 1440x900

If the commands were successful then your screen should resize and start using the new resolution. Now that this is done we want this to happen everytime we log in without having to run the commands manually.

When you click on the ‘Save as Default’ button in the ‘Size & Orientation’ dialog box, KDE saves your settings in a file at the following location: ~/.kde/share/config/krandrrc that is executed everytime you log in to KDE. So to make the changes permanent we have to modify the file with the new settings.

The file contains the following lines right at the top:


We need to modify the StartupCommands= line to use our new settings. Basically it should contain all the commands we used above in a single line delimited by \n. On my system the file looks like the following after I updated it:

StartupCommands=xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync\nxrandr --addmode DVI-0  "1440x900"\nxrandr --addmode VGA-0
  "1440x900"\nxrandr --output VGA-0 --pos 1450x0 --mode 1440x900 --refresh 59.9782\nxrandr --output DVI-0 --pos 0x0 --mode 1440x900 --refresh 59.9782\nxrandr 
--output DVI-0 --primary

Once you make the change, save the file and log out. After loging out I usually restart X to make sure everything came up cleanly and then if all went well then the changes should take effect after you log in.

Hope others find this useful when configuring their systems.

– Suramya

PS: The best part is that after re-formating and using the Opensource version of the display driver instead of the proprietary one, my average memory usage went down from about 3GB about 1GB with all the same programs running in the background. 🙂

Older Posts »

Powered by WordPress