Pages

Tuesday, December 20, 2011

Ubuntu: Sharing folders from NTFS partitions

The fastest way to share files and folders on an Ubuntu machine is probably samba. This works much like the Windows File sharing mechanism (Righ-click on the folder and hit 'share'). However this may not work correctly if your data is on an NTFS drive. To fix this, read on...

Monday, December 5, 2011

Economic costs of bad Powerpoint presentations

Excerpted and adapted from the "TEDx talk by John Bohannon & Black Label Movement"

Bad powerpoint presentations are a serious threat to the global economy.

Thursday, November 17, 2011

MTP Devices on Linux

If you have a new MP3 player that needs to be used in MTP mode for advanced features like playlists and sync to work, then Windows Media Player does the job fine but there are problems with Linux. I found that the Sony MP3 players, the famous Walkman series never gets detected as an MTP device, and none of the common media players (Rhythmbox, Amarok, Banshee) can write playlists to the device in the required (*.pla) format. Luckily there is a solution to this problem...

Friday, November 11, 2011

Electric Car Expo at CEDT

Yesterday there was an exhibition of electric  cars participating in a zero emissions race - Wave 2011. The expo was organised by CEDT (Indian Institute of Science) and Swissnex.

Tuesday, September 6, 2011

One-Click translations with Google translate

Here's a quick way to create a bookmark 'button' on your toolbar that allows you a One-Click translation of pages into English.
Right Click on the bookmarks toolbar and select "New Bookmark", then in the 'Location' field enter the following string (you can copy it off and paste it...)

javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;};

Done!

Thursday, August 18, 2011

Fixing the Native Resolution problem - WindowsXP

I had a hard enough time getting my Intel on-board graphics card to display the right resolution with Ubuntu last month. The problem was that the native resolution of my monitor is 1440 x 900, and the graphics card supports higher and lower resolutions but not this particular mode. I figured it would be easier on Windows XP- especially given the fact that Intel provides drivers for Windows only. But after all on Windows...

Tuesday, July 26, 2011

Numbers...

Said Wanda this morning:

"I have a box of telephone rings under my bed.  Whenever I get lonely, I
open it up a little bit, and I get a phone call.  One day I dropped the
box all over the floor.  The phone wouldn't stop ringing.  I had to get
it disconnected.  So I got a new phone.  I didn't have much money, so I
had to get an irregular.  It doesn't have a five.  I ran into a friend
of mine on the street the other day.  He said why don't you give me a
call.  I told him I can't call everybody I want to anymore, my phone
doesn't have a five.  He asked how long had it been that way.  I said I
didn't know -- my calendar doesn't have any sevens.
        -- Steven Wright "

Thursday, July 21, 2011

Keyboard Shortcut Customisations for Ubuntu

Here's a handy way to setup shortcuts to common things - such as the Terminal, Nautilus (File Manager or 'Explorer'), email, browser, and so on...

Just install Compiz using the command:
sudo apt-get install compizconfig-settings-manager

Then open the manager using System > Preferences > CompizConfig...

Then click on 'commands'. Enter the desired command in one of the available fields (e.g. in Command line 0 i put 'nautilus') Then under the key bindings tab set it to 'Super - e' ('Super' means the Windows key on a standard keyboard). Save and close; and now Windows+E should give you the file explorer!

P.S:
Any other commands can be added the same way. By default, Alt+F1 is for menu, Alt + Ctrl + t is for terminal, and so on...


Saturday, July 16, 2011

Fixing Stuck Monitor Resolution in Ubuntu

After a few hours of thrashing around trying to get my graphics card to show the right display resolution I finally managed to do it. Here's a pretty comprehensive set of stuff you can try in case you find yourself in a similar predicament...

(P.S. Newbies be prepared to do a lot of learning...)

(P.P.S: The following worked for me on an Intel desktop motherboard (DG31PR) with Intel Integrated Graphics and a widescreen monitor (LG Flatron W1934S) Before embarking on the following, do ensure that your hardware does support the resolution you want.)

(P.P.P.S: Turns out the procedure for doing this in Windows is even harder, but I eventually managed it...)

(P.P.P.P.S: There are a few changes for later versions of Ubuntu, updated in the text of the post.)

The symptoms:
You either got a new monitor, or just disconnected and re-conected the monitor, updated something, reinstalled something, whatever. The result is that you are stuck with a monitor resolution like 800x600 or 1024x768 on Ubuntu. Here's what you need to do...

  1. First off, go the Monitors menu (System > Preferences > Monitors) and see if any higher resolution is available. If you got around to reading this, I'm guessing not. Check the box for 'show monitors in panel' - we're going to be needing this pretty often.
  2. Some solutions on the web ask you to use a disk for Ubuntu 8.04 or older - just ignore these. Its not worth going to the trouble of downloading the ISO and burning it or even making a bootable USB drive.
  3. There are the following tools that you can use - (I dont know which of these will work but one of them will do the job)
    1. The "recovery" option from the grub menu (which appears before you boot)
    2. The xorg.conf file and
    3. The xrandr command
Recovery Option:
The recovery option is useful as a quick option in case things were working normally earlier. Select recovery, and then from the prompt that comes up select "X in safemode". This then gives you a number of options - first try the option that will recover your settings from the backup file. (Reboot to see if this has any effect - you can do this by using the root prompt). If this does not work, or if its a new piece of hardware that caused the problem, select "Create a new hardware configuration". If this succeeds you will see a dialog box with a message. If it fails nothing happens; and you need to fiddle around with the xorg.conf file.

[Ubuntu 12.04 update: no options are provided, at least for me. By now I know that there is something severely screwed up either with my graphics card or monitor or the combination. So on to the next step]

The xorg.conf file:
This is a configuration file that stores settings for Xorg. It is located in /etc/X11. From Ubuntu 9.04 onwards there is no xorg.conf file shipped with the OS. X will, at startup, try to detect and apply all settings if no file is found. If a file is found it will use it for its settings. Making a xorg.conf file from scratch is a pain. Its content depends on your graphics card _and_ your monitor. To create a fresh xorg.conf use the command:

X -configure 


This will generate a file called xorg.conf.new. Open it with a text editor and make all modifications. Then rename it to xorg.conf and move it to /etc/X11/ . 
The additions that will need to be made are in the 'monitor' section, where you must add the video timing data for the resolution you desire. To get the timings, run the command 

cvt 1024 768


Where 1024 and 768 are example values of resolution. The output will be 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


Out of this copy the line 
"Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

and paste it in the monitor section in the new file:

Section "Monitor"
Identifier   "Monitor0"
VendorName   "Monitor Vendor"
ModelName    "Monitor Model"
#Modeline "1280x960_60.00"  101.25  1280 1360 1488 1696  960 963 967 996 -hsync +vsync
#Modeline "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
EndSection



Then copy the file off as /etc/X11/xorg.conf ; making sure that the old file, if any, is backed up. Then restart gdm using
sudo /etc.init.d/gdm restart


Using xrandr:

Boot into Ubuntu and start a terminal. Use xrandr to list all supported modes and active devices.


$ xrandr
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 4096 x 4096
VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768       59.8  
   1024x768       60.0  
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9     59.9  
   1440x900_60.00   59.9*
Evaluate the video timings using cvt as explained above.
Create a new mode using the command

xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsyn
(The values are taken from the output of cvt; note that the quotes are required here)

Then add this as one of the available modes using the command:
xrandr --addmode VGA1 1440x900_60.00

(Note: No quotes here)

Then select this mode:
xrandr --output VGA1 --mode 1440x900_60.00 [1]


(Where VGA1 is the device that is shown as active in the output of the command xrandr)

If these steps work you may want to make these resolution settings permanent.

If you use gdm then simply add the last three commands to the /etc/gdm/Init/Default file; after the line OLD_IFS=$IFS. And thats that!

If you use lightdm then you need to edit the /etc/lightdm/lightdm.conf file as explained here. Only one additional point - there are two entries in lightdm.conf that set the variable display-setup-script. Keep the first entry commented out and set the value using the second.

[1] There was a typo in this line which has been fixed.

Tuesday, June 7, 2011

Panorama maker for Ubuntu 10.10

Install the Hugin package (using sudo apt-get install hugin). On Ubuntu 10.10 all dependencies are automatically installed and the software works out of the box...

Wednesday, May 25, 2011

Enjoy the Ride...


Slow down, you move too fast, you've got to make the morning last...

Sunday, April 10, 2011

Anti Corruption

Anna Hazare  undertook a fast unto death demanding that the government take concrete steps towards bringing in anti-corruption legislation. The internet, especially Twitter, Facebook and email is abuzz with people demanding an end to corruption - organising candle lighting, meetings, speeches etc.
This morning Anna Hazare has ended his fast after the government has begun consituting a committe for drafting the Lokpal  Bill. The first steps in what one hopes is the right direction.

Later the same evening, I am in Malleswaram market, desparately looking for a place to park my bicycle. I find a spot right under a big P, just as a tow-away van of the traffic police arrives. These chaps are notorious for taking away bikes parked even a millimeter outside the designated zones, so I hang around to see who is the victim. But there isn't one. Instead, the chaps in the truck unload one of the scooters they had picked up, and the owner, presumably, hands them what looks like a few hundred rupee notes.

Who are we blaming for corruption again?
Looks like its back to life as usual...

Friday, April 1, 2011

The Written Word

Because, ..., it is so easy and it costs so little labour to write down ten bushels of barley, or a hundred head of cattle, or ten fields of spelt -

Thursday, March 3, 2011

Nature

Nature is not kind;
It treats all things impartially.
The Sage is not kind,
And treats all people impartially.
Nature is like a bellows,
Empty, yet never ceasing its supply.
The more it moves, the more it yields;
So the sage draws upon experience
And cannot be exhausted.

-- Lao Tse, "Tao Te Ching"

Tuesday, March 1, 2011

For the Smokers


Some interesting images I found on the web...



P.S: I assume these images are in the public domain. If you have reason to believe otherwise or own the rights to these , please leave a comment ASAP and I will take appropriate action.

Open day 2011 at IISc

The Indian Institute of Science, Bangalore will be celebrating National Science Day with a showcase of ongoing research and development. Like last year, OPEN DAY 2011 will be a campus-wide event where one may visit exhibits put up at each department. Unlike last year however, Open Day 2011 will be a two day event, which should be sufficient time to view the exhibits at all the departments.

Friday, February 11, 2011

Clouds

Or rather the lack thereog; which is noteworthy... The Bangalore night sky is perfectly clear - ideal for stargazing.

Beginners may want to check out a nice piece of software called Stellarium - a virtual planetarium on your PC. Both linux and windows versions are available. Debian/Ubuntu users can use "apt-get install". Be warned, though, that a graphics card is recommended!