Posts in 'Linux' – Page 2

LDAP-Authenticated Server & Whoami Failures (etc)

I’m back again, after a bit of a unscheduled ‘break’ in my normal work life.  After a couple of days away for work on the Gold Coast, then the sad passing of my Grandfather and his memorial, then being sick over the last weekend from what I can only guess was a nasty 24-hour bug, I’m back.  And whilst a little worse for wear still today, it’s life pretty much as normal.

Today’s fun and games was on a server we use that uses LDAP authentication for its users.  Nothing special, except that today I started …

ffmpeg and FLV on Ubuntu

Wow, ffmpeg is really great for converting multimedia.  Unfortunately, the support for MP3 audio doesn’t appear available by default.  Sure, it can decode MP3 audio and write to an MP3 container, but what about having an actual MP3 codec available?

sudo apt-get purge ffmpeg
sudo apt-get install libavcodec-unstripped-52 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg

As a little bonus, there’s a number of other codecs that come along with it too (xvid etc).  I’m not too fussed on them but now I can use -acodec libmp3lame as my audio codec and have the FLV outputted with MP3 audio …

Find and replace across files - Linux command line

Today’s interesting post concerns finding and replacing terms across multiple files via a simple command.  Thanks to this great blog post, it all comes down to one single line.  I had found a previously-useful line of code, but the problem with that one was the fact that it used the find command.  The problem with that is that if you do a wildcard search for * in a directory, it’ll give you back ‘.’ as a result.  Trying to work with that just wasn’t happening.

So, without further ado, the command (replacing ‘search’ with your search term and ‘target …

Unix: Removing Open Logical Volumes in Centos/RHL

Because I still haven’t remembered to set myself up with a limited-access account for blogging on my new site, I’m back here again. (EDIT: Migrated from old site)

This time is a lot of fun and games with removing an “open” logical volume from within a CentOS environment. The dom0 machine has a set of logical volumes in a volume group for each of the VMs and one of them went and failed dismally, and after its xen destruction (xm destory foo) its LV was left with it being “open”.

It’s not exactly easy to see how …

Ubuntu: Dual Monitors & Separating Tasks

Today’s puzzle: how to get Ubuntu (specifically GNOME Panels as it turns out) to use my new dual-monitor setup and show only the tasks from one monitor on that monitor’s panel. Sure, people had mentioned that it was possible (everywhere) but noone actually seemed to take the time to mention how. That’s when I found this: http://www.lloydleung.com/2006/10/14/gnome-multiple-monitor-taskbar-window-listing/ so cheers go to Lloyd there. Still works (and should be fine on any version from at least now on):

  1. Right click on anywhere on the launchbar, click “New Panel”
  2. Drag that to …

Ubuntu: PulseAudio Joy

Well, it’s a sad state of affairs when simply unplugging your set of USB headphones causes your Intrepid Ibex install of Ubuntu to crap itself. Even with the same set of headphones plugged back into the same port not 10 seconds later. Painful.

But, the good news is that after a few hours of pain, PulseAudio works and it’s magical in comparison to the older audio systems (3 apps playing audio at once..wow).

Check out http://ubuntuforums.org/showthread.php?t=789578 for a great walk-through on how to set it up on Hardy or Intrepid. Unfortunately …

Unix: SSH Port Forwarding

So it’s not that special and I bet 1000 people have already posted the same details. Still, it’s cool and I need a place to record my thoughts about this:

ssh host.name -L YYYY:other.host:ZZZZ

Essentially, this means logging into the first machine and creating port YYYY on the local machine as the port ZZZZ from other.host

Works well.