TobyInkster.co.uk

Articles Tagged with “Linux”

06/01/2008: dhyana.pl/0.3

Here’s my latest update to dhyana.pl

Change Log

  • Added a title to the output image, which can be in a different font and colour from the rest of the text.
  • Use Getopt to parse command line, and accept more options.
  • Improved handling of certain dodgy WMV files, mostly thanks to Matt Pinkham.
  • Improved use of FFMPEG
  • Code straightened out to use functions — it used to be one big long mess.
  • Added a help function — just run the program with the —help paramater.

Requirements

  • Perl Getopt::ArgvFile
  • Perl Getopt::Long ≥ 2.33
  • Perl Pod::Usage;
  • mplayer
  • ImageMagick

Optional

  • Perl File::chdir
  • Perl File::Spec
  • Perl Cwd
  • FFMPEG

All of the Perl modules can be found in CPAN, here is the FFMPEG site and here is mplayer. And don’t forget ImageMagick.

Download

28/11/2007: Sharing Music with Apple iTunes

Screenshot of iTunes connected to Firefly

OK, so a few weeks ago my old G3 iBook broke down. Yesterday I took delivery of a brand new (well, eBay-sourced, but new for me) G4 iBook and was about to start synching my music collection from my Linux desktop when it struck me that that’s just a dumb idea. I’ve got a 54 Mbps wireless network, so why not put it to good use. There must be a way to get iTunes to be able to play my OGG files directly off the Linux server.

One option is Rhythmbox which I happened to already use as my main audio player on Linux. It is able to participate in iTune’s music sharing function by virtue of its DAAP plugin. However, this solution relied on me always being logged into the Linux box with Rhythmbox running. What if someone else was logged in?

Then I discovered Firefly Media Server a DAAP daemon capable of sharing a whole directory of music files (including several formats which iTunes doesn’t support — Firefly transcodes them into WAV on the fly!). This seemed like a great solution, so I installed it…

18/11/2007: Dhyana.pl Updated

This release works around errors in capturing screen shots from certain WMV files. It also changes the default geometry from 240×180+0+0 to “auto” which is an automatically calculated, hopefully appropriate, geometry.

19/08/2007: Sequential Video Thumbnails on Linux

So, I was looking for a way to create sequential video thumbnails (like this one) from a video file on Linux. I found that my options were severely limited. On Windows there are a plethora of tools capable of this fairly simple task, including Media Player Classic, but on Linux all I could find was QFrameCatcher. The QFrameCatcher website was inaccessible yesterday; today I managed to download the source code, but couldn’t get it to build.

Anyway, I decided it probably wouldn’t be very difficult to build my own so…

dhyana.pl

dhyana.pl is a small Perl script that co-ordinates mplayer and ImageMagick to create a lovely montage of thumbnails. (Dyhana — roughly pronounced as “jahna” — is the Sanskrit word for a deep meditation.)

18/06/2007: dict, thes & ency

dict is a command that is supplied with most Linux and BSD distributions. If you enter dict foo at the command-line, you get back the dictionary definition of “foo”. Normally several different dictionaries are supplied, including some dictionaries of translation, and it’s possible to look up the word on various online dictionaries too.

As counterparts to dict I’ve created thes for looking stuff up in Moby’s Thesaurus and ency for online encyclopaedia Wikipedia

source2html

I needed to print out a directory full of small scripts. This Perl script will go through the current directory and create a pretty HTML page of all the files in that directory. That HTML page can then be fed to a browser for printing.

#!/usr/bin/perl

$cd = `pwd`; chomp $cd;
$ls = `ls -1 $cd`;
@ls = split(/\n/,$ls);

print "<title>Directory Listing $cd</title>\n";
print "<h1>Directory Listing $cd</h1>\n";

$ll = `ls -l '$cd'`;
chomp $ll;
print "<pre style='padding:1em'><b>$ll</b></pre>\n\n";

foreach $f (@ls) {

  if (!(-d $f)) {

    $l = `ls -l '$f'`; chomp $l;
    print "<div style='border:2px solid black;padding:1em;'>\n";
    print "<h2 style='margin:0;padding:0;'>$f</h2>\n";
    print "<pre><b>$l</b></pre>\n";
    print "</div>\n";

    $t = `cat '$f'`;
    $t =~ s/&/&amp;/g;
    $t =~ s/</&lt;/g;
    $t =~ s/>/&gt;/g;

    print "<pre style='padding:1em'>$t</pre>\n\n";

  }

}

This software is distributed under the terms of the GNU GPL.

Password Scripts

Summary not available.

nmap-services

Summary not available.

Linux

Summary not available.

jukebox.pl

jukebox.pl is a GTK2 player for Ogg Vorbis files written in Perl. It uses SDL for audio output.

Why yet another Linux media player?
Because this one has just the features I need and nothing more. It provides the facility to select which song you want to hear next (and if no songs are queued, will select one at random); skip the current song; pause; and a volume control. I don't need anything other than that, and I'd image that a lot of other people don't either. (If anything, the volume control is an extravagance!)

RPM Builds

Summary not available.

Logitech Marble Mouse

Summary not available.

steg-encode.pl

Summary not available.

Dell Optiplex GX270

Not really in the spirit of this tutorials section, but I couldn't think of a better place to put this piece of advice.

If you have a Dell Optiplex computer and can't go above 256 colours in Linux, go into the BIOS settings and change the video card memory from 1MB to 8MB.

This little problem had me puzzled for two weeks!

Disk Drives

Summary not available.

Everybuddy

Summary not available.

Why Use Linux?

A page explaining why Linux might be a good choice of operating system for you.

22/07/2002: How I Started Using Linux

Summary not available.

Google Search

Blogroll

Here are some other sites. Some might be good; some might be rubbish. You decide.