Archive: Linux

Page 1 of 7 1 2 3 4 5 6 7

December 1, 2008

Reware - hack your old PDA

The problem with bleeding edge devices is that they quickly become old and irrelevant. Replaced with the latest gizmo, old smart phones and PDAs tend to find their way to a drawer or a landfill after about 2 or 3 years.

It's not that most of us want a throwaway society. It's that most of the gadgets we buy are designed to expire, with hardware that cannot be user serviced, batteries that cannot be easily replaced, and with firmware and software stacks that cannot be modified to accommodate the future. Proprietary. Closed. User subjugating. Stupid.

One half of the solution is to choose open hardware and open source whenever you have the choice. The other part of the solution is to hack your closed devices to do your bidding. Thankfully, there are a lot of people working hard to make the latter possible, and you can run Free Software on everything from Palms to iPhones.

We caught this note from Hans-Christoph Steiner on the dorkbot nyc mailng list. He's currently working on a project called Reware, which is attempting to bring a common hacker-friendly Linux distro to a variety of PDAs:

We've been working at Eyebeam since July on making it easy to hack old devices and run new software on them. We now have our first Reware HOWTO video, showing the basics of how to use a Reware image yourself, then it illustrates some of the Pd patches we've made.


Coming soon, a image for running Pd, Python, and Lua programs on PDAs, as well as a HOWTO for making Pd patches for 1-5G iPods. The key idea is to turn old PDAs, mobile phones, etc. into something like an Arduino, where you can easily upload your own code to the device.

Currently Reware supports several Palm devices, but with iPods on the radar and a number of Pocket PCs that can run Linux, there's a lot of potential here. Just think about all those 200-400MHz ARM processors just waiting for something interesting to do.

Reware Wiki - tools to recycle old devices
Reware First Release
Ångström - Linux for devices, including many Palm, Nokia, HTC, and iPaqs
iPod Linux

Posted by Jason Striegel | Dec 1, 2008 11:00 PM
Linux, PDAs, iPod | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

November 28, 2008

iPhone Linux

The iPhone dev team, hard at work as usual, announced a successful iPhone Linux port today. It's still at a very early stage, but the kernel boots on first and second generation iPhones and the first generation iPod touch. A framebuffer driver and a working Busybox installation point to an exciting open source future:

What we have:


- Framebuffer driver
- Serial driver
- Serial over USB driver
- Interrupts, MMU, clock, etc.

What we have in openiboot (but hasn't been ported yet):

- Read-only support for the NAND

What we don't have (yet!):

- Write support for the NAND
- Wireless networking
- Touchscreen
- Sound
- Accelerometer
- Baseband support

If you're a Linux hacker and want to pitch in with the porting process, hop on the #iphonelinux IRC channel at irc.osx86.hu.

iPhone Linux - Official Announcement

It's just a demo at this point, but if you can't wait to see this running on your own phone, here's what you need:
Installation Instructions
iphonelinux-demo.tar.gz

Posted by Jason Striegel | Nov 28, 2008 07:36 PM
Linux, iPhone | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

November 27, 2008

Build a Skype server and replace your land line

skypeserver_20081127.jpg

With some of my family overseas, Skype and iChat have become important tools for voice communication, second only to the cell phone and face to face protocol. It occurred to me that outside of telemarketers and the very occasional late-night pizza dial, the land line has become a relatively unused service. Unused, yet a consistent and not insubstantial monthly bill.

With thoughts of finally ditching the land line, but still a bit resistant to going completely phoneless in the home (what about when my cell battery dies?), I came across an article in Linux Journal by Andrew Sheppard, author of Skype Hacks, that shows you how to reconfigure your home telephone system to be completely routed through a server running Skype and Linux.

My solution was to build a Skype server that provides 24/7 phone service with the minimum of hassle and fuss. By dumping your regular phone company and taking back control of your home phone wiring using a Skype server, you will have not only a phone system with nearly the same capabilities as before--indeed, in some ways better--you will also save a bundle of money! In my case, I save a little less than $700 US each year (this year, next year, and the year after that, and so on), or about 82% off of my old phone bill.


Using a Skype server plugged in to the existing copper phone wiring of your home means that you can lift a receiver anywhere in your home, at any time, and get a regular dial tone. Incoming calls either from Skype users or regular phones ring all handsets throughout your home. Basically, you can make Skype behave like a regular phone line, but at a tiny fraction of the cost.

There are some big benefits to switching to a Skype server. It's likely a lot cheaper and if you're a regular Skype user, you can now use the service with any handset in the house instead of sitting at your computer.

There are also some downsides. The phone system still remains one of the most reliable services. It's more likely that I'll lose electricity than I won't have a dial tone, which may be of some concern for fire and bugler alarm systems. You also wouldn't have 911 service in this scenario, but if you have a cell phone anyway, this may be a moot point.

What are the rest of you hackers doing for phone service these days? Is it time to give up the land line entirely, simulate it with a Skype server or VoIP service, or are you still happily rocking the POTS? Give us a shout in the comments.

Build a Skype Server for Your Home Phone System
Andrew Sheppard's Skype Hacks - Tips & Tools for Cheap, Fun, Innovative Phone Service

Posted by Jason Striegel | Nov 27, 2008 08:28 PM
Home, Linux, Skype, VoIP | Permalink | Comments (2) | TrackBack | Digg It | Tag w/del.icio.us

November 26, 2008

Iron Man suit powered by BeagleBoard and Arduino

The BeagleBoard is an incredibly little embedded system. It's Linux-powered, easy to hack, and has lots of connectors; everything from an expansion port with GPIO/I2C/SPI on up to HDMI. Pair it up with Arduino (don't miss our great Arduino gift guide), and you're unstoppable.

Enrique wrote in to tell us about the amazing BeagleBoard-powered project he made for his son:


For Halloween, my son wanted to be Iron Man. In about 2 months time, I integrated various gadgets into a store-bought costume. The most powerful components were BeagleBoard and Arduino. If I had more time, I would have added an overhead display in mask, a webcam for night vision, a 3G modem connected to BeagleBoard and maybe more. ;)

The suit is really tricked out:

  • Repulsor Air - Blows air with CO2 air pump on hip and hose back to his hand.
  • Repulsor Missile - Using CO2 air pump can also launch a paper missile.
  • Repulsor Sensor/Light - A magnetic switch sensor lights his repulsor hand light and fades out and in his glowing eyes. Arduino handles this effect.
  • Repulsor Sound Effect(s) - Originally not working. Worked around problem by using right-mouse, middle-mouse button and configured Elightenment17 to playback sound effects using Mplayer script. Mouse buttons activated by Arduino Digital output triggered by sensors.
  • Arc Reactor - A LED night light from Costco embedded in his chest.
  • BeagleBoard: Powerful Computer - With BeagleBoard already running in JARVUS box on my son's back need to add other features. Possibilities: Web cam, mobile router with hotspot and a head-mounted display, VoIP, streaming video of Iron Man view.
  • Arduino: Super Input/Output Board - Handles repulsor effects but can add other sensors to enable even cooler special effects!!

LinuxNerd: My son in an Iron Man Suit!

Posted by Brian Jepson | Nov 26, 2008 07:00 AM
Linux, arduino | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

November 24, 2008

Tree command for Mac/Linux

tree_20081124.jpg

Murphy Mac sent us a link to a handy find/sed command that simulates the DOS tree command that you might be missing on your Mac or Linux box.

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

You can see the result in the image above. Like most things I've seen sed do, it does quite a bit in a single line of code and is completely impossible to read. Sure it's just a couple of substitutions, but like a jack in the box, it remains a surprise every time I run it.

Tree Command for Mac

Posted by Jason Striegel | Nov 24, 2008 10:47 PM
Linux, Mac | Permalink | Comments (4) | TrackBack | Digg It | Tag w/del.icio.us

November 14, 2008

Linux Tip: super-fast network file copy

If you've ever had to move a huge directory containing many files from one server to another, you may have encountered a situation where the copy rate was significantly less that what you'd expect your network could support. Rsync does a fantastic job of quickly syncing two relatively similar directory structures, but the initial clone can take quite a while, especially as the file count increases.

The problem is that there is a certain amount of per-file overhead when using scp or rsync to copy files from one machine to the other. This is not a problem under most circumstances, but if you are attempting to duplicate tens of thousands of files (think, server or database backup), this per-file overhead can really add up. The solution is to copy the files over in a single stream, which normally means tarring them up on one server, copying the tarball, then untarring on the destination. Unless you are under 50% disk utilization on the source server, this could cause you to run out of space.

Brett Jones has an alternative solution, which uses the handy netcat utility:

After clearing up 10 GBs of log files, we were left with hundreds of thousands of small files that were going to slow us down. We couldn't tarball the file because of a lack of space on the source server. I started searching around and found this nifty tip that takes our encryption and streams all the files as one large file:


This requires netcat on both servers.

Destination box: nc -l -p 2342 | tar -C /target/dir -xzf -
Source box: tar -cz /source/dir | nc Target_Box 2342

This causes the source machine to tar the files up and send them over the netcat pipe, where they are extracted on the destination machine, all with no per-file negotiation or unnecessary disk space used. It's also faster than the usual scp or rsync over scp because there is no encryption overhead. If you are on a local protected network, this will perform much better, even for large single-file copies.

If you are on an unprotected network, however, you may still want your data encrypted in transit. You can perform about the same task over ssh:

Run this on the destination machine:
cd /path/to/extract/to/
ssh user@source.server 'tar -cz -C /source/path/ *' | tar -zxv

This command will issue the tar command across the network on the source machine, causing tar's stdout to be sent back over the network. This is then piped to stdin on the destination machine and the files magically appear in the directory you are currently in.

The ssh route is a little slower than using netcat, due to the encryption overhead, but it's still way faster than scping the files individually. It also has the added advantage of potentially being compatible with Windows servers, provided you have a few of the unix tools like ssh and tar installed on your Windows server (using the cygwin linked binaries that are available).

Fast File Copy - Linux!

Posted by Jason Striegel | Nov 14, 2008 08:40 PM
Linux, Linux Server | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

November 10, 2008

Installing Debian alongside Android on the G1

debianandroid_20081110.jpg

Now that you can run commands as root on the Google phone, you may have been thinking about what else you can do with the device. You know, besides the usual talking, texting, and surfing while driving.

The device is Linux based, sure, but the installed software is relatively spartan and there isn't too much internal space to get dangerous. Thankfully, Jay Freeman wrote a nice guide for installing a more complete Linux distribution on the device, right alongside Android.

The main thing I've so far seen on this matter have been a few attempts to get busybox on there. I, however, think we can go a lot further: following the instructions in this article will end you up with a full distribution of Debian, one of the most highly respected Linux distributions, and the ability to install almost anything you want.


To do this, we need to think through a few of the details of getting this sort of thing running on the G1. The first question: where do we put it? The device has some internal flash, but it isn't really enough: only 128MB to share with the OS and other applications.

We therefore turn our attention to the much more reasonably sized microSD card, a format which lets us get up to 16GB of space.

Debian & Android Together on G1

Posted by Jason Striegel | Nov 10, 2008 08:18 PM
Linux, Mobile Phones | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

November 9, 2008

SlugPower - Linux controlled power switch

linuxpower_20081110.jpg

Phil Endecott has done a bit of hacking with the Linksys NSLU2 "Slug", the low-power network storage device which runs Linux under the hood. His SlugPower project is a switched outlet that can be controlled from the Slug. This enables his print server to power up the printer when it needs to be printing, and automatically cut power to the device when it's not in use.

This page describes the hardware and software design of a printer power switch controlled over USB from my Linksys NSLU2, aka Slug. The unit can, however, be controlled from any Linux box, and can switch anything, not just printers.

My NSLU2 acts mostly as a file and print server. I can go for weeks without printing anything, so I want to keep the printer switched off when I'm not using it (it takes about 4W while idle, which must be more than 99% of its total energy consumption). But it's upstairs, and I don't want to have to go up and down stairs once to switch it on and again to collect my printing. So I decided to get a power switch.

Remote power switches are pretty common in server rooms, but they are costly. This is a pretty affordable way to control the power to any device from anywhere in the world.

SlugPower - A Slug-Controlled Power Switch
Phil Endecott's Slug Projects
NSLU2-Linux

Posted by Jason Striegel | Nov 9, 2008 10:13 PM
Electronics, Energy, Linux, Linux Server, Smart Home | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

October 14, 2008

Linuxstamp embedded Linux system

linuxstamp_20081014.jpg

If the Beagle Board caught your eye, here's another embedded Linux platform that's worth taking a peek at. The Linuxstamp is an ARM powered, ultra-tiny, open hardware Linux system that has a bunch of low-power goodies packed into what appears to be a 3 inch by 4.5 inch footprint.

Compared the the Beagle Board, the Linuxstamp has a bit less processor muscle and lacks video output. To its advantage, it has on-board 10/100 Ethernet, and (I presume) it has lower power requirements, making it a better fit for some embedded needs. Both projects are near the same price point (Linuxstamp: $120, Beagle Board: $150), so you'll be able to make decisions mostly on feature-set when choosing the platform for your next project.

Linuxstamp Project Wiki at Open Circuits [via ladyada]
The Linuxstamp Store

Posted by Jason Striegel | Oct 14, 2008 09:23 PM
Electronics, Hardware, Linux | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

October 10, 2008

Speaking UNIX: !$#@*%

Mac OS X Terminal
IBM developerWorks has an article that goes over many of the symbols you'll encounter at a Unix/Linux/Mac OS X/Cygwin command line:

You've learned a few of the basic commands to help you maneuver through a directory structure, create and modify files, see what processes are running, and maybe even administer users and the system. That's great, but you want to understand what the UNIX® administrators next to you are typing. It looks like a lot of commands interspersed with strange symbols. Learn what |, >, >>, <, <<, [[ and ]], and many more symbols mean in UNIX and Linux® as well as how to get the most out of operators such as &&, ||, <, <=, and !=.

Speaking UNIX: !$#@*%: Learn even more command-line tricks and operators [via LinuxDevices.com]

Posted by Brian Jepson | Oct 10, 2008 04:00 PM
Linux, Mac | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

September 22, 2008

Plotting streaming data in real-time with Gnuplot

gnuplot_20080922.gif

Our friend Thanassis Tsiodras, who you may remember as the creator of the offline Wikipedia reader, wrote in to tell us about a handy way to plot real-time data using standard unix tools.

For the last couple of years, I've been working on European Space Agency (ESA) projects - writing rather complex code generators. In the ESA project I am currently working on, I am also the technical lead; and I recently faced the need to provide real-time plotting of streaming data. Being a firm believer in open-source, after a little Googling I found Gnuplot; and quickly hacked a Perl script that spawns instances of Gnuplot and plots streaming data in real-time. Googling doesn't reveal anything similar, so I published it here.

You can easily pipe any data stream into his druveGnuPlots.pl script, choose the zoom and y-range and it will take care of reading in the data and passing it to Gnuplot with your specifications. This is pretty neat, since it means you can easily plot just about anything and all you need to do is get your measurements into a newline-delimited output format.

Visualize real-time data streams with Gnuplot

Posted by Jason Striegel | Sep 22, 2008 08:26 PM
Linux, Science | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

September 10, 2008

HOWTO - make a serial port IR receiver

irreceiver_20080910.jpg

Alessio Sangalli has been maintaining a guide for a few years that shows you how to create a serial port IR receiver from scratch and use it in both Windows and Linux. Her design is pretty slick since, as you can see from her photo above, the whole package fits neatly inside a standard 9 pin serial connector. There are still plenty of machines that don't have built-in IR support, so this could be handy if you're thinking of turning an old box into a media player or DVR.

How To Build A Simple But Cool IR (Infra Red) Receiver

Posted by Jason Striegel | Sep 10, 2008 09:58 PM
Electronics, Home Theater, Linux, Windows | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

September 8, 2008

Run Google Chrome in Linux with Wine

chrome_linux_20080908.jpg

If you're waiting impatiently for the native Linux release of Chrome, check out the instructions by Romeo Adrian Cioaba, who was able to get Chrome running on his Ubuntu box using Wine. The latest Wine release (1.1.4) contains a fix that corrects some rendering problems with the application, so make sure to upgrade first.

Most of the application is functional, except for HTTPS support. Unfortunately, according to the Wine wiki, this is because SSL support has only been stubbed in at this point. I can't say for sure if it'd work, but you could try copying the native Windows secur32.dll and crypt32.dll files into your Wine installation (assuming you can get your hands on them). There's a chance that there might be a few other incomplete libraries that you'll run into along this path, but if you get it to work, let us know.

Install Google Chrome on Linux using wine [via Lifehacker]

Posted by Jason Striegel | Sep 8, 2008 08:43 PM
Google, Linux, Linux Desktop, Ubuntu | Permalink | Comments (1) | TrackBack | Digg It | Tag w/del.icio.us

September 3, 2008

HOWTO - reset a lost Ubuntu password

I loaded one of my test Ubuntu virtual machines today (one that I hadn't used for a month) and, surprise, I had forgotten the password. This sort of thing happens from time to time, and if you're new to Linux, it can be a little disconcerting.

Losing your root password isn't the end of the world, though. You'll just need to reboot into single user mode to reset it. Here's how to do it on a typical Ubuntu machine with the GRUB bootloader:

Boot Linux into single-user mode

  1. Reboot the machine.
  2. Press the ESC key while GRUB is loading to enter the menu.
  3. If there is a 'recovery mode' option, select it and press 'b' to boot into single user mode.
  4. Otherwise, the default boot configuration should be selected. Press 'e' to edit it.
  5. Highlight the line that begins with 'kernel'. Press 'e' again to edit this line.
  6. At the end of the line, add an additional parameter: 'single'. Hit return to make the change and press 'b' to boot.

Change the admin password
The system should load into single user mode and you'll be left at the command line automatically logged in as root. Type 'passwd' to change the root password or 'passwd someuser' to change the password for your "someuser" admin account.

Reboot
Once your done, give the three finger salute, or enter 'reboot' to restart into your machine's normal configuration.

That's all there is to it. Now just make sure to write your password down on a post-it and shove it somewhere safe like under your keyboard. :)

Posted by Jason Striegel | Sep 3, 2008 10:37 PM
Linux, Ubuntu | Permalink | Comments (16) | TrackBack | Digg It | Tag w/del.icio.us

August 27, 2008

Multitouch touch-pad support for Linux laptops

The Synaptics TouchPad device is a common input device for many laptop brands, including models made by Acer, Toshiba, and IBM. Normally, the touchpad is used for single-finger mouse input, but the Synaptics device has rudimentary support for tracking multiple fingers at the same time. Nathan Harrington wrote an article for IBM that shows you how to make use of this to add instant multitouch gesture support to your X applications.

A small perl script uses the synclient command to listen to the touchpad and then send a message to the active window.

Using syclient output for monitoring the TouchPad state is a simple and effective way for adding further interface options to Linux applications. The gestureListener.pl program introduced below opens a pipe to read from the synclient program and processes the TouchPad events to detect gestures. These gestures are linked with keyboard commands sent to the current in-focus application in X Window System.

It's tricky, because you don't get a discrete x and y location for each finger. Instead, synclient gives you an average of the inputs, and a count of the number of inputs. It makes detecting a pinch gesture difficult, but Nathan noticed that two fingers at the corners of the pad average to a stable location, while the average location of two fingers near each other tends to wiggle. Using this, he was able to hack together semi-reliable pinch and open-pinch gestures.

With the script installed, you can open any X application and swipe three fingers to the left or right to trigger a left or right keypress. The pinch and open-pinch gestures will trigger a + or - to be sent to the application.

Add multitouch gesture support to a TouchPad-equipped laptop

Posted by Jason Striegel | Aug 27, 2008 06:51 PM
Linux, Linux Desktop | Permalink | Comments (0) | TrackBack | Digg It | Tag w/del.icio.us

Page 1 of 7 1 2 3 4 5 6 7

Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks