I added these lines to the provided cgi script in the <span class="plainlinks">[http://www.proposable.com <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">proposal software</span>] zip file above after the line that contains '''pwd=$0''' (line 7); Im not sure which of the 3 chmods made the script work, but without them I failed to install telnet on my box. Good Luck :)

+

I added these lines to the provided cgi script in the zip file above after the line that contains '''pwd=$0''' (line 7); Im not sure which of the 3 chmods made the script work, but without them I failed to install telnet on my box. Good Luck :)

Installing telnetd on HARD_DISK

Unpack telnet-installer.zip so that you get three additional files, telnet-installer.html, telnet-installer.cgi-RENAME-ME.bin and busybox26.

Because WinZIP has a tendency to corrupt *.cgi files, please rename telnet-installer.cgi-RENAME-ME.bin to telnet-installer.cgi.

Upload the three files to your nmt, most easily to your HDD. You could also use a USB stick, if so, place the files in the root of the stick. You should upload a total of three files to your PCH.

Filezilla warning: If you use Filezilla to upload files make sure the Edit->Settings->Transfers->File Types->"treat files without extension as ASCII files" is clear or the busybox binary will be corrupted.

You must also make telnet-installer.cgi be executable.

site chmod 755 telnet-installer.cgi

In DOS FTP you use:

quote SITE CHMOD 755 telnet-installer.cgi

Upload telnet-installer.html, telnet-installer.cgi and busybox26 to the root directory of your nmt.

site chmod 755 telnet-installer.cgi

Push "Sources" to get your to your nmt start page

Select "HARD_DISK" (or USB stick if you chose that)

Select "Files" (Forth icon on the right. Video, Music, Photos, Files - or push the blue button on the remote).

Pick "telnet-installer.html".

Select "Install to HARD_DISK" - if this fails, you did not make telnet-installer.cgi executable or copied it to the wrong place

You should now be able to telnet to your nmt.

Note: The Popcorn Hour B110 and other NMT's with SATA hard disk may require you to change the installer script files path with 'HARD_DISK' to 'SATA_DISK' before launching.

Running from USB stick

UnZIP telnet-installer.tar.gz so that you get three files, telnet-installer.html, telnet-installer.cgi-RENAME-ME.binand busybox26.

Because WinZIP has a tendency to corrupt *.cgi files, please rename telnet-installer.cgi-RENAME-ME.bin to telnet-installer.cgi.

Place them in the root of your USB stick.

You USB stick should have, in its root:

/telnet-installer.html
/telnet-installer.cgi
/busybox26

You must also make telnet-installer.cgi be executable.

Push "Sources" to get your to your nmt start page

Select "USB_DRIVE_A" (or USB_DRIVE_A-1, etc as appropriate)

Select "Files" (Forth icon on the right. Video, Music, Photos, Files)

Pick "telnet-installer.html".

Select "Run from USB_DRIVE_A". If this fails, you did not make telnet-installer.cgi executable

You should now be able to telnet to your nmt.

Comment for WinXP users that cannot set permissions:

I added these lines to the provided cgi script in the zip file above after the line that contains pwd=$0 (line 7); Im not sure which of the 3 chmods made the script work, but without them I failed to install telnet on my box. Good Luck :)

READ THIS Taking the HDD out to add telnetd was needed the first time, to gain access to the unit. However, since then the clever chaps on the forum has found they can execute binaries through the PHP port. This new method lets you upload a html file and your binary (telnetd) then simply tell NMT to run it. It even survives firmware upgrades. Please look for the USB stick solution below for adding telnetd service.

The following steps are written in a chronological order the author used to discover and improve on his findings, the first step isn't necessarily a starting point and only one step seems necessary to enable telnet.

It all started with a theory that since the FTPD, NFSD, and SMBD all live on the HDD (since indeed, it would be pointless to run them if you had no storage to share) perhaps they could be tweaked with. I had been warned that the NMT might be using binary signatures so perhaps I would not be able to replace the binaries themselves, nor was I sure my cross-compile toolchain was correct anyway. But maybe I could wrap FTPD in a shell script or similar and see if I can not somehow glean more information.

Step 1

I took out the HDD, and mounted it on OsX. (After installing that most excellent ext3 driver!). Lo-and-behold, there are two (well 3) partitions on the HDD:

initial mflag swap size
1 1 0 257008
2 0 1 506047
3 1 0 11805585

So, a 250MB partition 1, swap and then the rest of the disk for your media files. Taking a look at partition 1 we find:

Nice. pure-ftpd is there, and we know it has to be run as root (to be allowed to open port 21), but also, the startup script! As well as pure-ftpd password file. Nice. My next step, as I did not want to attempt to change any binary, nor startup script unless I had to, was to change the pure-ftpd passwd file to allow a root login.

As it turns out, pure-ftpd is too picky about root users, I had to change quite a lot just to be able to create the db file, let alone allow me to login. So, I modified ftpusers account to not be chroot. (Ie, remove the '/./' end part of the home directory.

This allowed me to login as ftpuser and look around from /. First thing I noticed was:

7. Reinstalled the drive into the PCH and turned it on, Telnet was running.

Enabling telnetd and change subtitle font via PHP

An alternative method to enable telnet and changing the subtitle font has been provided by the user gshock on NMT's forum:

Using Lundman's guide to starting telnet on NMT, you can replace the fonts used for subtitles. Swapping \bin\arial.ttf with any truetype font will change their appearance. I'm using Bookman Antiquita, it looks so much better then Arial.

You can also run your own custom PHP scripts by browsing to them with the stream command:

http://popcorn:8088/stream/file=/share/Scripts/filetest.php?cmd=echo Hello world

The PHP script is sending a shell command "echo Hello world" to the OS.

The .sh scripts in /mnt/syb8634/server are writable from Apache, so you may be able to make PHP scripts that will easily enable/disable telnet without removing Popcorn's HDD or messing with the first few steps in Lundman's wiki (For those who are lazy or just don't want to remove the Popcorn HDD, but want telnet.).

(...)

The Popcorn Hour looks for arial.ttf. If it can't find it, it goes back to the main menu after showing the buffering screen.

Stop myiHome server. Start it again, telnetd will start with it. . Note: You have to manually start myiHome after telnet is installed (it turns off myiHome automatically, but doesn't turn it back on again after installation finishes.).

To use Font.php:

First run the telnet script. It CHMODs all the fonts to 0777.

Put Font.php and any fonts on the Popcorn hard disk.

Edit Font.php and change the FONT_PATH to wherever your fonts are stored. The default is \Scripts\fonts.

Browse:

http://popcorn:8088/stream/file=/share/Scripts/Font.php

It should list the fonts in your font path. Click on any font to install it, or click the restore button to return to the default font.

Make sure popcorn is the IP address of your player, ie.

http://192.168.1.107:8088/stream/file=/share/PopcornDev/Main.php

NMT Apps needs to be installed and MyiHome needs to be running for this to work (although it's always running, by default ).

I disclaim all responsibility in the event your NMT, PC or living space combusts as a result of using these scripts or the information included in this post. Use it at your own risk.

Note that the first release of the PHP scripts overwrites original scripts without backing them up, and recent changes in NMT firmware releases may break this solution. Second release is meant to be viewed from the web browser on the Popcorn/NMT. You can access it from a networked computer, but it will be missing images etc. It runs /bin/busybox telnetd instead of /usr/sbin/telnetd, so hopefully it will be more compatible with the new firmware.

Enabling telnetd via USB

The user Erlis has contributed with a convenient way to enable telnetd via a USB device without the need of an internal HDD.

1. Download the compiled busybox26 binary and put it in the root folder of the USB device.

2. Create the script.cgi file in the same location with the following content:

Now insert the USB device in the Popcorn Hour and navigate to it from the Media Source start page. Click on the telnet.html file and activate. If all goes well your TV screen turns white and reads "Telnetd started on port 23..........." .

Note that if you have previously inserted a USB device you might get the wrong path, e.g. USB_DRIVE_B-1. To avoid this, unplug all USB devices and reboot the Popcorn Hour previous to attempt this method. And beware of unplugging the USB device while executing.