Site Scene

Posts Tagged ‘linux’

The biggest problems have the simplest answers…

..and how true that is.  Today’s time consumer is directly related to just 1 misplaced line of a buildout configuration (and presumably something that’s changed somewhere else).

The result

After much hunting and hunting, it turns out my Zope2 Fake Eggs weren’t being generated. (more…)

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:

grep -lr -e '<searchterm>' * | xargs sed -i 's/</searchterm><searchterm>/<targetterm>/g'

Just remember, the first grep command is doing Regex, so escape anything Regex-y (dots, slashes, etc) or otherwise “prepare for unforseen consequences” when running sed.

Virtualenv, Plone, and Ubuntu 9.04 Jaunty

What a complicated situation it is trying to use all of the above-mentioned pieces of software together. In all seriousness, Virtualenv is now appearing to be the best thing since sliced bread for me to help out with making Plone/Zope usable under Jaunty. (more…)

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 any monitor.
  3. Right click on that panel, and click “Add to Panel”
  4. Select “Window List” under Desktop and Windows
  5. Click Add.
  6. Click Close, and you’re done.

Alright!

Linux: Graphics Card Woes & BIOS Issues

…and I had thought that installing a graphics card in a computer was as easy as opening the case, inserting the card, and booting the machine (then Xorg config etc). Well, to tell the truth, I just moved my HDD, peripherals (gfx card included) to a new box – now a Dell OptiPlex 755. But, it’s not that easy if you can’t boot your Ubuntu 8.10 OS!

The computer kept spitting this message out, even though it just worked a few days ago:


15.848000 NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
15.848000 NVRM: BAR1 is 0M @ 0x00000000 (PCI:0001:00.0)
15.848000 NVRM: The system BIOS may have misconfigured your graphics card.
15.848000 NVRM: The NVIDIA probe routine failed for 1 device(s)
15.848000 NVRM: None of the NVIDIA graphics adapters were initialized!
15.848000 NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:

After much pain, I managed to get into the computer and have the network loaded up (yay). Some hours of searching, I’d stumbled onto Dell’s Official solution to driver updates (biosdisk); no luck because the boot disk wouldn’t load the EXE. Tried the official method from Ubuntu’s wiki; no luck since my BIOS couldn’t be found in the package repo.

Final ditch effort to do it manually led me to this: http://bigbrovar.wordpress.com/2008/12/07/upgrade-downgrade-your-dell-bios-on-ubuntu/

And, it works! Turns out on my system I didn’t even need to edit the /boot/grub/menu.lst file (BIOS just updates itself upon reboot).

And then, like magic, everything’s fine. My whole system is back working again after just that one (major) fix.

Back to work for me…