My non-human techno-mate (Isda as I call my computer notebook) runs slow (but stable) so oftentimes I choose not to use Gnome nor KDE as my desktop. When I’m in a rush or when I have to have more than 10 programs open at the same time, including both MySQL and PostgreSQL (yes, folks, I enjoy the best of both worlds–I use MySQL in my laptop and I use PostgreSQL to connect to our office’s database server), I choose IceWM. It’s like Blackbox with a taskbar, which I cannot live without.
The only problem with IceWM is that mounting a flash disk is tiresome. And people snooping on me admire me for being geeky but it adds to their notion that Linux is for geeks only.
Everytime I place a flash disk in a USB port, I have to fire up a console and enter the 58-character command just to mount and use it. I’ve been doing this for so long until today. I brushed up on my Bash scripting knowhow to write a simple code so that mounting a flash disk is no longer a tormentous task.
Here’s the code entitled ‘mntusb’:
if [ “$1” = “u” ]
sudo umount /media/usbdisk1
sudo mount -t vfat -o uid=1000 /dev/”$1″ /media/usbdisk1
So when I enter the command ‘mntusb sda1’, the system mounts the flash disk for me. And when I enter ‘mntusb u’, the system unmounts the disk. Never mind the error-trapping concern of the code. Linux already does that with messages understandable enough for me.