Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, April 20, 2010

Converting and chunking single-file CDs (with CUE sheets)

Issue 1: You have a number of files with .ape extension, for which there is no default player on Ubuntu.

Solution: Convert them with ffmpeg:
for f in *.ape; do ffmpeg -i "$f" "${f%.ape}.wav"; done



Issue 2: You have a music CD which you ripped to .ape, .flac, or whatever else, but instead of splitting the file you just created a CUE sheet for re-burning and would like to split it for your digital music player.

Solution: Use shnsplit:
shnsplit -o flac -f [file].cue -t "%n. %a - %p - %t" -m \ _ [file].flac


Replace [file] with the appropriate filename (or wildcard). If your input file is not .flac (e.g. .wav, as per the .ape file converted above) just use the appropriate extension. Check the manpages for shnsplit for additional configurations.

Wednesday, March 31, 2010

Lucid OSCAR

Getting Oscar to run on Ubuntu Lucid is not a terribly arduous task. For the most part you can follow this guide, with some modifications of course:

* Don't install Tomcat from the Ubuntu repos. You'll only find Tomcat 6, and it's too much of a hassle to get Oscar to run on that (for now - word is in the Oscar scene that they'll release a new official version around June, and I'll bet you dollars on a dime that it will support the new Ubuntu LTS out of the box). For now, just grab Tomcat 5.5 off of the Apache site, and follow any run-of-the-mill installation guide for it.

* Just go with Ubuntu's default-jdk.

* If you're comfortable with Ubuntu's upstart you don't need to restart the machine, just (re)start the necessary services.

* Don't use the Oscar snapshot referenced in the guide. You may use the Oscar snapshot referenced in the guide, but do not use the pre-archived (09.06) snapshot on the Oscar download page. The MySQL scripts of that version are broken. I've had no problem with the bleeding-edge CVS snapshot. Sometimes the bleeding-edge CVS snapshot breaks, but it works most of the time.
** When running the MySQL script with the bleeding-edge CVS snapshot, where the guide instructs you to just enter the password instead of ****** you need to enter both the username and password, i.e.
./createdatabase_on.sh root <mysql_rootpassword> oscar_mcmaster 

* The SSL certificate line probably won't work for you. I haven't played much with it yet, but until you change it you won't be able to log into Oscar. The oscar.war file contain its own oscar_mcmaster.properties file which WILL override the oscar.properties in your Tomcat directory. For the most part that is no huge problem, except that it also overrides the MySQL password that you set, thus making you unable to log in. You can either set the MySQL password to be the same as the original one in the oscar.properties file (BAD idea), or you can change the oscar.properties file BEFORE running ant.

Saturday, July 4, 2009

Compacting VirtualBox image - Ubuntu edition

It is well documented among the VirtualBox community that 'dd' is not enough to zero out a disk image for compacting. The preferred tool to do so is 'zerofree'. Now, the issue is that it requires the disk to be mounted as readonly. This is fine and dandy, except when you only have one partition to work with. My workaround is to use the Ubuntu minimal CD. The steps necessary are:

* Before booting the minimal CD, make sure you've got zerofree installed
'sudo aptitude install zerofree'
* Boot the minimal image.
* Enter recovery mode.
* In the language selection screen, select "Go Back" instead of picking a language.
* Start a new shell.
* Make a mountpoint, e.g.
'mkdir /mnt/r'
* Mount the disk image,
'mount -n -o ro -t ext2 /dev/sda1 /mnt/r'
* Copy zerofree and the necessary libraries to the tmpfs:
'cp /mnt/r/usr/sbin/zerofree /bin/; cp /mnt/r/lib/libext2fs.so.2 /lib/; cp /mnt/r/lib/libcom_err.so.2 /lib/'
* Run zerofree
'zerofree /dev/sda1'
* Profit!

Thursday, July 2, 2009

Installing Ubuntu in VirtualBox

These steps are for OSX Leopard as a host, Ubuntu Jaunty (9.04) netinstall.

* Don't use the default network adapter. Use the Intel one instead.
* I set the partition manually to just have one big partition, ext2. No swap partition was set up because a) I have enough memory allocated, b) I can always set up a swapfile, c) having a swap partition increases the disk image file size,
* gksu, make, and linux-headers-generic are required to install guest additions.
* The video driver was giving me problems. Installing the guest additions with xserver-xorg-video-vesa alone did not work for me. I've narrowed it down to either xserver-xorg-video-vmware, xserver-xorg-video-fbdev, linux-headers-virtual, or a combination thereof. Afterwards I've removed all but xserver-xorg-video-fbdev and things are still working.
* localepurge and debfoster are your friends when minimizing the disk image size.

Thursday, June 11, 2009

Cleanign up my Ubuntu package list

After testing it on the Ubuntu Parallels VM, I decided to remove all Gnome-related packages from old cicada. I'm using slim instead of gdm, wpasupplicant instead of network applet, and of course xmonad. The login manager still defaults to 1204x768, but I suspect that's because the laptop screen only supports up to 1280x768, but it tries to maintain the external monitor aspect ratio. In any case, I managed to get both screens to work at the same time. The trick was to toggle it before grub booted, and voilá, 2 screens. I found a new coolness about xmonad, too - the 2nd monitor will display the last workspace seen, AND xmobar will tell me which desktops each screen is displaying. I'd still like to figure out how to automatically set the resolution for both screens on bootup, but for now I'm a happy camper with xrandr. For those with a more mouse-oriented mind, there's arandr.

Oh, and did I mention that wpasupplicant is much more reliable than network applet (not to mention wifi-radar, which sucked so hard it could pull a golfball through a garden hose)?

I found out that xmonad will keep the background that slim uses. That works nicely on my VM where the screen resolution stays the same, but on poor cicada it has a tendency to maintain the image at the old resolution and tile it. Bleh. I figure though that I just need to find a nice image for tiling (which slim also supports), and Bob's your uncle.