Concatenating MP3 Files in Linux

I’ve run into an issue with a little portable music player I have – it doesn’t make reasonable assumptions about the order in which to play the tracks of an audio book.  Even when the files are named sequentially with numbers, when the timestamps are in the order they should be played back, when there are valid and correct track numbers in the ID3 tags, and regardless of the order in which they are copied to the device (corresponding to the order of their entries in the filesystem lookup table), they always play in what seems like random order (this doesn’t happen with music, which works as one would expect).  I’ve found that the easiest solution to this is to just wrap them up into a single large MP3 that contains the whole book.  There are many ways to accomplish this, and here I’ll show a tool called mp3wrap that worked simply and reliably for me.

Continue reading “Concatenating MP3 Files in Linux”

Patching pyserial to Fix Serial Baud Rate Limitations in Linux

I ran into an interesting issue when trying to connect to a new printer with my Linux laptop.  The printer firmware was set up for 250000 baud and for some reason I couldn’t connect to it.  After a little searching, I found that this was a known issue in pyserial with newer kernels and there’s a quick fix.

Continue reading “Patching pyserial to Fix Serial Baud Rate Limitations in Linux”

Concatenating PDF Files on Linux

I’ve had this socked away for a while, but was just reminded of it.  This is a method of concatenating PDF files.  This takes multiple PDF files as inputs and outputs a single PDF file made up of those.  This is particularly useful when a document needs to include sub-documents, such as a report that includes preexisting data sheets, or a proposal needs to include financial statements, resumes, or other supporting documents.

Continue reading “Concatenating PDF Files on Linux”

Arduino, 3D Printer, and USB Serial Device Permissions on Linux

When I first got started with Arduino under Linux, I quickly discovered that I had issues connecting to the Arduino to program it or talk to it via serial.  I later found the same issue when I started working with 3D Printers, when trying to connect the host application to the printer to operate it.

This was clearly a permissions problem, as all of these cases (and other USB serial devices) worked just fine when run as root (not a good practice, don’t do this).  This is just a quick post showing how to set yourself up with the permissions needed to use these devices as a normal user.

Continue reading “Arduino, 3D Printer, and USB Serial Device Permissions on Linux”

Setting up the HP LaserJet Professional M1212nf MFP Printer on Linux (CrunchBang Waldorf)

I’ve got an HP LaserJet Professional M1212nf MFP printer at the office, and most of the machines in the office are running CrunchBang Waldorf.  The stock version of hplip does not include the drivers for this printer.

Continue reading “Setting up the HP LaserJet Professional M1212nf MFP Printer on Linux (CrunchBang Waldorf)”

Consistent Experience Across Multiple Computers on CrunchBang Linux

This is just a quickie, nothing too in-depth here.  I just thought I’d mention that I’ve migrated all of my computers from Ubuntu to CrunchBang.  I enjoy the lighter and more responsive interface, as well as the lower system overhead.  It fits my workflow and interaction style well.

I don’t need a high degree of customization to be happy, I just want my customizations to conky and the openbox menu to be consistent between my various computers.

Continue reading “Consistent Experience Across Multiple Computers on CrunchBang Linux”

Assigning Static Device Names for USB Serial Devices (Including Arduinos)

I posted this on G+, but figured I’d post here as well with a little more depth.
I was working on a processing sketch that needs to communicate with several USB Serial devices (mostly Arduinos).  To make my life easier I wanted to find a way to make sure I could identify each one every time by the location of the port in the filesystem, which meant a static name for each.  This setup will give you the same name for the device in /dev every time you connect it.  This is particularly helpful if you have lots of devices to manage or want to hard-code a path to the port into a script or application (but only one that will only be running on your local machine).

Repairing an Aborted Ext3 Journal

As mentioned in one of my prior posts, I had a server that kept remounting the hard drive as read-only because of filesystem problems.  The problem it was encountering was an aborted journal, which was identified by fairly unambiguous language in the output from ‘dmesg’.  The solution, of course was to rebuild the journal.

Continue reading “Repairing an Aborted Ext3 Journal”

Creating a Named Pipe on a Read Only Filesystem in Linux

I recently ran into a problem with a remote Linux install that caused the root filesystem to keep remounting itself as read-only in an attempt to keep from eating itself.  Because the filesystem was read-only, I couldn’t change any permissions, install any ssh certificates into different accounts, reset passwords or any of the other standard ways I would get at the data I needed.  Likewise, because this was a remote system, I couldn’t just boot into a different environment to read the data (there was also the fear that the drive might fail or that there might be data loss upon performing the diagnostics needed to fix the volume).  The solution I came up with was using a named pipe over ssh to funnel data.  This worked really well, but took a bit of looking around to figure out how to make it happen.

Continue reading “Creating a Named Pipe on a Read Only Filesystem in Linux”