Back to the software parent directory.
Tivo has only a very few commands available by default at the shell prompt. Luckily, supplemental commands have been compiled for Tivo. These commands are generally grouped in a file called tivo-bin.tar.gz, which can be downlaoded from here.
- http://pvrhack.sonnik.com/tivo/download.asp
Installation Instructions:
- Decompress the file using winzip on your PC. Be sure follow the instructions listed to properly configure WinZip for UNIX tar file extraction.
- ftp the files up to /var/hack/bin on your Tivo.
- If the /var/hack/bin directory does not exist, first use telnet to create the directory. You currently cannot create directories via FTP.
- After transfering the files to Tivo, use telnet to connect to the Tivo. Type the following commands at the bash prompt:
- Change to the appropriate directory: cd /var/hack/bin
- Change the file permissions (Note the period-forward-slash): chmod +x ./ls
- Change the file permissions: chmod 755 *
- Add the new executable commands to the Tivo path statement (Note the curly brackets (near the P key) and not paranthesis): export PATH=/var/hack/bin:${PATH}
- After this you should be able to use the usual commands such as ls to perform a directory listing, etc.
Permanently change your default path
Based on post written by Steve Jenkins of the Tivo Undergroud.
Click here for the original post.
Here are some step-by-step instructions to help edit your TiVo's bash shell PATH to include the location of your hack binaries (such as ls, joe, etc.) I've seen some people using the "hackfile" script method (which involves creating a script called hackfile that you need to run whenever you log in), but this method will automatically update your path for you whenever you log in.
How To Edit your TiVo Shell's Default PATH:
While accessing your TiVo via the bash shell, it's a good idea to include the location of your hack files in your TiVo's PATH so they'll be available to you regardless of which directory you are in. You can add additional directories to your PATH by including a PATH statement in your default profile, which is stored in a file called .profile (that's DOT profile) in your home directory. The .profile file is always run by the shell whenever you log in, so it's a perfect place to tell TiVo what some of your preferences (such as your PATH) should be.
1. Once you log in to the bash shell, confirm that "/" is your home directory by typing:
echo $HOME [ENTER]
You should get a response that looks like this:
/
This tells you that your home directory is the root directory (known as "/").
2. You can see what your current PATH is by typing:
echo $PATH [ENTER]
You should get a response that looks like this:
/bin:/sbin:/tvbin:/devbin
This tells you that the /bin, /sbin, /tvbin and /devbin directories are currently in your PATH (FYI - the TiVo OS has a minor bug that includes the /devbin directory in the default path, but the /devbin directory is actually in /var/devbin. This won't cause any problems, it's just interesting to note).
2. If you're using JOE as your text editor, it's probably stored in /var/hack (which is where it insists on being installed). But since the /var/hack directory isn't in your path yet, you'll need to change to the directory where the JOE editor is installed by typing:
cd /var/hack [ENTER]
3. Now use the JOE editor to create a new file in the root directory called .profile by typing:
./joe /.profile [ENTER]
That's DOT SLASH joe SPACE SLASH DOT profile [ENTER]
This tells JOE to run from the current directory (that's the first dot and slash) and create a file in the root directory (that's the second slash) and call the file ".profile"
4. Once JOE opens and tells you you're creating a new file, type in the following:
PATH=$PATH:/var/hack:/var/hack/bin
This tells your system to set the PATH to the current path (with is $PATH), and to also include the /var/hack and /var/hack/bin directories. If these aren't the directories you store your hack binaries in, then put in whatever directories you like. Make sure you always refer to the the directory names starting from the root (using the "/") and separate each different directory name with a colon (don't use a semi-colon like MS-DOS PATH statements).
5. Save the file and exit from JOE by pressing [CTRL-K] then hit the "X" key.
6. End your bash session by typing:
exit [ENTER]
7. Re-establish your bash session, then check to see if your new PATH is now in effect by typing:
echo $PATH [ENTER]
You should get a response that looks like this:
/bin:/sbin:/tvbin:/devbin:/var/hack:/var/hack/bin
8. Test it out by typing:
ls [ENTER]
Assuming you have the ls binary in one of the directories listed in your path, you should get a directory listing! You can check to see your .profile file by typing:
cd / [ENTER]
ls -a [ENTER]
The "-a" option shows "all" the files in the directory, including hidden files, which are designated by starting with a DOT. So your .profile file wouldn't show up with an ordinary ls command, but it will with an ls -a.
Congratulations! You've just edited your default PATH!
Older, less useful method to update your path (each time you start Telnet):
Unfortunately, the "path" command must be issued each time a new telnet session is started. The best way I know to automate this process is to create a file 'hackpath' that you run each time you start a telnet session.
Use JOE or another editor to create a new file containng the following the following:
export PATH=/var/hack/bin:${PATH} Save the file and change the permissions using Chmod>command: chmod 755 hackpath
Whenever you log in, just execute the file:
. ./hackpath (note the period and space at the beginning)
That should change your path. You could also save the file as a .profile in the home directory of whoever you are logging in as (echo $HOME will show you the directory).
Corrections or updates for this page:
Note: Do not post questions, unrelated comments, or information of which your are uncertain. This section is reserved for corrections and updates only.
sonnik.com is no longer hosting this file!