Wi-fi USB in Ubuntu

Three times I’ve run into the same issue with getting someone’s wireless USB fob to work, and each time I’m pretty sure it’s the same thing.

No, not the drivers, or any wrappers needed, not the obvious stuff.

It’s the /etc/network/interfaces settings.

Every fricking time!

Here’s how it tends to go:

I look up what’s needed (in this case it’s a Dlink-g122 version A2), install everything and the computer plays clueless.

lsusb says the USB wireless fob is there, everywhere else plays dumb.

I go into ndisgtk and it says the drivers are fine but the hardware isn’t present.
(Sidenote: I just dump all three driver files into a folder – the .bin, the .sys and the .inf; it refuses to work with just the .inf)

Round and round I go, until I found my old thread about this THREE YEARS AGO and I finally see the problem.

No setting for wlan0 in the /etc/network/interfaces … yes, it’s that STUPIDLY simple.

Here’s the ideal /etc/network/interfaces:
# beginning
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

# end

See how the bit after the auto matches the bit after the iface? Yeah…. I had the latter without the 0.
Or nothing about wlan0 at all.

Stupid ‘Manda.

Advertisements

Two glitches upon upgrading Ubuntu

I tend to put off updates to official versions of things I use (beta software I freely update)… Mostly because I find glitches in both and delaying the official updates means they’ve hopefully been addressed.

I ran into two things that I didn’t like upon upgrading to the newest version of Ubuntu.

  1. The minimize / maximize / close buttons were on the LEFT (a la Mac OS)
  2. It’d spontaneously restart back to the login screen

The first was an easy fix:

  1. Alt+F2 to bring up the Terminal
  2. type in gconf-editor
  3. Navigate to apps > metacity > general
  4. Look for an option called button_layout
  5. If they’re on the Left they’ll be: close,maximize,minimize:menu
    If you want them on the right: menu:minimize,maximize,close

The later is detailed in hackademix but the command given is faulty:

sudo add-apt-repository ppa:bryceharrington/purple && apt-get update && apt-get upgrade

should be:

sudo add-apt-repository ppa:bryceharrington/purple && sudo apt-get update && sudo apt-get upgrade

This forces all three commands to be at sudo (root aka superuser) level.

(Edited after posting b/c of a copy / paste issue, ended up repeating the top part of the article)

Earthtainer – use it to compost too!

I’ve had a niggling thought in the back of my mind for a while, and it finally came into the light recently.

It seems a bit of a waste of space to have both the Earthtainer and a compost pile. Don’t get me wrong, having a separate compost pile is great if you’ve got a lot of waste, or even a lawn to mow, but what about those that lead smaller-scale lives? The people who live simply and don’t create a lot of waste over time.

My thought: Collect ingredients for the compost, but put them in the dirt section of the Earthtainer! If you grab a few worms while out for walks on rainy days, you’re set!

This is also ideal for tomatoes – when you plant them you’re better off half burying them a few weeks later (they put out more roots from the buried stem), and when veggie waste breaks down it shrinks.

Here’s the how-to:

Create the Earthtainer’s bench (the platform that has the wicking basket in the middle and holds the earth out of the water) like normal and put in the landscaping fabric like normal (keeps the dirt out of the water). Then put a big mound of dirt over the wicking area and surround it on all sides with compostable material. Repeat until the Earthtainer is 1/2 to 2/3 full, then top it off with a layer of dirt and toss in some worms.

The core in the middle will wick the water like normal, the worms will go into the scrap veggies and gorge – creating compost (vermicompost, technically).

EarthTainer – my customizations

The EarthTainer is a wonderful idea, but over time I think the Rubbermaid totes in the stores will get thinner and thinner (and less and less opaque) as the corporation cuts costs; this may make my tweaks required instead of preventative steps.

1.) After the main tub has been prepared (holes drilled and such) use the landscaping fabric to make an inside curtain from the top of the tote to the bottom in a full circle (if you like the look, feel free to do it on the outside – the black will absorb the heat from the sun).
This curtain should slow the sunlight and algae growth.

2.) Put in your support bench and cover all inside surfaces with the landscape fabric – much like a fabric cup. This should make it easy to pick up the soil as a package (no digging in the fall) and may keep most of the roots out of the water.

3.) Do NOT drill a hole for the feeder tube but cut an upside down U just below the bench level – best on the side facing away from the sun to slow algae and evaporation. This stiff flap stays closed until top up time.
Random tip: drill the ends of the cut so the cut doesn’t turn into a travelling crack as the plastic gets more brittle.

I plan to use a flexible hose (that’s stored away from the sun) to top up the water. I will probably have rain water in a large bucket and use a simple syphon to move the water.

Also: the second cup-like wrapping of landscape cloth will come in handy shortly… I forgot to drill holes in the bench for drainage into the water section. Heh, oops.

Dollar Store Gardening

I’m an avid fan of dollar stores, and with good reason: the ones in my area ROCK.

Here are some of my plans for uber-cheap gardening:

1 Plastic window box (these come in 1/4 round, square or long. I prefer the long ones – they disappear fast, though.)
1 nylon scrub pad cut in 2 pieces (the ones that don’t include soap)
1 packet of nasturtium seeds
1 packet of lettuce seeds
1 packet of calendula seeds
1 kid’s watering can
1 sheet of emergency blanket (the thin reflective kind. cut into smaller pieces – this is to reflect the sun back onto the plants)
1 package of bamboo sticks (the long ones – to support climbing plants OR to hold the reflective blanket)
And if I wanted to I could buy the soil in the dollar store too, but it’s cheaper in big bags.

Assembly:
Take the window box, flip it over and gently carve the recessed O’s out for drainage.
Flip it back to right side up and place the halved scrub pad over the holes; this acts as a filter to keep the soil in.
Fill with your choice of soil
Water with kid’s watering can (if you can’t get one with a sprinkling head, place a small square of scrub pad on the surface of the soil and pour on / into it; it absorbs the force of the water.)

Let your box drain for 5 minutes and then plant the seeds.
Put the box in a WARM place until the seeds germinate – the lettuce should pop out in a day, the nasturtiums shortly behind them.

Or: keep in a dark spot to encourage root growth (a day or two), then harden off or just stick them in the window.

My only concern is that the plastic may contain something that should not be in food / has chemicals the plants will absorb.

Disable Slow Keys in Ubuntu

For whatever reason (long story involving a keyboard not working right) I had assistive technologies installed on my machine – you know, the ones that help the physically / mentally challenged use a computer?

Well, one of them was hindering my ability to play one of my games. Dangerous territory there, don’t get in the way of my games. Anyway… the pain in my arse is called Slow Keys.
(Edited the above to make it clearer)

If I held down the shift key for more than 8 seconds, it would ask me if I would like to enable Slow Keys.

Unfortunately, this dialog box makes anything you type not work / appear until it’s dealt with.

Annoying? Oh yes, and even more so as it tended to pop up UNDER the main window, so half the time I thought I was lagging / having technical issues.

The solution? To go into the settings for the assistive technologies:
System > Preferences > Keyboard > /Accessability/ > [ ] Accessability Features can be Toggled with Keyboard Shortcuts

I tried Googling it, nothing came close, so here it is.

Update – As Kevin pointed out in the comments, they’ve moved it in an update:
Kevin Says:

In Ubuntu 11.10 the procedure has changed to:
System Settings> > Universal Access > Typing > Toggle Slow Keys”

Thanks Kevin!

And hello linuxquestion.org users ^_^

Cure multi-page articles with Repagination and Adblock Plus

I don’t know about you, but when I see what should be a one page article spread across 6 pages in tiny chunks, it drives me nuts! Call me crazy, but I don’t want to wade through ad-saturated page after ad-saturated page just to read a simple article!

A few examples of this are:

  • computerworld.com
  • environmentalgraffiti.com
  • ew.com
  • gamesradar.com
  • instructables.com
  • itwirecom
  • maximumpc.com
  • rd.com

While Adblock Plus usually makes short work of the ads, there are also self-promoting ads on every page as well. I may be interested in these on the first page, but by the second, third and fourth pages they’re nothing but the visual equivalent of static noise.

Repagination (a Firefox add-on) stitches all of the pages together, much like taking a report and taping the pages end to end to create a large ribbon.

Add in Adblock Plus’ side kick “Element Hiding Helper” to zap the noise, and you can actually do what you set out to do – read the article!

How-to:

Requirements:

The first thing you’ll need to do is stitch the pages together:

  1. Right-click on the Next link
  2. Choose Re-pagination
  3. Choose All
  4. Wait as it loads (you should see your scroll bar shrinking and jumping up)

Then I’d recommend scrolling down to the second page, or even just the last page.

before-part-of-page-1-some-of-page-.png image by AmandaKerik

Once you’re there, you’ll want to use Adblock Plus’ Element Hiding Helper to target the areas that are not related to the article (header, footer, “you might be interested in” links, etc.)

The way I target each annoyance is:

  1. Right-click on the Adblock Plus icon and choose “Select Element to Hide”
  2. Move your mouse over the offender
    starting-selection.png image by AmandaKerik
  3. Hit W (wider) on the keyboard until it outlines an area that affects the content
    go-one-step-too-far.png image by AmandaKerik
  4. Hit N (narrow) to go back down a level
    final-target.png image by AmandaKerik
  5. Hit B (blink) to see what removing that selection would affect.
    after-first-selection-applied.png image by AmandaKerik
  6. Hit S (select) to choose that area
  7. Go into the advanced editor
    selection.png image by AmandaKerik

Here’s the tricky part… I, personally, don’t like the first page affected by the slimming process.

In the advanced editor,

  1. scroll up the tree until you’re just under the body area,
  2. choose the one that’s the ancestor of your target
    direct-ancestor.png image by AmandaKerik
  3. then find the ancestor with the SAME name on the same level.
    selection3.png image by AmandaKerik

Troubleshooting:

Every once in a while Repagination inserts a frame for the next page, which foils adblock’s selection.

The easiest solution to this is to go into Adblock Plus’ Preferences, finding the rules for the site, and replacing (as an example):

instructables.com##*#container + * + * + * + * + * + * + * + * + * + * + * + * + * + *#container > DIV#sidebar

with

instructables.com##*#container ~ *#container > DIV#sidebar
after-tilde.png image by AmandaKerik

The tilde (~) means “any sibling after”, and so this would target all of the “container”s after a “container” that are on the same level. It’s usuall shift + `, which is called a “back tick” and is in the very top left of most keyboards.