[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[200] Calling an index.htm from putty command line
06-16-2012, 08:59 PM
Post: #1
Calling an index.htm from putty command line
I have searched and have been unable to locate how to start an index.htm file using putty.

I have an index.htm located in root of usb_drive on pch. Is it possible in putty to run that file and have the pch display the html screen?

I have found thru searching a command to start eversion.phf but not for a .htm file.

Any suggestions or help would be great.

Thanks,
James
Find all posts by this user
Add Thank You Quote this message in a reply
06-16-2012, 09:13 PM (This post was last modified: 06-16-2012 09:18 PM by zombiehunter.)
Post: #2
RE: Calling an index.htm from putty command line
try

PHP Code:
echo youfilename.html > /tmp/gaya_bc 

or maybe
PHP Code:
echo -"http://localhost.drives:8883/YOUR_USB_DRIVE_NAME/yourfilename.htm" >> /tmp/gaya_bc 

(06-16-2012 08:59 PM)JamesTF Wrote:  I have searched and have been unable to locate how to start an index.htm file using putty.

I have an index.htm located in root of usb_drive on pch. Is it possible in putty to run that file and have the pch display the html screen?

I have found thru searching a command to start eversion.phf but not for a .htm file.

Any suggestions or help would be great.

Thanks,
James

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

[Image: watched-fanart.jpg]
http://trakt.tv/downloads/popcorn-hour
Find all posts by this user
Add Thank You Quote this message in a reply
06-16-2012, 09:21 PM (This post was last modified: 06-16-2012 09:33 PM by JamesTF.)
Post: #3
RE: Calling an index.htm from putty command line
Thanks for the reply, unfortunantly that returns a "Request cannot be processed" screen. What can I try next?

Thanks,
James


Edit

Sorry, I didn't see your second reply....that one worked perfectly!

Thank you so much!!!

James
Find all posts by this user
Add Thank You Quote this message in a reply
06-16-2012, 09:37 PM (This post was last modified: 06-16-2012 09:52 PM by zombiehunter.)
Post: #4
RE: Calling an index.htm from putty command line
the other option is to use the load_page api you'll need to sign up to get access to the api documents

https://developer.popbox.com/c/devuser/home

but here's some untested code

PHP Code:
wget -/dev/null "http://127.0.0.1:8008/system?arg0=load_page&arg1=/opt/sybhttpd/localhost.drives/YOUR_USB_DRIVE/yourhtmlfile.html&arg2=switch" 

If you want any more info you'll need to sign up

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

[Image: watched-fanart.jpg]
http://trakt.tv/downloads/popcorn-hour
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to zombiehunter for this post
06-16-2012, 11:31 PM
Post: #5
RE: Calling an index.htm from putty command line
Thank you so very much....That did the trick!!!

James
Find all posts by this user
Add Thank You Quote this message in a reply
06-18-2012, 05:11 PM
Post: #6
RE: Calling an index.htm from putty command line
Just an FYI, the old index.htm working on boot still works and you don't need to do this.

just rename index.htm to somethign else. go into the drive/share. Use power+eject to reboot. You'll see it goes back to the old location. rename your file back to index.htm and it'll autoload like before. There seems to be some bug where it's not always saving where you last were.
Find all posts by this user
Add Thank You Quote this message in a reply
06-19-2012, 02:27 AM
Post: #7
RE: Calling an index.htm from putty command line
I tried the power+eject to reboot early on but didn't know to rename the index.htm, I will try that asap and report back. If this works it will sure beat the workaround I have been trying to get working for the last couple of weeks now. I did finally get it working thanks to the great help and support on this forum. Thank you all!

James
Find all posts by this user
Add Thank You Quote this message in a reply
06-19-2012, 06:48 PM
Post: #8
RE: Calling an index.htm from putty command line
(06-18-2012 05:11 PM)accident Wrote:  Just an FYI, the old index.htm working on boot still works and you don't need to do this.

just rename index.htm to somethign else. go into the drive/share. Use power+eject to reboot. You'll see it goes back to the old location. rename your file back to index.htm and it'll autoload like before. There seems to be some bug where it's not always saving where you last were.

Just tried on both my c200's....it doesn't work for me. Just for the record I am on firmware 03-04-120517-21-POP-408-000 and the share is a NAS (not sure if that makes a difference or not).
Are you on a newer or beta version? If so any speculation on when it will be released?

Thanks,
James
Find all posts by this user
Add Thank You Quote this message in a reply
06-19-2012, 07:57 PM
Post: #9
RE: Calling an index.htm from putty command line
I gave up and installed csi and added the load_page commad to start_app.sh

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

[Image: watched-fanart.jpg]
http://trakt.tv/downloads/popcorn-hour
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [200] Network command for shut down on C200 JamesTF 6 1,456 11-14-2012 09:24 PM
Last Post: opfeifer
  [200] man command in opkg? sshambar 0 706 04-16-2012 06:01 AM
Last Post: sshambar
  [200] C200 Standby mode from command line xray 2 1,361 11-08-2011 06:59 PM
Last Post: xray
  [200] A-210 find command xeddog 7 1,784 04-28-2011 10:43 PM
Last Post: xeddog
  [200] index with dynamic content atticus 3 1,387 02-02-2011 10:14 PM
Last Post: atticus
  [200] play_genericmedia command DeadHammer 2 1,277 01-21-2011 01:20 PM
Last Post: dc11ab
  [200] How to run Shell command on the NMT jutoto 8 2,217 11-29-2010 12:48 AM
Last Post: jutoto
  [200] Edit index.html Stevenr 0 944 11-20-2010 05:21 PM
Last Post: Stevenr
Information [200] start.cgi (index) replacement zoef 15 4,148 09-30-2010 11:21 AM
Last Post: cheaper_popcorn
  [200] Start PCHa200 on the index screen...! Gangel 1 985 09-11-2010 12:02 PM
Last Post: Gangel

Forum Jump: