[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)
Thread Closed 
[DOC] Telnet(d) with PCH-A100 and vi commands
08-27-2008, 02:14 AM (This post was last modified: 08-31-2008 08:36 AM by Kasimodo.)
Post: #1
[DOC] Telnet(d) with PCH-A100 and vi commands
Hello,

Well, sorry for my very bad english (as bad as english of werner :coolSmile

Because, I've wasted many of my time to get information about how to do to install but particularly to edit some files with telnet so...

First, you have to install/enable telnet to the PCH.
Just see the Lundman Wiki.

If all is correct, just open a terminal window from your Linux preferred and type:
Code:
telnet xxx.xxx.xxx.xxx
(where xxx.xxx.xxx.xxx is the ip address of your PCH)

You must see something like that:
Code:
Trying 192.168.1.3...
Connected to 192.168.1.3.
Escape character is '^]'.

BusyBox v1.5.0 (2008-07-10 18:07:27 MYT) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ #
/ # <= this is your prompt command.
Then, to edit a text file, you have to go to the directory where busybox is installed.
If you installed from hard disk, it will be into the BIN directory of your share.
So type:
Code:
cd share/bin
You must see this:
Code:
/opt/sybhttpd/localhost.drives/HARD_DISK/bin #
Then to edit the file you want, you have to know where he is and his pathname.
If you have all, just type:
Code:
./busybox26 vi /pathname/filename

vi is a linux editor choosen by busybox26 too. It's not very easy to use it, so here you could find some information about it:

HowTo use vi editor:
Quote:There is 3 ways.
* The normal mode: this is the way you are when you open a file. It's useful to type vi commands
* The insert mode: This way is useful to insert caracter inside the document. To use the insert mode, just press INSERT on your keyboard or press "i" if you don't have.
* The replace mode: This mode is useful to replace the existing text by the text you write. Just press again INSERT or "i" to go to insert mode and then replace mode.
To come back to normal mode press ESCape

Some useful commands:

:q Quit the editor without saving anything
:q! Force the editor to quit without saving (even if you already have change the document)
:wq Save your document and quit the editor
:filenom Save the document with the specified name
ZZ (two CAPITAL letters 'z') -> Save and quit (thank you to josiv)

Edit commands


x Delete the caracter under the cursor
dd Delete all the line under the cursor
dxd Delete x lines from the line under the cursor
nx Delete n caracters from which one under the cursor

So now, you can use NZBGet and change your password easily, or what you want.

Regards,
Kasi
Find all posts by this user
08-27-2008, 03:06 AM
Post: #2
RE: [DOC] Telnet(d) with PCH-A100 and vi commands
Pretty sure I made a "vi" symlink in "/opt/sybhttpd/localhost.drives/HARD_DISK/bin", so that "./vi" should just work too.

In addition to that, you can just run:

# export PATH=$PATH:/opt/sybhttpd/localhost.drives/HARD_DISK/bin

Then you can "vi" anywhere.
Visit this user's website Find all posts by this user
08-27-2008, 09:31 AM
Post: #3
RE: [DOC] Telnet(d) with PCH-A100 and vi commands
(08-27-2008 03:06 AM)lundman Wrote:  Pretty sure I made a "vi" symlink in "/opt/sybhttpd/localhost.drives/HARD_DISK/bin", so that "./vi" should just work too.
It doesn't seem to work for me.
For example:
Code:
/ # ./vi /mnt/syb8634/nzbgetweb/settings.php5  
/bin/sh: ./vi: not found
/ #
Find all posts by this user
08-27-2008, 08:12 PM (This post was last modified: 08-27-2008 08:46 PM by Josiv.)
Post: #4
RE: [DOC] Telnet(d) with PCH-A100 and vi commands
Kasimodo, just do:
cp /opt/sybhttpd/localhost.drives/HARD_DISK/bin/vi /bin
(it will work till next restart)

Also usefull (exit from insert mode):
ZZ (two CAPITAL letters 'z') -> Save and quit
Visit this user's website Find all posts by this user
08-27-2008, 08:27 PM
Post: #5
RE: [DOC] Telnet(d) with PCH-A100 and vi commands
(08-27-2008 08:12 PM)Josiv Wrote:  Kasimodo, just do:
cp /opt/sybhttpd/localhost.drives/HARD_DISK/bin/bi /bin
(it will work till next restart)
Thank you Josiv.
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Playing music with Winamp from PC to PCH alvoryx 39 29,784 11-21-2012 10:27 PM
Last Post: joedalton101
  Web browser access to the PCH from your PC cheaper_popcorn 67 115,292 01-23-2010 06:43 PM
Last Post: bluecat
  How-to: Install and Configure Dropbear on the PCH racanu 60 70,948 11-26-2009 10:05 PM
Last Post: sp0
Game Tutorial: How to use the Xbox360 to play files off the PCH? victorakkersdijk 0 4,007 08-01-2009 10:04 PM
Last Post: victorakkersdijk
Thumbsup How-To: Convert Apple HD Trailers to PCH friendly luckyy 2 4,262 07-11-2009 05:32 AM
Last Post: BuddyBoy
  Optimising memory on your PCH Delphy 16 18,023 05-29-2009 11:46 AM
Last Post: Funksoldier
  What can the PCH do for me - Popcornhour FAQ Philos 38 105,459 05-25-2009 12:46 AM
Last Post: landoncube
  [DOC] UPnP PCH-A100 Media Server A/V controlled by Nokia N95 8GB Kasimodo 7 15,096 04-21-2009 10:39 PM
Last Post: javierPopCorn
  HowTo Setup Harmony Remote for use with PCH-A100 journey4712 62 45,405 04-20-2009 08:34 PM
Last Post: woutersa
  success: mlb.tv playing off the PCH! (in ubuntu) eliotw 1 7,669 04-05-2009 07:33 PM
Last Post: tracerhand

Forum Jump: