Skip to main content


Showing posts from October, 2011

mplayer shortcut to change aspect ratio while playing video

The following command tells the available commands for keyboard input.
mplayer -input cmdlist
The keyboard shortcuts to mplayer are stored in two locations - /etc/mplayer/input.conf and ~/.mplayer
I prefer editing the /etc/mplayer/input.conf.
Assign shortcuts to aspect aspect ratio switching as follows
a switch_ratio 1.3333 # 4:3 s switch_ratio 0 # switches back to original aspect ratio b switch_ratio 1.7777 # 16:9 ratio
put his at the end of /etc/mplayer/input.conf.

A script to automount external USB HDD with the executable bit set

Recent releases of Ubuntu mounts external USB HDD in userspace and hence it does not set the executable bit on the drive. As a result if I try to run softwares or scripts installed in the external HDD I have to pmount it manually. So I wrote a small script which would - 1. verify that drive is mounted. 2. it is not empty(from a previous manual mount unmount cycle) 3. then unmount the drive and re-mount it in userspace with the executable bit set.
I wanted this script to be minimal. So I did not make it complicated which accepts a drive LABEL from the user and uses it. Just replace your drives LABEL in place of "passport-2" in the second line of the script. So if your external drive is called Sandisk replace passport-2 with Sandisk. If it turns out that the script fails due the use of $LABEL, then replace all $LABEL in the entire script with your drive label manually.
================================== #!/bin/bash $LABEL=passport-2 cd /media # check if $LABEL exists if [ ! -d &qu…

Minimal install LaTeX without documentation

The LaTeX package for Linux is the texlive package. The normal install of texlive is huge due to the documentation included can go upto 500MB itself. A leaner latex is what we all desire. It is not possible from inside Synaptic.
Use this command to install latex without docs.
sudo apt-get install --no-install-recommends texlive texlive-pstricks texlive-fonts-extra prosper