Spotify in Fedora 12

January 31st, 2010 Fighter Hayabusa No comments

I recently upgraded to Fedora 12 and now find that my own recipe for making Spotify run under Wine doesn’t work anymore. The fix is not that hard though.

First, download the Spotify-installer for Windows from the Spotify-website. Then you install 32-bit Wine with ALSA-support like this:

$ sudo yum -y install wine.i686 wine-alsa.i686

Then make sure you have pulseaudio-utils installed, like this:

$ sudo yum -y install pulseaudio-utils

Then when running winecfg and set wine to use ALSA-drivers you pass it through padsp (which is in the package you just installed) in order to make the sound play nice:

$ padsp winecfg

Now you run the Spotify-installer with wine passed through padsp like so:

$ padsp wine ~/Downloads/Spotify\ Installer.exe

After this you should have Spotify installed. However, when you run it with wine you still need to pass it through padsp in order for it to work, so I suggest making a little script to start Spotify with and putting it somewhere nice like /usr/bin for example. The script would look something like this:

#!/bin/bash
padsp wine “C:\Program Files\Spotify\spotify.exe”

And there you have, 64-bit Fedora 12 running Spotify.

Upprop: Telia - ta FRA-lagen till domstol

November 26th, 2009 Fighter Hayabusa No comments

Upprop: Telia - ta FRA-lagen till domstol.

Från och med den första december 2009 är Sverige en övervakad nation - det är då som FRA får tillgång till en stor del av vår Internet- och mobiltrafik.

Detta kommer att få ett antal konsekvenser. De mest påtagliga är att flera grundläggande rättigheter i praktiken kommer att sättas ur spel. En självklarhet som brevhemligheten kommer efter den första december 2009 inte att existera på Internet. Även andra grundlagsskyddade rättigheter som källskyddet är starkt hotat. Många organisationer har skarpt protesterat mot FRA-lagen, däribland Journalistförbundet och Advokatsamfundet. En majoritet av det svenska folket är emot FRAs avlyssning.

Flera juridiska experter uttrycker sig dessutom mycket tveksamt till om FRA-lagen är förenlig med Europakonventionen, dvs. den europeiska konventionen angående skydd för de mänskliga rättigheterna. Sverige har förbundit sig att följa den konventionen och rimligtvis bör lagen alltså prövas i Europeiska domstolen för de mänskliga rättigheterna. Telia ansvarar idag för en majoritet av den trafik som FRA kommer att vilja avlyssna. Därför uppmanar vi Telia: ta FRA-lagen till domstol.

Detta är ett öppet och gemensamt blogginlägg - kopiera, förbättra och publicera på din blogg.

Dessutom, om du har Facebook gå med i denna grupp: http://www.facebook.com/group.php?gid=180362067338

It seems I’ve been assimilated

November 17th, 2009 Fighter Hayabusa No comments

cultofspotifyYes, I’ve joined the Cult of Spotify. The annoying ads finally wore me down. Well played sirs :-P

Finding what’s after a specific string in a text-file

November 7th, 2009 Fighter Hayabusa No comments

Have you ever wanted to find a specific string in a log-file and then output what comes after that line in the file? I do this every single day at work and can’t be the only one. Somewhere in a huge log-file, XML-file or other type of text-file there’s a line that equals the beginning of some specific type of information that I’m in need of so I need to find that line of text and output a bunch of the lines following it.

I might for example have a backup cron-job that when it starts outputs “Backup started” to /var/log/messages and then follows that with output concerning how the backup went. Sure, theoretically I could open the file in vim and simply search for the line in question but sometimes text-files are frikkin’ huge and opening them up in a text-editor is just not a viable option. For example, I handle XML-files that are several gigabytes in size daily and loading one of those into an editor will mean nothing but pain and suffering I assure you ;-)

So to facilitate this procedure I slapped together this script, which I’m giving the easy-to-remember name fsagsl.sh:

#!/bin/bash
# fsagsl.sh Find String And Grab Some Lines
# 2009 (c) IDontGiveASmegWhatYouDoWithIt License
# by FighterHayabusa <fighterhayabusa@barbedwirebytecodebaconburger.com>
# Finds a string in a text-file and then outputs
# a chosen number of lines from that position onwards.

function is_int()
{
[ "$1" -eq "$1" ] > /dev/null 2>&1
return $?
}

PRG=fsagsl.sh

if [ -f $3 ] && is_int $2; then
LINESTART=`grep -n $1 $3 | sed -e 's/\([0-9]*\):.*/\1/g'`
for L in $LINESTART; do
let LINESTOP=$L+$2
sed -n "${L},${LINESTOP}p" $3
done
exit 0
else
echo "ERROR: Invalid parameters."
echo "Usage: ./$PRG string_to_find number_of_lines filename"
echo "Example: ./$PRG \"Backup started\" 5 /var/log/messages"
exit 1
fi

As you may notice the script also has some simple error-handling and  handles if there are multiple instances of the string that is being looked for.

So there you go. I hope somebody finds it useful :-)

Spotify in Fedora 11

November 5th, 2009 Fighter Hayabusa No comments

spotifyfedoraMe, and many with me, have reported problems with getting Spotify to run under Wine in Fedora 11. The support pages at the Spotify-website describe how to install and run it if you’re using Ubuntu, but - surprise, surprise - not every Linux-user uses Ubuntu. Well, I think I solved it and it wasn’t all that complicated either.

More and more computers are running a 64-bit OS and especially Linux-users have very widely adopted the x64-platform. However, the problem with running Spotify in Wine in Fedora 11 seem to be specific to the 64-bit version of Wine. So what I did was simply remove every trace of 64-bit Wine and installed the 32-bit version instead along with ALSA-support for Wine (I read somewhere that the Pulseaudio-drivers for Wine don’t play along with Spotify), like this:

$ sudo yum install wine.i586 wine-alsa.i586

Then I ran winecfg and selected the ALSA-driver for the audio and ran the Spotify-installer for 32-bit Windows.

$ winecfg (configure audio...)
$ wine ~/Download/Spotify\ Installer.exe

That’s it! Now I’m rocking the latest Slayer-album in Spotify on my Fedora-laptop. Very nice!

WEP-keys are really easy to crack

November 4th, 2009 Fighter Hayabusa No comments

I’m just saying.

Linux: Only for firewalls

October 30th, 2009 Fighter Hayabusa No comments

I found this auction on Swedish auction site Tradera (a site owned by eBay by the way) and I found the item description quite funny and thoroughly stupid. Here it is in English for the benefit of those of you who don’t understand Swedish courtesy of Google Translate.

As you can see this is not really a “real” firewall product. It’s just an old computer with Linux and some firewall software installed on it. Why would a firewall have a graphics card and a sound card for example? It wouldn’t.

What I find so amusing is that he says that “sure, you can use it as an ordinary computer but then you’d have to install Windows or similar on it”. Wouldn’t someone bright enough to handle a Linux firewall also know that Linux is perfectly good as a desktop OS as well? The mind boggles.

Quick ad hoc iMac replacement

October 22nd, 2009 Fighter Hayabusa No comments

img_1878So my girlfriends iMac broke down today and since she needs a desktop computer for, amongst other things, the night classes she’s taking and can’t wait until the iMac comes back from the service shop I had to throw something quick together.

I had an old 17″ monitor that I hooked up to an EeePC and then connected her Apple-keyboard, Logitech-mouse, ethernet-cable and speaker system to it - parts that were all previously hooked up to the iMac - and there we are; a fairly functional desktop. It’s not a 20″ crisp 1680×1050 display, 4GB of RAM and a blazing 2.66GHz Core2Duo CPU (it’s a crummy 1024×768 VGA display, 512MB and an underclocked 900MHz Celeron M) but at least it’s something. It only took me five minutes but I think it will do pretty OK for now.

Categories: Posts in English Tags: , , ,

Krystade rationaliseringar FTW!

October 17th, 2009 Fighter Hayabusa No comments

Värsta roliga skylten

Jag var på Kjell & Co på Triangeln i Malmö idag och i deras skyltfönster såg jag den tjusiga skylten på bilden till höger intill en router av märket D-Link.

Jag skrattade nästan rakt ut när jag läste D-Links härligt krystade försök att rationalisera alla Sveriges datoranvändare och dela in dem i fyra fina grupper (klicka på bilden och förstora den så ser ni själva). Speciellt rolig är den översta, “Peter - ung dataspelare”. Jag menar, kolla in hans tröja. Den unga och hippa generationen representeras alltså av någon med en T-shirt med texten “Yo!”. Är det någon 19-årig gamer som känner igen sig där? Nä, trodde inte det heller. Jag kan se framför mig hur det sitter några mossiga marknadsstötar på något möte och pitchar idéer om vad som ska finnas på den här skylten. “Vi måste snacka med kidsen på deras språk och se till att de känner igen sig”, säger en snubbe i illasittande kostym som tror att han har koll på dagens ungdom bara för att han kollade på MTV en del på 90-talet och föreslår att den tecknade grabben ska han en tischa med texten “Yo!”. De andra fånarna på mötet applåderar och sen tar de långlunch. Och nån vecka senare står jag på Kjell & Co och försöker hålla mig för skratt.

Dessutom heter det inte “dataspelare”. Det heter om något “datorspelare”. Du spelar på din dator. Data är det som din dator läser och skriver. Sen skiter jag i om SAOL numera bastardiserats till att ange “data” som acceptabel synonym till “dator”. Det är sjukt och fel. Dator heter det. Inget annat.

Categories: Posts in Swedish Tags: ,

Calling all European citizens and users of the internet!

September 27th, 2009 Fighter Hayabusa No comments

Go here immediately and sign the petition. The petition has to be presented tomorrow so hurry up!!!