Montag, Dezember 08, 2008

burn ISO image on Mac OS X

This is my step by step instruction based on this Mac OS X Hints article and its comments.

on command line:

  • hdiutil burn image.iso



with the GUI:

  1. insert blank disk and select Disk Utility to be opened

  2. cmd-B or press Icon Burn or menu Images - Burn

  3. select the .iso or .dmg image and click Burn

  4. confirm the drive to be used

Donnerstag, Oktober 30, 2008

Denon DCD-960 as Media-PC case

I would like to move my media PC into an old HiFi case. For this I would prefer the case of my CD player a Denon DCD-1460. But so far I'm not willing to sacrifice my player as it still works fine.

On eBay they still are very expensive. So I got an DCD-960. With postage I paid below €10. Ideal to test how to transform a HiFi case into a PC.

Cases similar to the DCD-1460 are DCD-1290, DCD-3520 or DCD-3560. I hope this player will start failing ;-)

Freitag, September 05, 2008

install Perl module in home directory

On a Unix machine without root access install missing Perl modules into home directory.
  • cd ~/perl.local

  • tar xzf ../Perl-Modul-0.89.tar.gz

  • perl Makefile.PL PREFIX=~/perl.local

  • make

  • make test

  • make install

In the Perl file add use lib with the local path. After this follows the normal use of the module.

use lib "/home/markus/perl.local/lib/perl5/site_perl/";
use Perl::Modul;

Samstag, August 23, 2008

Application Launchers

The new blogg post on lifehacker about application launchers got me thinking how I start applications. So far I used "Alt-F2" on KDE and Launchy on Windows. Not to forget the shell. This is my launcher tool number one!

The advantage of a full grown launcher are:

  • even never started application will be found typing only few letters

  • list all possible matches for the letters you typed so far

  • plugins give you actions well beyond starting an application


disadvantages

  • uses quite some memory

  • the shortcut learned needs to be part of the name, e.g. "int" or "exp" for Internet Explorer and not ie as you my prefer


Creating a directory with shortcuts to all the applications I use didn't make any sense to me. I'm in a shell most of the time. Therefor an alias is the best shortcut. I only have a directory with links to get scripts I've wrote into the path. The scripts are located in a directory tree to reflect projects and are part of a VC.

Replacing Launchy on Windows with a directory containing links will not only save memory. The biggest advantage I see is the name of the shortcut. Like with an alias I'm able to use a name that makes sense to me. Like ie for the Internet Explorer. Or even better using the same name on WIndows and Linux - pws for pwsafe (Windows) and MyPasswordSafe (Linux).

And the plugins? The only one I used is the web plugin. All my Firefox shortcuts, like search on google, search on wikipedia, I've also added to Launchy. But thinking about it, most of the time I entered the shortcut directly in a new Firefox Tab.

The next step for me is, instead of starting an application with Launchy, to create an shortcut link to the application. The advantage is that the same shortcut is usable from the shell. So remove an alias if it exists for the application. And I will automatically get a list with applications I use.

Mittwoch, Juli 09, 2008

javafx and Mac OS X

I installed JavaFX as bin package. Unpacked it into /opt/local/lib/javafx and moved everything from archive/openjfx-compiler/dist into it.

Like stated on the page I've set the execution bit and updated the path variable.
export PATH=$PATH:/opt/local/lib/javafx/bin

The first example was HelloCompiledJavaFX.fx.

Starting it lead to the error message:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

The default version of java and javac on OS X 10.5.4 is 1.5.0_13. As this example worked under linux with Java 1.6 I tried this.

As I'm new to the Mac, I don't know if it is possible to switch the installed Java version via System Preferences. But luckily Java has it's own way.

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

And now the JavaFX application runs fine.

Samstag, Juli 05, 2008

copy eclipse projects to OS X

The projects from the old 3.2 eclipse installation (linux) don't show up in the new 3.4 one (OS X). The projects are part of a Mercurial repository. The clone worked fine from view of Mercurial. But eclipse didn't show this projects.

Import from the workspace was not possible. It worked only after I moved this projects outside the workspace. But the projects should be locate inside the workspace. All machines should have the same file structure.

Adding the missing project again made the complete project with all is content visible. The original and the new .project file are equal.

A look at /Applications//eclipse/Eclipse.app/Contents/MacOS/eclipse.ini didn't reveal any obvious information about used projects.

I will try this on linux and Windows after I updated eclipse to 3.4 on this machines.

Montag, Juni 30, 2008

Mercurial on OS X

There is more than one way to install Mercurial on OS X. I used port, because this will provide me all the missing unix tools.

Calling hg resulted in a traceback: ValueError: unknown locale: UTF-8
The page showed me a solution - adding
export LC_ALL=en_EN.UTF-8
export LANG=en_EN.UTF-8
to .profile.

After this Mercurial works just fine.

Donnerstag, Mai 15, 2008

control mpd from remote client

To control mpd from a remote client, mpd needs to allow remote connections. Disable bind_to_address in /etc/mpd.conf. Or set it to "any".

On the client tell mpc with the shell variables MPD_HOST and MPD_PORT how to connect to mpd.

Restricting access to only a view users in the local network is a problem. The mpd password is sent in the clear. If there is only one user per IP address you could use multiple bind_to_address entries or add iptable rules. Otherwise you should not allow remote access to mpd and only allow login via SSH and control mpd with the local mpc.

Mittwoch, April 30, 2008

simulating LCD display in xterm

I like to add a display to the PC I do some automated work on (reading floppies, ripping CD's). To write to the display I will use LCDd. This daemon controls the display. One ore more client will send simple ASCII commands and messages via TCP.

To test my client and encounter the display size I use the curses driver to simulate the display via xterm.

In /etc/LCDd.conf at the [curses] section set topleftx and toplefty to 0. Set size to the size to try (e.g. 20x4).

Start a xterm to simulate the display.
xterm -name lcdproc +sb -geometry 22x6 -e /usr/sbin/LCDd -c /etc/LCDd.conf -d curses &
Make sure that no LCDd is running as this prevents the start of the new one. Set the xterm geometry to the one of LCDd.conf (+2 on x and y for the border).

To do some tests by hand connect to LCDd with telnet and type:

telnet localhost 13666
hello
client_set -name mytest
screen_add scr1
widget_add scr1 str1 string
widget_set scr1 str1 1 1 "first test output"

For more information see Chapter 3. The LCDproc client language of the LCDProc Developer Guide.

Montag, April 28, 2008

Test Musikverwaltung unter Linux

Auf Pro-Linux gibt es einen Test verschiedener Linux-Programme um seine Musik zu verwalten und ab zu speieln.

Meine Zusammenfassung:

Rhythmbox

Unterstützt last.fm, Podcasts und Webradios. Kann über plugins erweitert werden. Album-Covers können aus dem Album-Direktory oder von Amazon aus angezeigt werden. Ist ein Gnome-Programm.

Banshee

Zusätzlich zu den Features von Rhythmbox unterstützt Banshee noch smart playlists. Diese können z.B. alle noch nie gespielten Songs enthalten.

Listen

Hat alle Features der beiden oberen Programme

Quod Libet

Nur die einfachsten Funktionen. Da verwende ich dann lieber xmms

Amarok

Hatte ich schon mal selbst getestet und konnte mit meiner vorhandenen Musik-Library nicht umgehen.

Exaile

Versucht Exaile unter Gnome nach zu bilden

MadMan

Nur die einfachsten Funktionen. Da verwende ich dann lieber xmms

Songbird

Basiert auf XUL und VLC. Sehr Ressourcen hungrig. Ist mir nicht klar, ob dies durch die Beta-Version oder die verwendeten Techniken kommt. Firefox und VLC brauchen beide von hause aus schon mehr Ressourcen als andere GUIs oder Media-Player.

Picard

Kann zusätzlich zu den Features von Banshee für unbekannte Songs die MusicBrainz-PUIDs berechnen und versuchen darüber die fehlenden Information zu bekommen.


Der Tester verwaltet seine Musik nur uebr die MP3-Tags und nicht über eine Datenbank wie ich. Der Test ist vermutlich für mich nicht besonders aussage kräftig. Sollte mit seinen Favoriten versuchen ob diese mit meiner Datenbank umgehen können.

Mittwoch, April 23, 2008

Kühlmittelgelenkschlauch

For electronic or modelling projects I will add some helping hands and flexible lights to my workbench. The today post on lifehacker about the diy GorillaPod reminded me of Third Hand++. Using these adjustable coolant hose systems (Kühlmittelgelenkschlauch) it looks possible to very easy fulfill all the ideas I have.

Unfortunately I don't know a shop who sells this. A google search found only a view shops who sell precast ones. On ebay.de I had more luck - Gego-GmbH-Präzision.

Dienstag, März 25, 2008

Power over Ethernet

Found a short description on diy PoE.

my conclusion:

  • mostly the unused pairs 4-5 (positive) and 7-8 (negative) provide the DC power

  • on multi-mode wiring the pairs 4-5 commonly carry the telephone signal

  • makes only sense if no power outlet is available (cable resistance on DC)

Mittwoch, März 19, 2008

running SAX example from Java & XML

After the download of the examples from the books home page I tried to run the SAX example from chapter 3. Unfortunately the example didn't compile.

SAXTreeViewer.java:196: cannot find symbol class SimpleEntityResolver

Checking the books errata I found it on the page with the unconfirmed error reports. Unfortunately the missing class is not part of the example download. Searching the web led me to the missing class SimpleEntityResolver.

Change the javaxml2 package name according to your the edition of the book. For me it is javaxml3. No it worked as it should have in the first place.

Mittwoch, März 05, 2008

one password storage for different devices

So far I use different programs to store my password on different devices. It is therefore difficult to synchronize the container.

This is a list of the programs I use:

  • On the Windows PC at work Password Safe. The project was started by Bruce Schneier. It is still actively developed.

  • On the linux PC at home MyPasswordSafe, last updated 04.02.2005. Uses as container the version 2 data format.

  • On the mobile jFreeSafe, a J2ME application last updated 30.08.2005. It is a pain to add a new account but easy to look one up.

  • On the Palm the build in functionality.



Over the time I collected some links to other programs, but haven't tested them.

By the way on the Password Safe homepage a Java SWT port exists.

Montag, Februar 04, 2008

cddb information [3]

where did I get the information:

On wikipedia I read the articles about:

  • cddb

  • freedb

  • Gracenote

  • MusicBrainz



Description of the cddb file format.
Java example to calculate the id.

MusicBrainz Homepage
Calculation of the MusicBrainz DiscID.
Don't use the old RDF based libs for new projects. There is a new RSET WebService and the used XML meta format.
On cpan exists a perl module, but it is in a very early development state.
With the libdisci (see the example usage) I'm able to convert the cd-discid into the MusicBrainz DiscID.

Mittwoch, Januar 23, 2008

cddb information [2]

In the original post I was thinking about changing my perl script to retrieve the cddb data only from freedb2. Unfortunately a lot of times more than one version is returned. Only in a view cases only the genre is different. And the other thing is that quite some time the slang spelling (by the author intended) of a title is corrected. Also the punctuation is often changed to be grammatically correct, but different to the one used on the album.

Surprisingly the old entires in the freedb are correct. But unfortunately the encoding is not defined. The posters system preferences define it. Quite often these are different to mine and umlaut or other language specific characters are not displayed correctly on my system.

What I also realized was that MusicBrainz returned mostly only one result. The spelling and punctuation matched the one of the cover. Reading through some of the FAQs I realized that lots of the limitations of the cddb format are solved. Therefore I will stop using the cddb gateway of MusicBrainz and move to there full featured REST interface.