Atheros AR8131 and Linux

Date May 26, 2010 at 02:25 PM | Computers & Technology, Hardware, Linux

A while back I picked up an ECS 945GCD-M motherboard to replace my dead VIA board that was running my RAID server. The board is pretty nice, sitting there completely silent, running 64-bit Ubuntu and packing far more power than the board it was replacing. But it has one glaring problem; the network card on the thing didn’t work out of the box in Linux. I had been running a cheap USB network card I had laying around, but it was slow and I hated that I couldn’t get it working. So, I set out to make the onboard Atheros AR8131M chipset work.

Google will give you a plethora of guides for compiling the drivers (this one is probably the best), but I just couldn’t get things to load. It was also never clear what version of the drivers I should be trying to run. Most tutorials made reference to 1.0.0.9, some to 1.0.0.10, but the current version (at the time of this writing) is 1.0.1.9. In the end, though, that’s the version I did manage to get working. Here’s how I did it:
Read Read more…

Comment No Comments

Tweaking Gnome for Low-Resolution Displays

Date May 13, 2010 at 12:23 PM | Computers & Technology, Linux, Open Source, Usability

I’m a fan of Ubuntu, and I’m kind of lazy about setting up my desktop, which means I’m using Gnome as my window manager. Over the years I’ve grown to like it… it’s not perfect, but it’s livable and works pretty well. One of the problems I’ve always had with it, though, is all of the window elements in it are huge. This makes it look kind of childish and eats up a lot of screen real estate on the 1280×800 display on my desktop. I couldn’t even imaging running it on a lower resolution!

I was discussing this with my friend Jason and he recommended playing with the font sizes. Sure enough, that did the trick! It seems that the reason everything is so big is that the default font sizes are 10pt. I shrank them down and MAN does it look nice now!

You can edit these values one ways; via gconf-editor or via gconftool-2 on the command line. I won’t post the gconf-editor direction since, if you know your way around it, you can extrapolate the parts you want to edit via the gconftool-2 commands. The following settings worked extremely well for me, but you can adjust the font faces and sizes as you see fit.

gconftool-2 --type string --set /apps/metacity/general/titlebar_font "Sans Bold 8"
gconftool-2 --type string --set /desktop/gnome/interface/font_name "Sans 9"
gconftool-2 --type string --set /desktop/gnome/interface/monospace_font_name "Monospace 9"

This will adjust the title bar, all normal window text and all monospace text, respectively. Again, these numbers looked the best to me, but you can make them even smaller (or bigger) to fit your needs. I did these adjustments on my 1680×1050 display as well, and it looks amazing. Then again, I love small text!
Read Read more…

Comment No Comments

Serving Files in Internet Explorer over HTTPS

Date May 11, 2010 at 04:34 PM | Computers & Technology, PHP, Software, Web Development

I recently came across a problem where serving a file to Internet Explorer would result in the following error message.

This affected IE6, IE7 and IE8 in my testing. The way I was serving the file was through PHP via readfile. Before sending the contents of the file, I was, of course, setting some header parameters so that the browser would handle the file and the user wouldn’t just see some binary garbage on their screen. In my case, I was serving a PDF file that was being generated server-side and sent to the client. The basic header parameters are as follows:

// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called your_file.pdf
header('Content-Disposition: attachment; filename="your_file.pdf"');
// declare Files Size here (for the sake pf peoples sanity, please add this
header('Content-Length: '.filesize($filename));

This works just fine in most situations, but once you introduce a secure connection, IE fails with the above error. Of course, like most IE problems, this doesn’t happen in any other browser. Ugh.
Read Read more…

Comment No Comments

Samsung X360 Backlight Control with Ubuntu

Date Mar 30, 2010 at 01:06 PM | Computers & Technology, Hardware, Linux, Open Source, Software

I recently send my Samsung X360 laptop to the shop. The bearing on the fan had gone bad so I sent it in for warranty replacement. Before I sent it, I thought I would wipe out all my data since a lot of it was work-related and I didn’t need that information getting out, plus I didn’t want to confuse the poor tech with Linux.

When I got it back, I immediately installed Ubuntu’s most current version, 9.10 (Karmic Koala). I was really impressed with it; even more-so than with 9.04 in fact. But I ran in to a problem when I was setting it all up; I couldn’t get the backlight adjustment to work.
Read Read more…

Comment No Comments

Living with PulseAudio via PulseAudio Device Chooser

Date Jan 06, 2010 at 10:30 AM | Computers & Technology, Hardware, Linux, Open Source, Software, Usability

Telecommuting is a pretty sweet gig with a good number of benefits. To name a few, while I’m working I can:

  • Toss some laundry in the machine
  • Start my lunch and work while it cooks
  • Sign for packages when they are delivered

And that’s just the tip of the iceberg. However, to make telecommuting possible, there are some technologies I simply MST have working. VPN is a big one, so I can get at the computers back in the office. SSH and FTP access is important to manage servers and files. And of course, I need to communicate with people; for that, we use AIM and Skype. Up until recently, it’s been enough for me to use my Nokia N800 to make my calls back to the office. It’s no good for chatting with video though, so I needed to set it up on my desktop with my camera and, preferably, my headset.

Simple enough task really; both my Logitech webcam and Plantronics headset work out of the box with Ubuntu (at least in 9.04) with nearly zero configuration required. I just plug them in, tweak Skype quickly and I’m up and running. However, with the addition of PulseAudio in the more recent version of Ubuntu, this became a little trickier.
Read Read more…

Comment No Comments

Asynchronous PHP

Date Oct 16, 2009 at 01:46 PM | PHP, Software, Web Development

I needed to “asynchronous PHP” recently and it took me a little while to find the solution. What my script basically does is generate a PDF file for the user to download based on some parameters they have chosen. The problem was, the PDF generate take a while and during that time I needed to show the user a screen explaining that the file was being generated, which would also show the download link once the generation was complete. My setup is as follows:

generate.php

This script is where the user is sent when they click “download” on the parameter choice page. This is where the asynchronous magic has to happen. From here, the user is immediately sent to download.php.

download.php

This script gives the user either a “please wait” message of a “click here to download” message, depending on where the target PDF has been generated yet.

My problem was, even though was added the header redirect code (shown below) to generate.php, the browser would still wait for the PDF to be generated before sending the user to download.php. In other words, it was only synchronous PHP, which didn’t help me at all.

header("Location: download.php");

Thanks to this comment on php.net, I was able to make it work! Basically, you need to tell the browser that you are done sending it data, even though the PHP script will keep executing. Code below:

//redirects the browser to the new url, but continues processing in the background
function redirect_and_continue($sURL) {
header( "Location: ".$sURL );
ob_end_clean();
header("Connection: close");
ignore_user_abort();
ob_start();
header("Content-Length: 0");
ob_end_flush();
flush();
session_write_close();
}

So, the user is sent to generate.php, which immediately calls redirect_and_continue(‘download.php’), redirecting the user to download.php while still continuing to execute generate.php (and make the PDF file). Once the user is at download.php, the script checks for the existence of the generated PDF file (as indicated by the filename sent through the session) and uses a meta refresh tag in the HTML to keep reloading download.php. Once the PDF file exists, it provides the user with a link to the PDF file for download.

Comment No Comments

PPTP VPN Routing in Ubuntu using Network Manager

Date Oct 01, 2009 at 12:19 PM | Site News

Back when I was still on Ubuntu 8.10 (Intrepid), I had near endless problems with PPTP VPN access using the network manager. I wasn’t alone, and I guess I was pretty fortunate that it worked at all. My problem with it was that routes never worked correctly so ALL of my traffic was routed through the VPN. To be honest, they DID work, but the connection ALWAYS dropped off after a minute, sometimes less, so it was hardly usable. This was exceptionally annoying since everything worked just fine in 8.04 (Hardy)!

Thankfully in 9.04 (Jaunty), things seem to be working again. In fact, as I type this, my traffic is being sent from my local connection, even though I’m connected to the VPN at work. Since this still seems to be a big problem for many people, I thought I would post what worked for me. Read Read more…

Comment 1 Comment

Go Vote for My Will Code For Green Project

Date Jul 29, 2009 at 09:48 PM | Site News

So, I entered the Will Code for Green contest last week at Jason’s recommendation. It was pretty clear that if we could come up with some ideas, we stood a real chance of winning the contest.

That’s where you, my trusty reader, come in. 20% of the scoring for the projects is based on the voting public… that’s you! So, go vote for my project, “Green Rhino,” by following these steps:

  1. Visit http://willcodeforgreen.gnomedex.com
  2. Provide your email address and click “Submit”
  3. On the resulting page, fill out your information (name, email,
    birthday, address) and the numbers and letters you see at the bottom
  4. Once you successfully register, click “Go To Gallery” on the resulting page
  5. Look for the “Green Rhino…” box. If you don’t see it, click the
    right arrow at the bottom to go to the next page. Continue browsing
    the pages until you find it, then click on it.
  6. You will see a new dialog window explaining what Green Rhino is.
    Click on the URL to see it in action if you like. More importantly, at
    the top of the new box, click “Vote for This Entry”
  7. You will be asked to confirm that you want to vote for the entry.
    Click “Vote for This Entry” again

While you are there, you should consider voting for Jason’s project “Eeko” too. It is, after all, my idea, he just ran with it. If you do take the time to vote, hit me up in the comments or on twitter and let me know what you thought. Thanks!

Comment No Comments

Ubuntu 64-bit and Adobe Air

Date Jun 14, 2009 at 06:28 PM | Site News

UPDATE 2009-10-01: I’ve just gotten Air running on my Ubuntu 9.04 (Jaunty) install. Apparently Adobe updated their installation instructions to include all the required steps now. Good for them! So, this post isn’t really useful anymore, but I’ll keep it around anyway, just in case.

There I was, running 64-bit Ubunutu and trying to get Adobe AIR to install. The problem is, AIR is written for 32-bit systems, so it needs some extra help installing on 64-bit Ubuntu. I managed to get it running, with a little help from Adobe’s site and grabbing getlibs here (their link was broken), everything looked good. That was, until I tried to install an AIR application.
Read Read more…

Comment 2 Comments

Ubuntu 64-bit, Firefox and Flash

Date Apr 23, 2009 at 04:17 PM | Computers & Technology, Linux, Software

OK, so you have this sweet new computer (much like myself) running 64-bit Ubuntu like a champ. Except for one thing; Flash elements on webpages in keep flaking out. That is, from time to time, instead of seeing the Flash content, you see a grey box that doesn’t do anything. It just sits there, mocking you, until you close and re-open either the tab, or in most cases, the browser itself.

I had this happen in both Firefox and Opera. As it turns out, the problem is related to the machine running a 32-bit version of flash with a 64-bit version of the browser. There are 2 ways to fix this: run a 32-bit browser or run 64-bit flash. But, why would you run a 32-bit browser on your sweet 64-bit machine? Well, because there isn’t a 64-bit version of flash… or at least, there wasn’t until recently.

I was tired of this problem so I hit Google and looked for a solution. Sure enough, I found one! Now, I will warn you that the 64-bit Flash is still in Alpha, but i’ve been running it for a few weeks now without any problems. Here’s how you can too.
Read Read more…

Comment No Comments