dadexter's life and command line discoveries.

Monday, November 06, 2006

Moving again

Textual Linux is moving to a new location.
This site will be kept as a source of information, as I will also try to copy the old posts to the new site, but for new updates, please go to http://textlinux.slackadelic.com

Thursday, November 02, 2006

Random mp3s? sure

One of the big features from Amarok I was missing while being a CLI/ratpoison-only user was the ability to generate a random playlist and have it copied to my mp3 player. I knew there was a way to have that done from a playlist file saved from mp3blaster, the music player I use.

This morning, while waking up, I tried to code one... I originally had one made in Python that worked, but I always ended up having less songs than requested, as it copied several of them more than once. Then, while going through my manpages, I found the one for a program called random. It selects random lines from a text input. Funniest thing is that random, on Slackware, is part of the 'bsd-games' package... So once again, a game saves the day:


#!/bin/bash

# this script needs bash, random, and the basic cp stuff
# creates a random playlist from a mp3blaster playlist file

IFS=$'\n'
RANDOM=`which random`
PLAYLIST=$1
NUMSONGS=$2
TARGET=/mnt/usbdrive

for file in `cat ${PLAYLIST} | tail -n +2 | ${RANDOM} 10 | head -n ${NUMSONGS}`; do
    cp -v ${file} ${TARGET}/`basename ${file}`
done


The usage is simple:

./genplaylist.sh PLAYLIST_FILE MAX_NUMBER_OF_SONGS

Wednesday, October 11, 2006

lshw: Hardware identification

Tonight I discovered a nifty tool for those of us who want lots of information about the hardware in their computer: lshw

You can download it at http://www.ezix.org/software/lshw.html. I compiled the application simply by running make. After that, it was ready for use.

The first thing I did was check the command help:


Hardware Lister (lshw) - B.02.08.01
usage: ./src/lshw [-format] [-options ...]
./src/lshw -version

-version print program version (B.02.08.01)

format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-short output hardware paths
-businfo output bus information

options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )


I ran just lshw, which gave me a tree-organized view of my hardware. Here's an example:

*-network:1
description: Wireless interface
product: RT2500 802.11g Cardbus/mini-PCI
vendor: RaLink
physical id: 9
bus info: pci@01:09.0
logical name: ra0
version: 01
serial: 00:14:bf:77:6a:a1
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2500 ip=192.168.0.102 latency=32 multi
resources: iomemory:ec004000-ec005fff irq:17



As we saw from the --help output, you can have the information formatted in XML or HTML. You can also specify a class of hardware you want to verify (usb, cpu, etc)... Running lshw -C cpu gave me only the information about my CPU.

There isn't much to say about it, but I think this application is worth playing with :)

Monday, October 02, 2006

Slackware 11.0 released!!!

From the Slackware changelog:

We are proud to announce that Slackware Linux version 11.0 has been finally released; it took some time but is well worth the wait. You can read the official announcement at this link. Slackware 11.0 contains the 2.4.33.3 Linux kernel, 2.6.17.13 in /extra and 2.6.18 in the /testing directory; the default boot option is the dependable 2.4.33.3 kernel, but this time we included more choices and support for 2.6.x kernels.
This Slackware version is by far the most cutting edge ever released, it includes KDE version 3.5.4 (including the Amarok media player), XFCE 4.2.3.2, the latest versions of Firefox and Thunderbird, plus SeaMonkey 1.0.5 (replacing the Mozilla suite). It also includes glibc-2.3.6, gcc-3.4.6, X11R6.9.0 from X.Org, and more!

BlogSplit

Ok... I have decided to split my blog, and add a new one to the pot:

Textual Linux will remain here and contain stuff only related to Linux/Unix CLI stuff...
Although I currently run KDE, I know I won't stick there forever, and I still like to experiment with CLI stuff.

I have created another one at http://dadexter.blogspot.com where I will blog the rest of my personal and Linux related stuff.

I will also be creating one related to Mobile technologies. Stay tuned.

Friday, September 22, 2006

Kanola v0.1 approaching

Kanola v0.1 is just around the corner. All I need now is a codename for the 1st release.

For those who don't know (out of the 3 people reading this blog), Kanola is a Music Player Daemon (MPD) client for KDE I am writing in Python, as a learning project. It's near completion for a basic player, which will become v0.1.

So, if ANYONE has ideas for codenames, throw them in. I'm open to suggestions.