Since the adoption of Kernel 2.6, Linux has used the udev system to handle devices such as USB connected peripherals. If you want to change the behavior when you plug something into a USB port, this section is for you. As an example, we will use a USB thumb drive but these methods should translate to any device handled by udev. As a goal for this exercise we decided to create a symlink and execute a script when a specific thumb drive was loaded. The operating system we used for this exercise is Ubuntu 9.04 Jaunty Jackalope. Continue reading “How To Write Udev Rules”
linux670 Articles
Linux (via ILoader) Out For Nano 2G

[Linux4Nano] over at the [Gna! repositories] have just finalized a breakthrough for their bootloaderproject. Because the iPod Nano 2G has a hardware encryption chip, it could previously not be flashed with a custom firmware. By digging around in some assembly code (and working their magic) the team was able to get Linux onto the 2G, develop drivers for its peripherals (screen, clickwheel and serial interface are a few), and put all of that code into a package convenient to install by the end user. If you’ve ever considered installing uClinux (the ported distro) on your Nano, the [Linux4Nano] team have made the iLoader an easy place to start.
Update: Closer inspection yields that the iLoader is not yet able to load uClinux onto a 2G because it has not been ported. However, it can reload it with other custom firmware which is still a solid breakthrough.
Take Command Of Your BASH Prompt

[Joshua] has put together a list of BASH prompt customizations. The command prompt is used in a command-line interface to show that the system is ready for the next command. Often times this is nothing more than a user name, host name, and working directory:
mike@krusty:~$
[Joshua’s] customization examples can be used to color code the information in your prompt, change what information is displayed, and make the prompt respond differently when an invalid command is typed. A BASH prompt reference is helpful in deciphering what each of these commands do. The easiest simplification is to understand that non-printing characters (such as color codes) are surrounded in escaped square brackets. For example, line 1 is the sequence for Red, line 2 is the sequence for Dark Grey, and line 3 sets a simple prompt to display in Red and all text after that to be in Dark Grey:
\[\e[0;31m\] \[\e[1;33m\] PS1="\[\e[0;31m\]\u@\h:\w\$ \[\e[1;30m\]"
Simple Pop-up Notifications

[Kristofer] shares a tip on a simple way to add pop-up notifications to Linux scripts. The package libnotify allows you to use the command “notify-send” to pop up a message when you need it. The syntax is simple enough, just place your message in quotes after the command like so:
notify-send "Go read hackaday.com"
There are a lot of other options that go along with this command such as adding an icon and setting how long the message will be displayed. This would be great for projects that interface through scripts, displaying messages as events happen. For Ubuntu, installing this package was as simple as “sudo apt-get install libnotify-bin”.
Ubuntu 9.04 On Kindle 2

[digg=http://digg.com/linux_unix/Ubuntu_Jaunty_on_Amazon_s_Kindle_2]Having read books on a Palm device for years we were excited when Amazon came up with the Kindle. Our problem is that if you’re going to carry around a portable device it should do a whole lot more than just display text from a few books. [Jesse Vincent] managed to get Ubuntu 9.04 Jaunty Jackalope running on the Kindle 2. This opens up endless possibilities to run whatever you want on this hardware.
The new functionality was presented in a talk at OSCON 2009. Be warned, [Jesse] has a very high geeky-hacker level. Make sure you have a tech dictionary and Google at the ready when you watch the video embedded after the break. His talk starts at about two minutes in and runs for five minutes total. Continue reading “Ubuntu 9.04 On Kindle 2”
Lubuntu 9.10 Alpha Image Available

The alpha version of Lubuntu 9.10 Karmic Koala is now publicly availabile. The project brings together Ubuntu and LXDE, the Lightweight X11 Desktop Environment. This combination makes for a lighter version of the most popular Linux distribution. Both Xubuntu (which utilizes the Xfce desktop) and Lubuntu are meant to run well on lower resource computers such as netbooks. With the ISO smaller than 400mb and using quite a bit less system resources Lubuntu looks promising.
Right now it looks like the original backup ISO link is down. If you can’t wait, try this torrent.
[via Softpedia]
Lego IPod Hacking Robot

The Linux4nano project has been working to port the Linux kernel onto the iPod Nano along with other iPods in general. Although the iPodLinux project has had luck with some older iPods, newer models protect firmware updates with encryption. One of the ways they plan on running code on the device is through a vulnerability in the notes program; it causes the processor to jump to a specific instruction and execute arbitrary code. To take advantage of this, they first need to figure out where their injected code ends up in the memory. Currently, they are testing every memory location by painstakingly loading in a bogus note and recording its effect. Each note takes about a minute to test and they have tens of thousands of addresses to check over several devices.
