Archive for the 'hacks' Category

Museek+ client working on OS X Leopard (Howto)

Friday, February 1st, 2008

What is Museek (plus)?

Museek plus is a Soulseek client. It is far superior to other products available on OS X in terms of usability, coherence, and ability to specify preferences. Read more on the site.

Unfortunately, its a bit difficult to get working on OS X because its native to Linux. Nevertheless, it can be done (and is well worth it.

Installing: a bit of a pain

With the help of Daelstorm I was able to get Museek working on my MacBook (intel), Leopard (OS X v 10.5). This should be a great relief to any Mac Users still stuck in using Nicotine, or god forbid SolarSeek–I’d rather use BearShare!! (oh, p2p humor… meh.)

Museeq (client)

So here goes:

Firstly, get X11 / MacPorts/ XCode Tools installed on your machine. Takes a while. A long while.

Then run sudo port install qt3 in an X11 terminal.

Also, get Fink installed. At the time of this writing I had to use this build but that will probably change, as Leopard apps are in rapid development all over.

You’re going to have to add the fink stuff to your PATH (.bash_profile file) so you can run its packages from the command line. I believe I was prompted, at the end of the install, to run a little shell script which added the appropriate lines. At any rate, my .bash_profile looks like:

yeagos-magic-machine:museeq y$ cat ~/.bash_profile
export PATH=${PATH}:~/Programming/tools #You don’t need this line
export PATH=${PATH}:/usr/local/bin
export PATH=${PATH}:/opt/local/bin
export PATH=${PATH}:/opt/local/sbin
test -r /sw/bin/init.sh && . /sw/bin/init.sh

I hear the order of the things above counts, but I can’t tell you why.

Also, get the latest version of Museek. And glance over this page because you’re going to have to install a few more things mentioned there.

Daelstorm mentioned a Museeq QT4 port but I didn’t do that.

Now, we will be using the SCons method to build this program with the following command scons QTDIR=/opt/local/lib/qt3 from the folder created by the Museeq tarball you downloaded earlier, pointing to the installation of QT3 you (hopefully) already installed. Oh, and get scons! (fink install scons)

This will probably fail due to missing dependencies. I got choked up on ‘libxml++2′ and ‘vorbisfile’. That’s where fink came in handy with fink install libxml++2 and fink install vorbistools libvorbis0 libvorbis0-shlibs (I’m honestly not sure *which* of these applied to my situation. Try them one at a time if you feel so inclined (and let me know >=] )

Anyway, I got myself into serious trouble at this point.

I started getting errors related to the trayicons one | two

running scons with MUSEEQTRAYICON=no and 0 did not help.

Daelstorm came up with a fix: edit /museeq/SConscript and remove the line “trayicon.cpp” Don’t do this if you are stuck at something that has nothing to do with trayicon / trayicon.o.

Once I did this everything worked fine and I got the wonderful message from scons “done building targets”. When this works, you’ve got a working installation of Museek, except its in the /workdir. To build a global copy at this point you simply go sudo scons install QTDIR=/opt/local/lib/qt3 MUSEEQTRAYICON=0 from the /originalMuseeqTarball/museeq directory and, viola, you have a working copy of Museeq!

If you had the trayicon problem, simply select a theme and restart X11 and your icons are fine!

Museekd (daemon)

Installs as described in INSTALL.scons

Easy Fix For OS X Spotlight / Finder Problems

Saturday, December 1st, 2007

My roomate was having a problem with files not showing up in spotlight or finder. Files would show up once they had been opened but lots of old files would simply not appear—even if you opened a folder and searched it for a file you were staring at. I checked spotlight preferences and there was nothing wrong.

People at this forum suggested rebuilding the index.

This page suggests rebuilding it with the following command:

sudo mdutil -E /

But that didn’t work. That page also suggests downloading OnyX, a general utility and maintenance program and clearing the Font Cache and other repaire procedures. That didn’t work either.

At this point I didn’t know what else to suggest besides reinstalling OS X. But then I just realized you can turn indexing off:

sudo mdutil -i off

Viola. This will slow down searching, but at least its not using a funky, broken index.

Problem with WordPress messing up HTML with P and BR tags.

Saturday, August 18th, 2007

Maybe you don’t want to disable wpautop but you are sick of WordPress adding <p> and <br /> tags to your included html.

A solution is to open up wp-includes/formatting-functions.php and modify the wpautop function. In this version, you can make wpautop respect any tags you want. Just add them!

Usage

Simply add your tag name inside the variable below, using the same tag-pip-tag format:

//WP Version 2.0.4
function wpautop($pee, $br = 1) {
        $allowedTags = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre| select|fieldset|legend|form|blockquote|address|math|p|h[1-6]';
        $allowedCloseTags = 'option|select|p|li|div|dl|dd|dt|th|pre|td|ul|ol';

//WP Version 2.2.3
function wpautop($pee, $br = 1) {
        $pee = $pee . "\\n"; // just to make things a little easier, pad the end
        $pee = preg_replace('|\\s*|’, “\\n\\n”, $pee);
        // Space things out a little
        $allblocks = ‘(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)’;

ATTENTION

If you mess up WordPress and can’t get anything to work, you should have made a backup! Sorry!

Relevant links

WordPress Forums: How do I remove <p> from the_content ?
WordPress Forums: Hey Wordpress STOP Screwing up my HTML in my posts!

Add to Technorati Favorites

Orlando Web Design by EAI