Sunday, January 26, 2014

Install Thinkpad tools on Ubuntu 12.04

I own a T400 for 51/2 years now, and it has been treating me very well. I haven't still replaced my original battery, it still holds up 90% of its original capacity. Great Job Lenovo ! One possible reason is that I am using Battery Thresholding since the first few weeks of buying this machine, and made sure that this Thresholding works on all the OS I use. I use Ubuntu around 95% of my time using my PC (lets not talk about the other 5% time I spend editing the Word / PPTs on the crappy OS).  Thinkpad provides Battery driver software for Windows, but doesn't provide any drivers for Linux. Luckily drivers exist, and I found it on this link

The installation steps are very easy, I am reproducing here from the above link.

1. sudo apt-get install tp-smapi-dkms
2. sudo modprobe tp-smapi
3. Verify that the module is installed, using lsmod | grep smapi
4. Enable the superuser (su) mode on the terminal and do
echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 80 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

5. Make sure that the module loads on startup. Add the following line in /etc/modules

tp_smapi

6. To set the threshold settings at startup, Add the following lines in the tail of /etc/sysfs.conf  file

devices/platform/smapi/BAT0/start_charge_thresh = 50
devices/platform/smapi/BAT0/stop_charge_thresh = 80
EOF

Thats it. I focused only on battery thresholding, but there are many other tools that this module provides. Just check the files in /sys/devices/platform/smapi/BAT0/*

Sunday, April 28, 2013

Mount CIFS directory in Ubuntu (Linux) for Duke University OIT

Tired of switching to your Windows, just to edit your webpages? Just because the OIT supports mounting those CIFS drives only on Win / MAC.

I used the following technique to mount the CIFS directory on my Ubuntu.

First, you  need to be on the Duke network. If not, get onto the VPN.

Then,
mkdir ~/mnt
sudo mount -t cifs //myserver_ip_address/folder ~/mnt -o username=netid,noexec

where
my_server_ip_address = homedir.oit.duke.edu
folder =  users/x/netid  (where x is the first letter of your netid. For e.g. if your netid is john, then folder  = users/j/john)

And thats it. You can see your CIFS directory mounted in ~/mnt.

For editing the files in the public_html, I usually do "sudo gedit ~/mnt/public_html/index.html", since the directory is mounted as a read-only directory. 


Saturday, August 27, 2011

Installing real Player 11 on debian (unsupported)


Real Player 11 is no longer supported for Linux.

here's a .deb copy of application that i could find download , in the article link . This installs the firefox real player plugin as well.