Take screenshot from command line

Take a screenshot of your desktop using the SCROT utility.

Basic usage is to call the scrot command in a console, but this would take an instant screenshot of the desktop in the current directory. Thus it would be better used along with the “-d” (delay) option in order to have a time buffer to place the desired objects on the desktop.

Play music from command line

Although there are a lot of GUI media players out there, it is also possible to listen to your favorite music from the command line.  The mpg123 tool allows you to play a song, a playlist or even a stream and has all major features of a GUI media player: control keys, equalizer, replay gain, gapless playback.

Some well known supported audio interfaces are ALSA (Advanced Linux Sound Architecture), JACK (Jack Audio Connection Kit), OSS (Open Sound System), PulseAudio (sound server for POSIX and Win32), Win32 (Windows WaveOut).

The decoder part of mpg123 may be used as a library in other applications.

Usage examples:

Use the “-v” option to increase verbosity level and display detailed info. Also use quotes for files with spaces in their names.

Play audio file from local storage:

mpg123 -v "Music/Ugly Kid Joe - Cats in the Cradle.mp3"

Play stream, just like local files; provided stream is “borrowed” from SoundCloud, thus might not be available anymore:

mpg123 -v http://media.soundcloud.com/stream/PHn5m1zDrhV2?stream_token=chpdF

Play a remote or local playlist using the “[email protected]” parameter, to read filenames from playlist:

mpg123 -v [email protected] http://www.netrock101.com/live365.m3u

Display banner text in command line

You can display banner-like texts with large characters created from regular characters using the FIGlet utility.

The default output look like this (quotes are optional):

FIGlet banner text

Basic usage requires only the text you want to output on the CLI, but you can also specify the font used in text rendering, dimensions and other layout options.