Chumby tips/tricks/HOWTOs
HOWTO: Start ssh/login to your Chumby
i.e. how to get a "shell".
- Start the Control Panel by hitting the button on the top of your Chumby.
- Select "Settings".
- Select "Chumby Info".
- Select the hidden π (pi) symbol in the top right of the screen.
- Note the IP address of the Chumby.
- Select "SSHD".
From another computer,
sshinto your Chumby as root:$ ssh -l root 192.168.2.4
To start ssh at boot, ssh in to your Chumby as above, then
$ touch /psp/start_sshd
(Remove this file to disable this behaviour.)
You can also initiate sshd by connecting a USB flash drive with an empty
file called start_sshd in the root directory (more
info).
(A USB drive will appear at /mnt/usb.)
FAQ: What's the "fbcgi" option in the "hidden" preferences?
This apparently enables access to the fram buffer (/dev/fb content) via
CGI.
(See above for how to enable the hidden preferences.)
HOWTO: Run CGI scripts on the Chumby's webserver
The Chumby starts a small webserver at startup which can be accessed at its IP address. (See Control Panel | Settings | Chumby Info for the IP address.)
CGI scripts that have been placed in /psp/cgi-bin are accessible at
http://a.b.c.d/cgi-bin/custom/foo.cgi. For example,
$ cat /psp/cgi-bin/hello.cgi
#!/bin/sh
echo "Content-Type: text/plain"
echo
echo "Hello, World!"
$ ifconfig rausb0 | fgrep inet
inet addr:192.168.2.4 Bcast:192.168.2.255 Mask:255.255.255.0
Then, from your computer, go to http://192.168.2.4/cgi-bin/custom/hello.cgi.
HOWTO: Run arbitrary Flash files on your Chumby
ssh in to your Chumby (for more information, see elsewhere in this
document) and then either wget the SWF, scp it from another computer, or
copy it onto a USB flash drive. Then, run it with:
$ chumbyflashplayer.x -z -i foo.swf
FAQ: How can I use my chumby as a BitTorrent client?
ssh in, as above, then:
$ trap '' 1
$ chumbytorrent mytorrent.torrent
(More info.)
HOWTO: Install Perl
Download http://files.chumby.com/resources/usr_arm_ext3_basicperl.tgz.
Extract it into the root of
/mnt/usb. (So that/mnt/usb/usrgets created.)Symlink
/psp/usrto/mnt/usb/usr.Copy
/psp/usr/bin/perl5.10.0to/psp/usr/bin/perl.Add
/psp/usr/binto the path:export PATH=/psp/usr/sbin:/psp/usr/bin:$PATH
HOWTO: Get CPAN working
Create a home directory on the USB drive:
mkdir /mnt/usb/home
Set the
HOMEenvironment variable to itexport HOME=/mnt/usb/home
Create a directory to store your CPAN configuration:
mkdir -p /mnt/usb/home/.cpan/CPAN
Copy the default CPAN configuration file into your "home" directory:
cp /mnt/usb/usr/lib/perl5.10.0/CPAN/Config.pm /mnt/usb/home/.cpan/CPAN/MyConfig.pm
Fix the paths:
cd /mnt/usb/home/.cpan/CPAN
Strings replace /home/user to /mnt/usb/home