Archive for the ‘Ubuntu’ Category

Sonata and MPD

Wednesday, September 10th, 2008

[image: sonata.png]Putzing around last Sunday, I decided to give MPD a try. I store all my MP3 files on my desktop computer, which runs Ubuntu and I’ve wanted to be able to control music playback on that machine from my laptop, wherever I happen to be lazing about at home.

I had a bit of a hard time getting MPD set up, working and compiling a database. The main issue was file permissions, but once I got that hammered out, installed MPC so I could run commands, it worked nicely.

However, I much prefer a GUI to manage music, so I hunted around for a front-end for MPD. I first tried gmpc, which worked fine. But, I need support for last.fm and to handle this with with gmpc, you have to compile a plugin, which was a huge bitch.

While trying to get through the plugin compile, I stumbled on Sonata, which seemed popular and well regarded and contains built-in support for last.fm. Also, it’s in the Ubuntu repositories, which is a big plus for me. So, I dropped gmpc and gave it a try.

Sonata works well, it displays album art and all that fun stuff, but doesn’t have the smart playlists that I’ve grown used to with Amarok and exaile, which were two programs I’ve loved and relied on in the past. Truth told, it’s low on features, but so are most MPD front-ends. It works, though. It handles last.fm and doesn’t look too fugly. I’m going to stick with it for a while and see how it goes, since I really like being able to run a central music server. But, if there’s a better front-end out there, I’d like to know about it.

Converting FLAC to MP3

Friday, April 18th, 2008

I’ve been looking for a decent way to convert FLAC files to MP3 under Linux for a while now. I’d been using SoundConverter, but I notice that there’s something not right with it. I’ll set my preference to VBR, highest quality (target rate is ~256), but I end up with files at around 150-192, which is not right.

So, I’ve done a bunch of searching around and have cobbled together this script, taking a little bit from here and a lot from there:

##START SCRIPT##
#!/bin/sh

for a in *.flac
do
OUTF=`echo "$a" | sed s/"\.flac$"/"\.mp3"/g`

ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g`
TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g`
ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g`
GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g`
DATE=`metaflac "$a" --show-tag=DATE | sed s/.*=//g`

flac -c -d "$a" | lame -V 0 - "$OUTF"
id3v2 -t "$TITLE" -T "$TRACKNUMBER" -a "$ARTIST" -A "$ALBUM" -g "$GENRE" -y "$DATE" "$OUTF"
done

mkdir "$ARTIST" && mkdir "$ARTIST"/"$ALBUM"
mv *.mp3 "$ARTIST"/"$ALBUM"/.
## END SCRIPT##

It works beautifully.

Command Line Ejections

Tuesday, March 11th, 2008

Nice. I just figured out how to eject my CD/DVD drive on my Linux desktop (Xubuntu) via command line!

First, display your fstab file to see what the drive is named: ’sudo cat /etc/fstab’

Then look for your disc drive. Mine was called ‘cdrom0′.

Once you’ve found it, type ‘eject [name of drive]‘ and watch the magic.

I mapped that command to my keyboard. Gnome, Xfce and KDE all have a an interface to help you map keyboard shortcuts in their system preferences, or you can just edit the config files manually with a little googling. I mapped ‘ALT-Shift-F12′ to run ‘eject cdrom0′. Easy.

Getting Firefox’s “Send Link” working with Thunderbird and Ubuntu Linux

Monday, January 21st, 2008

I’ve been using Firefox, Ubuntu and Thunderbird for years now and one thing that always irked me was the fact that the “Send Link” option in Firefox was totally non-operational. Ideally, I’d ALT-F - E and bang, a new email would open up in Thunderbird with the page title in the subject and the link in the body of the mail, but no go. Nothing.

This morning, I wanted to email a buddy of mine a link and got to feeling like there must be some fix out there for this, so I did some Googling and after hitting on the sweet search string, I found the answer.

To get Firefox to open a compose window via the “Send Link” option, do this:

  1. Open firefox and in the address bar, type “about:config”
  2. Right-click within the body of the page that opens and select “New” and then “String”
  3. In the dialog box, where it says “Enter preference name”, paste: network.protocol-handler.app.mailto
  4. In the next dialog box, enter your path to Thunderbird. Mine is /usr/bin/thunderbird.
  5. Hit OK and restart Firefox. “Send Link” should now work with Thunderbird.

Sweet.

Exaile Commands Do It Better

Sunday, December 23rd, 2007

Bang for buck, Amarok is the best music player/library manager on earth. But lately, since I’ve been flying Gnome, Xfce and other non-KDE-native environments, I’ve been using Exaile, just for the heck of it. It’s also nice to not have to load KDE libraries, just to play some music. Anyway, Exaile a good program. It’s come a damn long stretch since I first checked it out. It can handle large libraries and with every realease, closes the gap on features that make Amarok the best.

I’ve been using exaile, pretty much exclusively for about a year or more now. I’m not sure what took me so long but I just now ran ‘exaile –help‘ and got the command line arguments. Why didn’t I do this a year ago? I love command line music control. I don’t know if they’re any better, but to me, it’s always much more satisfying to execute tasks via command. Managing my playlist via command line makes it uber.

Usage: exaile.py [option...|uri]

Options:
-h, –help show this help message and exit
-d DIR, –duplicates=DIR
Finds and deletes all duplicate tracks (based on their
md5 sum)
-n, –next Play the next track
-p, –prev Play the previous track
-s, –stop Stop playback
-a, –play Play
-t, –play-pause Toggle Play or Pause
-q, –query Query player
–gui-query Show a popup of the currently playing track
–get-title Print the title of current track
–get-album Print the album of current track
–get-artist Print the artist of current track
–get-length Print the length of current track
–current-position Print the position inside the current track as a
percentage
-i VOL, –increase_vol=VOL
Increases the volume by VOL
-l VOL, –decrease_vol=VOL
Decreases the volume by VOL
–play-cd Start playing a CD
–new Start new instance
–set-rating=RATING Set rating for current song
–get-rating Get rating for current song
–settings=SETTINGS Settings Directory
–cleanversion
–version
–testing
–no-equalizer Disable Equalizer support
–start-minimized Start Exaile minimized to tray, if possible

Awesome. For me, at least.

Gutsy Gibbon Time

Monday, September 3rd, 2007

Kubuntu 7.10 "Gutsy Gibbon"I switched my desktop over to Kubuntu Gutsy Gibbon yesterday. Previously, I was running Ubuntu 7.04, Feisty Fawn. Gutsy’s final release is in October and I always get antsy whenever the release dates get close, usually breaking down and installing the beta releases when they come out. This time however, I gave in a bit earlier than usual. Gutsy goes beta in a little less than a month, but I decided to go for it anyway, since I can alway reinstall the older OS version and I also have a laptop for backup if things are problematic, but I want to stick it out and play with things. So, I’m currently running Kubuntu 7.10, Tribe 5 and things are moving pretty smoothly. I see some things are missing or unfinished, but I’ve got a stable and functional desktop and I’m able to do just about everything I need or want. I’m sticking with it.

Another thing I’ve done is switched back over to KDE from Gnome, mainly just to see what’s new. I’m well familiar with KDE, so it’s a smooth transition. I do notice some annoying font issues, but I can probably fix that and though I’ve checked it a few times already, my resolution seems off. I could have sworn my windows weren’t so huge with Gnome. I vaguely recall this being something I had to fix in KDE before, way back when. I have a flat screen monitor on this desktop, so there’s only one resolution and I’ve amended my xorg.conf to retain only the correct one…yet something looks off. I’ll figure it out at some point, I guess. Perhaps it will fix itself by the beta or final release.

One thing I notice with 7.10 is that Kopete, the KDE instant messaging client now comes with built-in OTR encryption support as well as the GnuPG it was using before. I’m loving this, since most other clients out there like Gaim/Pidgin and Adium as well as others, are equipped with OTR. I’d previously switched over to Gaim since I couldn’t encrypt messaging between my friends with Kopete because none of them had GnuPG capable clients.

Anyway, I have a new desktop to play with. Maybe at some point in the near future I’ll put Beryl on it for some eye-candy, but for now, I’m just checking things out.

WoW + Ubuntu = Sweetness

Sunday, June 3rd, 2007

[image: My WoW main]I was playing World of Warcraft pretty regularly, early last year. I had the game installed on a Windows partition on my laptop but I completely loathe booting XP, so as time went on, I was playing less and less till I eventually stopped altogether, though keeping my account active.

Tonight I finally got off my ass and installed WoW in Ubuntu, my preferred Linux OS of Doom. It was one of those things I knew was possible, but I was too lazy to take on the task. I followed this howto and after about thirty minutes, hosing the X server a good six or seven times, I finally got WoW running on my laptop. At first, I had no sound, but after manually incresing the sound buffer to 250, I was completely set. The result is awesome. Warcraft runs perfectly on Ubuntu using just Wine. The only thing I notice is that it does not play nicely with Beryl, but it’s simple to switch the window manager over to metacity. I actually hotkeyed the switch, so it’s even simpler.

Considering that I now no longer have to boot the dreaded Windows to play, I’ll probably be logged in a lot more. This could be a good or bad thing, considering how completely addicting it is.

Doom 3 + Linux = demon-fragging joy

Monday, May 7th, 2007

doom3.jpgI bought received Doom 3 for the PC as a gift, way back in 2004 and really dug it’s dark, brutal, visually twisted and genuinely scary vibe for an FPS game. I got stuck fairly close to the end and never managed to finish it and some time later, I bought an expansion for the game, but never installed it. Since I was running a dual-boot between Linux and XP (strictly for video games), I eventually backed up my save files and uninstalled it to make room for newer games and kind of forgot about it.

Yesterday, while sorting through some old shit for a trip to the storage center to grab some summer clothes, I found the game in a pile of CDs. Remembering that the Id Software guys were into supporting Linux with their titles, I checked to see if a install package for Doom 3 on Linux was out. Sure enough, there was one, so I decided to try it out.

I found this FAQ and following the instructions, downloaded the install package, ran it and installed the game to ‘/usr/local/games/’ and then copied a bunch of files off the game CDs I had to the same directory. I still had to enter the software key off the game’s jewel case, but the result is a very fine looking Doom 3 running under Xubuntu. Totally fucking sweet.

I still have a Windows partition on my laptop and there are some games installed on it, but I rarely have the patience to boot it and rely mostly on my beloved Wii and PS2 for gaming fixes. The more Linux install packages I can get for PC games, the more money I’m going to
spend on the industry. I’m not really into paying a monthly fee for Cedega so I can run Windows games and I rarely have the patience to attempt to get a game running myself using Wine. I wish more game companies did this for Linux users.

Feisty desktop, crouching laptop

Sunday, April 1st, 2007

I’ve been running Xubuntu Feisty Fawn on my desktop computer at home since Herd 4 (so… uh… at least a month I think…?) and I’ve found that there’s not much I can say about it that’s bad. In fact, it’s the first time I was able to upgrade via the “apt-get dist-upgrade” method without a whole mess, complete with a busted X server. I was able to do the upgrade and still have everything working, even Beryl.

Still as successful as the upgrade was, I generally prefer back shit up and to do clean install since I think that a lot of the fun of a distribution upgrade is seeing all the changes, bells and whistles as they appear fresh out of the box (or the ISO, in my case). A dist-upgrade can at times hide these things from my since it may upgrade a program but it still relies on my old config files for the most part.

(more…)

Death to Windows

Monday, March 5th, 2007

broken_window.jpgI’d forgotten how absolutely fucking horrific Windows is. Tonight, I dusted off an XP partition that I’ve not booted for months and was assaulted with outdated antivirus warnings—more like threats actually, since my update subscription had long, long since expired. Symantec’s happy to tell you how dangerous the world of virii can be, but unless you’re waving cash, they’re not about to make it a safer place for you. They’ll just annoy the fuck out of you with “YOU’RE IN DANGER!!!” warnings that seem unable to be turned off and in themselves seem to be awfully a lot like adware bullshit. Not only will they not protect you’re fragile computer, they’ll hold it hostage with annoying pop-ups until you pay. Note to self: uninstall that pile of shit the next time you have the intestinal fortitude to boot Windows again.

On top of the antivirus bells going off, I had the obligatory Windows security patches and Genuine Advantage (oxymoron-speak for Genuinely fucked software validation tool) update. I had something like 13 patches to slog through. All this just to satisfy my occasional, every-other-month or so World of Warcraft fix. Memo to the board of directors: Get that game running on Linux or stop fucking playing it.

All in all, Windows didn’t have it’s pants up, belt tightened, cowlicks slickened and engines ready to go for a full thirty-plus minutes after the initial boot (I had to reboot like three times to apply the various updates). Finally, ever so far down the road, I’m ready. Except I no longer give a flying fuck. I’m so annoyed, frustrated and pissed off at this masochistic clusterfuck of a shitty OS, I CTRL-ALT-DELETE right the fuck out. Fuck that noise. I’ll smash Orcs some other time.

Thank God for Linux. Thank God for OSX. Thank fucking God that there’s a an alternative to being anally raped by Redmond, WA. To think of all those people out there, who use Windows every single day, so inured to being fucked that they can’t feel the bed-rail clenched between their teeth, even as the mascara stings their eyes and the rancid sweaty breath of Steve Ballmer churns their stomach as he grunts away, taking his turn while Gates scrounges for more axle grease.

Death to Windows.

Image credit: youngdoo