Difference between revisions of "Chumby tricks"
(→Run processes on start-up) |
|||
Line 90: | Line 90: | ||
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code> | * Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code> | ||
* Add whatever commands (try the chumby click echo command). | * Add whatever commands (try the chumby click echo command). | ||
− | * Now when you reboot, these commands should run. | + | * Now when you reboot, these commands should run WHEN YOU SSH in. |
+ | * Does anyone know how to make processes start up independent of login? |
Revision as of 13:20, 18 October 2007
NOTE - this page is for Ironforge production chumby devices - for alpha prototypes, please see Chumby Tricks for Foo/Katamari
Contents
- 1 Hidden screen in Control Panel
- 2 Open a secure shell console on the chumby
- 3 Built in web server
- 4 Streaming music from SlimServer to chumby
- 5 Custom alarms
- 6 Your own opening animation
- 7 Your own Control Panel
- 8 Launching sshd at startup
- 9 Make your chumby click when you touch the screen
- 10 Run processes on start-up
Hidden screen in Control Panel
- Open the Control Panel, select "Settings", then "Chumby Info"
- In the upper right, you'll see a little "pi" symbol - touch it
- You'll see a screen with some interesting buttons:
- SSHD will launch the builtin Secure Shell Daemon
- FILES will open up a simple file system browser
- REBOOT will reboot the chumby device
Open a secure shell console on the chumby
- Start
sshd
using the hidden Control Panel screen - Using an SSH client, log in:
- For Microsoft Windows, you can use PuTTY.
- For MacOS X and Linux, use the command
ssh
from a terminal window
- Use the IP listed on the hidden screen, with the username "root". It will not require a password. For instance, if your chumby has the IP
192.168.1.100
, on Linux or Mac, the command would be:
ssh 192.168.1.100 -l root
- You should get a big ASCII chumby logo
Built in web server
On startup, the chumby launches a small HTTP server on port 80, which displays wireless statistics information - to view this page, get the IP of the chumby from the Settings->Chumby Info screen in the Control Panel, and type http://ip.of.the.chumby/
into a browser.
You can add CGI scripts to this webserver:
- Open a console on the chumby using SSH
- create a directory at
/psp/cgi-bin
- add your CGI scripts there
You can now access those scripts using the URL http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script
Streaming music from SlimServer to chumby
Stream music from your computer to your chumby using SlimServer!
- Download and install SlimServer
http://www.slimdevices.com/su_downloads.html
on your computer. - Use a Unix-style line-end compatible(linefeeds rather than carriage return line breaks) text editor (TextEdit for Mac, EditPad Pro for Windows) to create a file called "debugchumby" (no extension).
- Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")
#!/bin/sh btplay http://ip.of.your.server:9000/stream.mp3 &
- Verify the IP address is the IP address of the computer that SlimServer is running on.
- Save the file to a USB flash drive, insert into your chumby, and reboot.
- Play your music via the SlimServer web interface, and music should play through the chumby's speakers.
- Enjoy!
Custom alarms
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files
- Get a USB flash drive, and copy your MP3 file to the top level
- To override alarm 1, rename the file
alarm1.mp3
- To override alarm 2, rename the file
alarm2.mp3
- ...or to override both, rename the file
alarm.mp3
- the individual files will override this one. - Plug the USB flash drive and boot your chumby - when an alarm goes off, it will use your files instead of the built in sounds
Don't make these files too big - no larger than a couple of megabytes.
Your own opening animation
If you'd like to replace the little chumby animation that happens when you start up, do the following:
- Make your Flash animation that you want to run, be sure it calls
fscommand("quit")
at the end - Put it on a USB flash drive, and call it "opening.swf"
- Plug it into the back of your chumby and reboot!
Your own Control Panel
Note: Requires software release 1.2 or later
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:
- Put it on USB flash drive, and call it
controlpanel.swf
- Plug it into the back of your chumby and reboot!
If you have an older software release you can do something similar with a USB dongle, with the file debugchumby
containing:
#!/bin/sh chumbyflashplayer.x -i /mnt/usb/controlpanel.swf
Launching sshd at startup
- Open up a console on the chumby
- At the console, type:
touch /psp/start_sshd
- Now
sshd
will be started whenever the chumby successfully connects to a network! - To stop this behavior in the future, type:
rm /psp/start_sshd
If you don't want to happen all the time, you can do this instead from a USB flash drive:
- On the USB flash drive, create an empty file called
start_sshd
. - Plug it into the back of your chumby and reboot!
Make your chumby click when you touch the screen
You can have the chumby give you some simple audio feedback when you touch the screen
- Open up a console on the chumby
- Type
echo 1 > /proc/chumby/touchscreen/touchclick
- To turn it off, type
echo 0 > /proc/chumby/touchscreen/touchclick
Run processes on start-up
- You can run commands on startup. By editing your /psp/.profile file.
- You should probably first make a backup copy of the original:
cp /psp/.profile /psp/.profile.orig
- Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby):
vi /psp/.profile
- Add whatever commands (try the chumby click echo command).
- Now when you reboot, these commands should run WHEN YOU SSH in.
- Does anyone know how to make processes start up independent of login?