Archive for the ‘Tools’ Category
mpg123/mpg321 - The Command Line MP3 Players
Written by BinnyVA on February 25, 2008 – 1:25 am -So far we looked at the GUI MP3 Players for linux - like Amarok, Exile, XMMS etc. Most linux users need only that - but there are some people who want a simpler system - command line players. The two top players in this area are mpg123 and mpg321.
mpg123
mpg123 is a fast, free, minimalist, console MPEG audio player software program for UNIX and Linux operating systems. The development on this project ceased for a long time - but now it has a new maintainer.
mpg321
mpg321 is a clone of mpg123.
Installation
Most distros have mpg321 in their repositories(not all have mpg123) - so just log in as root and use these commands to install it…
yum install mpg321 - For RedHat, Fedora, CentOS etc.
OR
apt-get install mpg321 - For Debian, Ubuntu, etc.
Using mpg321
Using mpg321 is straight forward. Since it has no GUI, just go to the folder with the song and just execute the command…
mpg321 MP3_FILE_NAME
If you want to play all the songs in a folder, you have to create a list of files in that folder. Then you have to specify this list as an argument for the mpg321 command. These commands can get the job done…
Create a list of all MP3 Files in the current folder…
find . -name "*.mp3"|sed 's/\.\///;'|sort>List.lst
Use this list as the play list for mpg321
mpg123 --list List.lst
Why Use Command Line Players?
If we have a number of shiny GUI players, why should one use a command line player? Unless you are an anti-GUI command line guru, chances are you don’t need it. But still, it has its uses.
For example, if you have to restart the X Server often for some reason, then mpg321 is the best player for you. All other player will stop playing when X server is down.
This actually happend to me - when I bought my second LCD screen, it took me some time to configure it. And that meant editing the xorg.conf file and restarting the X Server to see if it worked. At that time, I opened a virtual terminal(Ctrl+Alt+F1) and opened mpg321 with a bunch of MP3s in the list. It kept playing even if the X server is down. This is propably the reason that I was still sane after around six hours of XOrg configuration.
Tags: cli, mp3, mpg123, mpg321, player, review
Posted in Audio, Command Line, Tools | 4 Comments »
How to Mount ISO/MDF Images in Linux
Written by BinnyVA on May 21, 2007 – 12:51 pm -The mount command in Linux is a very powerful command. It can be used to mount any thing from a Samba mount to a ISO image file. The ability of the mount command to read ISO files makes it very useful for me.
My brother has a habit of saving DVD films as a image file. I believe he uses Alcohol 120% to do this. If he wants to view the Film, he ‘mount’ this image using Daemon Tools. He uses windows to do this. After he is done, he hands me this image. I can mount this image without any special tools in Linux - I just need the mount command.
mount -t iso9660 -o loop <Image_File> <Mount_Point>
Mounting Example
mount -t iso9660 -o loop /home/binnyva/Films/300.iso /mnt/Image
The ‘-t’ option specifies the filetype - this is optional.
This command works with both ISO and MDF images.
Posted in Command Line, Tools | 9 Comments »
fish(Friendly Interactive Shell)
Written by BinnyVA on April 8, 2007 – 1:00 pm -fish(Friendly Interactive Shell) is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out - you will come to the same conclusion as well.
Features of fish
Syntax Coloring
The shell colorizes the commands as you type them - if it is a valid command it will have a green color. For example, lets say I want to see my network interfaces. Recently, I had a lot of use for that - but that is another post. So, I type ifconfig into the shell. When I am at ‘ifco’, the shell will be like this…

When I have completed the command, ifconfig, the shell will be like this…

Strings, matching etc. are also highlighted as you type.

Tab Complition
You would not think that this is a new feature. Bash has tab completion. Even Windows XP’s DOS terminal has tab completion. But fish’s tab completion is no ordinary tab completion - think of it as tab completion on steroids.
fish’s tab completion implements a feature that I really needed - tab completion for subcommands. Subcommand is the command line argument that is given to some programs. For example,
yum update gimp cvs commit file.php
In the first example, yum is the command an ‘update‘ is the subcommand. Just type ‘yum upd’ and press Tab to complete the command. Similarly in the second case cvs is the command and commit is the subcommand.
Many other completions are also supported…
- Commands, both builtins, functions and regular programs.
- Environment variable names (Eg. $HOME).
- Usernames for tilde(~) expansion.
- Filenames, even on strings with wildcards such as ‘*’, ‘**’ and ‘?’.
- Job id, job name and process names for process expansion. This is very useful when using
kill.
Enough talking. You can download the fish shell from their official website. For Red Hat/Fedora Core users, this command will do the trick.
yum install fish
If you are a debian or Ubuntu user, use this command
apt-get install fish
Posted in Command Line, Tools | 1 Comment »


