Posts Tagged ‘Ubuntu’

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.

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.

A Tor shirt of my very own

Wednesday, May 9th, 2007

th_tor_front.jpgI am officially the coolest dude in Brooklyn (in my head at least). I have my very own Tor t-shirt! A few weeks ago one of the developers of the software emailed me to let me know that I had been running a fast Tor server for some time now and he asked me if I wanted a free t-shirt. Naturally I said yes. Soon after, I received a package with the shirt. It’s the coolest, ever. Click the thumbnails if you want a better look at the front and back.

th_tor_back.jpgTor is a free program that provides onion routing anonymity for just about any program using the TCP protocol (browsing, blogging, instant messaging, IRC and SSH to name a few of the uses). In this day and age, with privacy rights getting raped, prison-style and draconian governments throwing people in prisons for thought crimes, it’s a good and necessary thing to have and to support. I run Tor on a Linux server (Ubuntu) I rent somewhere in Florida to give back to the network I occasionally use. I don’t really use the server for much, so I don’t limit the bandwidth I give to Tor, allowing it to be one of the faster middlemen in the web of servers that make up the Tor network. I think it’s pretty cool shit.

Tor is available for Linux, Windows and Mac. The project is non-profit and is supported by the Electronic Frontier Foundation and people like you (if you’re cool) and me (I’m so totally neat). You should download Tor, in case you should ever need it. If you have some free bandwidth, consider running a Tor server. You can also help the project by donation. If all of this isn’t your bag of nuts, you might want to think about becoming a member of the EFF and supporting the fight to protect digital rights and privacy. It’s all good shit.

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…)

From Kubuntu to Xubuntu

Sunday, February 11th, 2007

xubuntu_screen.pngI’ve been using Kubuntu for about a year and a half, having switched over from the basic Ubuntu setup. Over that time, I’ve really come to prefer KDE over Gnome. It’s some funky shit—I dig it.

However, a few months ago, I got into Beryl and quickly became addicted to having it. My desktop is a Pentium 4 with a 128 meg Nvidia GeForce 5200 and 768 megs of RAM. As such, the addition of Beryl has made KDE programs kind of slow, clunky and prone to weirdness. My laptop hasn’t really suffered at all much as it’s much more powerful and I guess at some point I’ll slap in a new graphics card and some more RAM into my desktop, but as an experiment, I decided to try Xubuntu with its Xfce desktop environment, to see if it made any difference in performance with Beryl.

After a quick test of installing the xubuntu-desktop package onto my existing Kubuntu setup and getting promising results, I decided to clean my slate, wipe and install Xubuntu solely and see if I could survive on Xfce and Beryl, get a nice looking desktop and have everything I like about KDE, but using GTK+ alternatives. The plan was (is) to get this setup going and try it out, just on my desktop for a few months…say till the Feisty Fawn release hits and then decide, or whatever.

(more…)

Giving up Firefox

Wednesday, November 29th, 2006

I’ve decided to try and give up using Firefox for at least one week. In it’s place I plan on using Konqueror and in some cases where I’m using OSX, Safari or perhaps Camino. The real test for me though is to see if I can make Konqueror do everything I’m used to doing (and worry that I can’t live without) with Firefox.

I’ve been falling slowly out of infatuation with Firefox for a while now. Version 2.0 left me mildly underwhelmed and dealing with much of the same-old including an annoying memory leak. Since I use KDE as my desktop environment, I’ve always had Konqueror kicking around and have been very impressed with it’s abilities as a file manager. In my job, where I often have to migrate many files from server A to B, Konqueror’s view splitting features kick serious ass. As a web browser that I’ve had access to for almost two years, I’ve probably used it a handful of times, mainly because of my dependence on Firefox extensions.

This reliance on extensions bothers me. The fact that enough people use it now that exploits are starting to show up isn’t great news to me either. Granted, they’re generally addressed pretty fast, but whatever. Really cool people use fringe, obscure browsers like Konqueror or Lynx.

(more…)

Good security starts with getting rid of Windows

Wednesday, November 15th, 2006

I just read this article on security advice by Kevin Mitnick and I’m equal parts pissed and laughing at it. It’s a classic case of ignoring the elephant in the room and it really makes me wonder where Mitnick’s integrity is since I don’t think he’s a particularly stupid person.

He starts the article with the old “We live in dangerous times. Evil hackers can attack you with their viruses!” line and then proceeds to outline ten steps he feels will increase your safety and security. Some are common sense recommendations that I agree with:

  1. Back up everything
  2. Choose strong passwords
  3. Be diligent with applying security updates
  4. Use encryption for sensitive data
  5. Disable unused services
  6. Use a firewall/router to restrict/limit access to your machine
  7. Encrypt your wireless networks with uber-strong passwords using WPA

All these points I agree with. All are basic, simple, common sense things everyone should do, but often do not. His other recommendations are what give me pause:

  1. Use commercial antivirus products
  2. Use one or more anti-spyware applications
  3. Avoid Internet Explorer and disable scripts in your email client

This is where I completely disagree. Recommendations 8-10 can be simplified to one step:

  1. Stop fucking using Windows already

(more…)