Posts Tagged ‘technology’

Share folders between two Ubuntu computers on the same LAN with NFS

Saturday, May 17th, 2008

While most things about Ubuntu work pretty much the way you want/expect the first time, one exception is sharing folders between two computers on the same LAN (”Local Area Network” — in this case, multiple computers in the same house sharing an internet connection via a router). Surprisingly, it’s easier/more intuitive to do this between an Ubuntu computer and a Windows computer! I wish Ubuntu would make a more intuitive, graphical way for non-technical users to do this — though I certainly have fun tinkering with these things and learning more about networking (or what-have-you) as I go.

Through some command-line magic, I’ve gotten my laptop to be able to access the music folder on my desktop — right now I’m playing music on my laptop that’s actually stored on my desktop’s much bigger hard drive. Sweet! How did I manage this?

Say you have two computers, both running Linux (in this case they’re both running Ubuntu and I can’t vouch that this will work on any other distro, but I suspect it would) — the server, which has the folder you want to share on its physical media, and the client, which will connect to the server and access its data.

On the client:
1. In a Terminal window, run

sudo apt-get install nfs-common

— this installs the software you’ll need.
2. Run

ifconfig

to find your IP on the local network; it should look something like

inet addr:192.168.1.101

(If you see more than one instance of “inet addr” in the output of ifconfig, choose the address that doesn’t begin with 127.)

On the server:
3. In a Terminal window, run

sudo apt-get install nfs-kernel-server

4. Edit the

/etc/hosts

file and add a line that looks like this:

neuron 192.168.1.101

where “neuron” is replaced with the hostname or a nickname for your client (in this case, “neuron” is the name of my laptop) and “192.168.1.101″ is replaced with the IP you found in step 2.
5. Test this — in a Terminal, run

ping -c 1 neuron

(or whatever name you used) and see if you get a response. If you get a response like “unknown host”, something is wrong — re-check your work from the previous steps (and check that the two computers are really on the same network!). If you get a response like “… 64 bytes from neuron… 1 packets transmitted, 1 received … ” then everything is hunky-dory so far and you are ready to move on!
6. Edit the

/etc/hosts.allow

file and add a line that looks like this:

ALL: 192.168.1.101

(again, use the IP that you found in Step 2).
7. Edit the

/etc/exports

file and add a line that looks like this:

/home/music 192.168.1.101(rw,sync,subtree_check,no_root_squash)

where again 192… is replaced with the IP from step 2, and “/home/music” is replaced with the full path to the folder you want to share. Note that for some reason it is important that the parenthesized arguments don’t have a space between them.
8. Run

sudo /etc/init.d/nfs-kernel-server restart

9. Run

ifconfig

and get the IP of your server, the same way that you found it for the client.

Back on the client!
10. Edit

/etc/hosts

and add a line like

192.168.1.103 boffin

where “192.168.1.103″ is replaced with the IP of your server (from step 9) and “boffin” is replaced with the hostname/nickname of your server (”boffin” is the name of my desktop).
11.

ping -c 1 boffin

to check that this worked, just like in Step 5.
12. Make a mountpoint for your shared directory — in my case, I used

mkdir /media/boffin-music

13. Mount the shared directory at the mountpoint, like this:

sudo mount -t nfs boffin:/home/music /media/boffin-music

replacing “boffin” with your server’s name, “/home/music” with the location on the server of your shared folder, and “/media/boffin-music” with the mountpoint you created in step 12.
14. Now you should be able to browse to the mountpoint and see your shared files, and open them, and use them. Awesome!

Gateway T-1628 and Ubuntu Linux

Wednesday, May 14th, 2008

I posted recently about buying a new laptop — how is it working out, you may wonder?

Pretty well overall. The screen has remarkable clarity, the keyboard is comfortable, and the battery life is okay; on the other hand, the speakers are the quietest and tinniest-sounding speakers of any computer I’ve ever owned/used extensively. At 14.1″ for the screen, it’s just a little bulkier than I’d like (the 12″ iBook was a perfect size; how come computers that small now seem to be a luxury item?), and I’d prefer a slot-loading drive to the tray DVD drive it has. But overall it meets my needs, for now.

Judging by a quick Google search, I’m probably one of the first people to install Linux on this particular machine. It was a little tricky to find an install disk that would boot correctly; it’s a 64-bit machine, but the Hardy 64-bit installer had a problem with xorg and the Gutsy 64-bit disk had a problem with the installer. The Gutsy x86 disk worked fine — though I had to use the partitioner to wipe the entire disk rather than creating a partition alongside the Windows partition, since this computer came with a hidden partition with a “backup” install of Windows Vista. This seems like a particularly egregious invasion of the user’s freedom to use the computer as they wish — fortunately, blanking an entire hard drive still works!

Wireless and sound didn’t work right away; I used Ndiswrapper to install the RTL8187B Realtek driver, which I was able to download from the internet. To get sound to work, I needed to install linux-backports-modules-generic, run alsamixer and turn everything to unmuted/full volume, and reboot.

I did the installation process the day before Hardy’s official release; on release day, I used the updater to install the new release, and everything that had been working before still worked fine. I still haven’t gotten around to fixing suspend/hibernate, which didn’t work out-of-box, but I’m optimistic that I’ll get it going when I have more time to tinker.

Coffee Shop Wireless

Tuesday, May 13th, 2008

As someone who works primarily on the internet, I often find myself going to coffee shops that offer wireless to get out of the house. While I wish that more coffee shops offered free wireless internet (those that do get my business more than they would otherwise!), I sometimes find myself paying for wireless internet.

This typically works as follows: while connected to that wireless access point, you can access only a handful of pages, until you create an account and pay on one of those pages. After you’ve paid, you have access to the entire internet.

Like most online services, these wireless subscriptions have an option for you to generate a new password if you’ve forgotten yours. But there’s a Catch-22 — they email you your new password, and you can’t access your email until you’ve logged in… with your new password.

You’d think they’d have realized this issue and come up with a different solution, like a secret question, to allow you to reset your password without checking your email — it’s not like this is the highest-security application on the web. Meanwhile, I’ve learned from some frustrating times and am now storing these username/password combinations in text files on my laptop.

OLPC XO (OMG LOL?)

Friday, May 9th, 2008

After my trusty iBook’s motherboard died for the last, un-practically-fixable time, I thought I might try getting an ultraportable — after all, I reasoned, I pretty much just want to use a laptop for Firefox and ssh so I can work from friends’ houses, coffee shops, heck, even my couch once in a while. I don’t want to store a lot of stuff on my laptop; it’s more important that it be easier to carry around.

So I ordered an XO (you know! for kids!), fascinated by its charitable side effects and hipness factor, and figuring — I’m a small person! I want a small laptop!

It’s too small. It’s just slightly too small to be usable in every dimension — screen, keyboard, RAM, hard drive… I know, it’s for kids with small fingers and small computing needs, and my (relatively) small fingers and (relatively) small computing needs are small relative to those of adult first-world programmers. So I wasn’t too surprised or disappointed to discover that this laptop wouldn’t work out for my purposes (or when it took months longer than initially promised to arrive — they’re a charitable organization, after all, not a business). But I still don’t understand why, especially after they realized that they could profit from first-world demand for a thing like this, the OLPC folks weren’t interested in building a slightly modified version usable by adults. I’d think that the adults in the villages where these are being distributed would be interested in exploring them too, and that the kids’ fingers will get bigger pretty quickly and outgrow the tiny keyboard.

Still, it’s a pretty cool device, with a lot of innovative features — for kids. I hope the kid who got my laptop’s sister through the G1G1 program is enjoying it and learning from it!

Sweet Gnome Feature

Wednesday, May 7th, 2008

When I first started preferring Linux to Mac OS (which was my main OS for about six years before I started using Linux), my main motivation was tweaking the desktop — I started to hate the Dock’s lack of textual information, and I discovered that I could modify the look and feel of the fluxbox window manager to my tastes far more easily than any other desktop environment I’d used. That’s why it’s kind of ironic that I’m now using the less-customizable Gnome on all my installations (though I’m far from wedded to it — anyone with window manager recommendations, or tweaking-Gnome-a-bit-beyond-the-usual tutorials, please weigh in in the comments!).

There’s a lot of ease-of-use to like about Gnome, though. One thing I’m particularly psyched about is the keyboard shortcuts menu. Not only does it make it trivial to set up the function keys (volume control, play/pause, etc.) on my laptop to do what they look like they should do, but it’s customizable for far less obvious purposes. You can essentially assign any key combo or function key to any action. I already have my most commonly-used applications — the terminal and Firefox — as ready and obvious icons on the top panel, but who wants to use the mouse to go all the way up there? I have F2 open a new terminal and F3 open a new instance of Firefox. Every one of the several times a day I hit F2 to get a new terminal window, I smile a little thinking of the several seconds I’m saving.

And then I use those seconds to refresh LiveJournal. Every productive action has an unproductive reaction, I guess?

Best Buy Employee Has Never Heard of Linux?

Tuesday, May 6th, 2008

A few weeks ago I decided to buy myself a new laptop. I did everything wrong, and I was aware of it; I didn’t research my hardware needs, I didn’t research driver compatibility, I didn’t comparison-shop on the internet, and I reneged on my promise to myself to vote with my dollars for manufacturers who offer pre-installed open systems as an option (sorry, Dell!). I just woke up knowing that after months without a functional laptop, essentially tethered to my desktop workstation, I wanted a laptop and I wanted it that day.

So I found myself at Best Buy. I asked an employee whether I could buy a computer that didn’t come with Windows or MacOS pre-installed, and predictably, he said no and seemed confused at the question. This was what I expected. But then, as I asked him to unlock a couple models so I could see how they felt, we had the following exchange:

Me: It looks like the specs on this one are a little better for the price.
Best Buy Dude: Yeah, and you’ll need that three gigs of RAM to run Vista.
Me: Oh, I’m not going to be running Vista.
BBD [startled]: Oh! Uh… you know the success rate for installing a new operating system is basically zero, right? For people trying to put XP on these?
Me: Oh, I’m not going to be running XP either. I’m going to be installing Ubuntu.
BBD: What?
Me: Ubuntu? Linux?
BBD: What’s that?
Me: It’s an operating system. You should look it up, it’s free.
BBD: So what is it, is it like, a word processor?
Me: … It’s an operating system. You should look it up!
BBD: Yeah, OK, maybe.

Yikes! I don’t expect salespeople at big box stores to be free software geeks by a long shot, but you’d think people who help people pick out computers for a living would at least have a vague grasp of what’s going on in the tech world. Or at least, you know, know what an operating system is.

Google Reader (alternatives?)

Friday, May 2nd, 2008

So, I don’t actually use an RSS reader to read anything (though for years I keep saying that I’ll start subscribing to the sites I read — I always eventually conclude that it would cramp my procrastination style, which is heavily dependent on “oh yeah I forgot about this site! let me read two months of its archives now”). But, I’ve recently discovered Google Reader’s cool property — my friends (and of COURSE Google knows who my friends are — through GChat) “share” things on GReader, and I can easily view a list of things they’ve shared recently/since I last looked. Neat! A casual way for friends to point each other at websites, without the commitment of email or blogging!

Except it quickly becomes clear that this isn’t exactly what it is. A few days ago, I wanted to share a page I’d seen with friends, but because it’s not part of a feed I couldn’t share it through GReader — I had to either post it on a blog or LJ, or email it (which is what I did, but that required a more deliberate recipient selection than I’d been going for). Today, I was skimming things my friends had shared on GReader, and I found myself wanting to comment to the people who had shared things, about the fact that that person had shared that item. But there’s no way to do that. OK, I could send an email about that, too — but I thought the whole point of this Web 2.0 business was to facilitate this type of casual communication that’s not just on but also about the internet. Everything has comment functionality! Everything has “share this webpage” functionality!

So… if anyone has any ideas how I might hack GReader to work this way, or any other services I might try that are more like what I’m going for, you can let me know… in a comment on this blog post.

"Girlfriend Linux"

Wednesday, April 30th, 2008

So with the release of Hardy Heron, an Ubuntu-using blogger puts the new system to the “girlfriend test” — he gives his Windows-familiar but Ubuntu-n00b girlfriend a list of tasks to accomplish, and watches her try to accomplish them (she’s able to do most, but not all, of the tasks without any instruction).

This blog post has gotten a lot of attention in just a few days, and with good reason — it touches on a lot of hot-button issues regarding Linux and Ubuntu. The blogger says, “Linux won’t truly be ready for the desktop until someone computer illiterate can sit down at a the computer and with little effort do what they want to do” — and he considers his intelligent, tech-savvy girlfriend’s failure at a few of the tasks to be a sign that this isn’t the case. This is a problematic assessment — many of the tasks he chose are the kinds of things only power users even think to do (Photoshop a picture, download a torrent). A truly computer-illiterate user or even an ordinary non-power-user would be interested in much more basic tasks — e.g. I installed Ubuntu on my mom’s laptop a few months ago (hi, Mom!), and she hasn’t had to ask me for tech support, presumably because she only uses her computer for a handful of things and those things are easy to do.

That said, this type of test is definitely a useful way to see what aspects of the interface are more and less user-friendly; for example, installing Flash, which is one of the first few things I do on any new installation, is completely non-obvious and requires command-line usage — not a good idea for something many non-savvy users will want to do right away.

Of course, there’s always going to be the double-standard folks who will use any non-user-friendly aspect of a Linux distro as an example of how “Linux is too hard”, while ignoring any program that’s buggy, interface that’s confusing, or task that requires the command line on another OS. Their counterparts are the “Linux isn’t Windows!!!” people (”Linux isn’t Windows, so don’t expect someone used to Windows to be able to use it easily”) — I agree, Linux isn’t and shouldn’t be a clone of Windows, but if you want Windows users to switch to Linux, you should care about making Linux easy to use for people used to Windows, just like if you want new computer users to be able to start out on Linux you should care about making it easy to use for people who haven’t used a computer before. Fortunately we’ve seen a lot of progress in these areas in the past few years, and I’m confident that Linux developers will continue to produce distros that are easier and easier for all levels of users.

Oh, and for the “Linux users don’t have girlfriends”(/”girls don’t use Linux”/”there are no girls on the internet”) people? Get over yourselves. It’s not funny, it’s not original, and it’s not true… in fact, I happen to live with a Linux user who not only has a girlfriend but had her install Flash for him :).

Ubuntu Installations

Thursday, February 21st, 2008

Yesterday I installed Gutsy Gibbon on my boyfriend’s Dell laptop (the Inspiron 9200). I continue to be amazed at how smoothly Ubuntu installations run; wireless (!!!) and printing worked out of the box. The one weird glitch is that at bootup, after the phrase “Starting up…” appears, the load hangs with a blank screen — until you press Ctl-Alt-F2. No idea why, but I’ll keep tinkering.

I also recently switched from Gentoo to Ubuntu on my main desktop workstation, after using Gentoo as my primary operating system for about a year. I picked Gentoo (with fluxbox!) initially because I wanted to start from scratch, know everything on my system, and gain the knowledge and experience that would come from compiling and installing everything myself. And I did — but now I’m ready for a setup where, when I plug in my digital camera, I’m prompted to download pictures instead of digging around in /dev/ looking for the device. I know that if I want to install/uninstall/tweak/configure anything, I have the freedom to do so — the freedom of the GPL!
When I initially put the Ubuntu live disk into my desktop, I was booted into busybox (initramfs) rather than the Ubuntu desktop; the fix was to press F6 at the boot menu and edit the boot parameters (if I recall correctly, add ‘all_generic_ide’ before the ‘–’). After that, everything installed smoothly — I was able to put the existing contents of my hard drive in a new partition, which is now my dedicated /home partition.

This is my third recent Ubuntu installation — at Christmas I installed it on my mom’s Dell Vostro (dual-booting with XP — I love that the installation disk makes it easy to keep your Windows installation as-is). That needed some configuration for the wireless card, but other than that everything was simple to get set up.

Since last year’s Feisty (which I installed on my (now-defunct) iBook, after dual-booting Edgy and OSX) I’ve been totally psyched about Ubuntu; its out-of-the-box settings and programs, for ease of use, sane defaults, configurability, etc top any proprietary system I’ve used. Hardware support isn’t consistent enough for the non-technical user to be able to install it on their own; but non-technical users rarely install their own systems, proprietary or free. Once it’s set up, the modern Ubuntu distribution strikes the perfect balance of ease-of-use and workability (as good as or better than Windows or OSX) and configurability (potentially infinite, as with any GPL’d product!), perfect for any level of user.

Web-Based Business Tools

Thursday, October 18th, 2007

I have an article about web-based business tools up at ThisMobileLife — check it out!