Difference between revisions of "NeTV tricks"
Torinnguyen (talk | contribs) m (NeTV_developer_info --> NeTV_Main_Page) |
|||
Line 1: | Line 1: | ||
=Open a secure shell (SSH) console on NeTV= | =Open a secure shell (SSH) console on NeTV= | ||
− | See also [[ | + | See also [[NeTV_developer_info#USB_Ethernet_support|USB Ethernet support]] |
* Go to Control Panel of NeTV with infrared remote control | * Go to Control Panel of NeTV with infrared remote control | ||
* Under Settings menu, select Enable SSH | * Under Settings menu, select Enable SSH |
Revision as of 08:14, 4 December 2011
Contents
Open a secure shell (SSH) console on NeTV
See also USB Ethernet support
- Go to Control Panel of NeTV with infrared remote control
- Under Settings menu, select Enable SSH
- Find out NeTV's IP address under System Info menu
- Using an SSH client (Windows users can use PuTTY, Mac/Linux users can use
ssh
from a terminal window), log in as the user root with no password. e.g.
ssh root@192.168.1.100
- You should see a message showing your last login time.
Scheduled tasks, auto-execution of tasks
Launching sshd at startup
WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access
- Open up a console on the chumby
- At the console, type:
touch /psp/start_sshd
- Now
sshd
will be started when NeTV boots - To stop this behavior in the future, type:
rm /psp/start_sshd
Run processes on start-up
Boot up, default screen, control panel customizations
Bootloader Screen
Prepare a PNG image with 1280x720 resolution.
- Copy it to the device, (eg. /tmp/bootlogo.png)
- Stop the NeTVBrowser from drawing to the screen
killall NeTVBrowser
- Splash the logo image on to framebuffer
SCREEN_X_RES=1280 SCREEN_Y_RES=720 imgtool --bitfmt=rgb565 /tmp/bootlogo.png
- Capture the framebuffer to config block
dd if=/dev/fb0 bs=$((1280*720*2)) count=1 | gzip -c | config_util --cmd=putblock --block=logo
- Reboot and check that it's changed
Note: /boot/logo.raw.gz
is a distraction. It doesn't do any good :)
Using an external URL as Control Panel
To to have NeTV goes to a particular Url on boot
- Open up a console on the chumby
- At the console, type:
vi /psp/homepage
- Enter a full HTTP URL (eg. http://www.your_fancy_ui.com)
- Now NeTV's browser will be redirected to your page when NeTV boots
- To stop this behavior in the future, type:
rm /psp/homepage
Using a local custom Control Panel (firmware 23)
To to have NeTV use a certain local folder as docroot on boot
- Open up a console on the chumby
- At the console, type:
vi /psp/homepage
- Enter a valid folder path (eg. /media/storage/myfancyui)
- Now NeTV's browser will be redirected to your page on next boot
- To stop this behavior in the future, type:
rm /psp/homepage
The path must be an valid absolute path & must exists for this to take effect. It will fallback to default /usr/share/netvdocroot
otherwise.
NeTVServer will first look for files in this custom folder, and fallback to default folder in /usr/share/netvdocroot
if the file doesn't exists.
This behavior was design for life support stuff such as Update UI, WiFi config UI, supporting shell scripts; so you don't have to copy those to your new folder.
This behavior is also useful if you need to overwrite only certain files in the default docroot tree (eg. an single image or single css stylesheet)
For whatever reason, if you want it to happen manually on-demand (switching it manually on every boot), please see SetDocroot API.