PDA

View Full Version : defaults, ./profile, and rc.sysinit


snoopy
10-22-2002, 03:06 PM
How do I get I get a handle on where my Tivo looks for stuff?

I tried to be as concise as possible There is a shortened "1,2,3.." synopsis of my problem at the bottom.

BACKGROUND 1:
I have a Sony Sat T60 Direct Tivo unit. I installed a TurboNet card about year ago. At that time, I got as far as getting it installed in my unit but with ALOT of help from the designer of the card. I documented NOTHING much to my disapointment but it seems to work ok. I can get to a bash prompt and can FTP into it. Furthermore I have been able to use TYStream and TivoWeb, and so there does not appear to be any problem with the install.

OUTLINE OF QUESTIONS -- Part 1:
This question is unrelated to TivoApp but does raise a point about my original setup which I think might be wrong. My difficulty is that the latest version of TivoApp appears to start at a bash prompt and then tries to go to the folder /hack/bin which it cannot find! (I know the folder is correct because that is where I keep all my files). I have written to the ./profile using Joe at one point to reference the /hack/bin folder and have recently edited the rc.sysinit file in order to load noscramble.o. I did not maintain any documentation regarding editing the ./profile and would not be able to do it again if I wanted to. I just recently edited the rc.sysinit for noscramble.o and documented it, so going back there would not be a problem. The noscramble.o file works without a hitch now. I "think", what I need to know is how to get the bash prompt to start in the right place? It appears that my FTP program starts in one place (most likely the root), and my bash prompt starts in another (deeper in the structure). Do I need to have my bash prompt start differently?

QUESTIONS -- Part 2
What is the deal with ./profile and rcsysinit? I would undo the changes I made to ./profile because I remember it being extreemly difficult and just use the rc.sysinit to accomplish what I need to on start-up. Is this possible. I edited rc.sysinit using TextPad (I think the sole purpose is to maintain UNIX file attributes??) and then copied it right back in. There was no need to troubleshoot paths and command line jiberish as I did with Joe. It was super simple. And noscramble.o now loads automatically. I want to be able to use it instead of ./profile and undo what I did because it may be part of the problem why navigating to the /hack/bin folder is not possible from the bash prompt without

first doing ... cd
and again... cd
then... cd /hack
then... cd/bin

I have included a screenshot of what TivoApp tries to do and can't from the bash. Again, this is not a TivoApp question. It is an attempt to get clarification on:

1) Why does the bash prompt start in a different place deeper in the directory structure than does FTP by default?

2) Should this and Can this, be changed? How?

3) Can I edit the ./profile using TextPad and undo the changes I made to it?

4) Can I use the rc.sysinit file to do what I need to do instead of messing around with ./profile?

5) Any suggestions are extreemly helpfull. Thank you for looking over my post.

I'll quit rambling... I'm falling and I can't get it up :) SOMEBODY HELP ME!
:eek:

mrblack51
10-22-2002, 03:24 PM
first doing ... cd
and again... cd
then... cd /hack
then... cd/bin


i think you should be doing a cd /hack/bin
otherwise, you are switching to /hack, then to /bin

smeghead
10-22-2002, 08:29 PM
I don't really know much about TivoApp, but I'll answer the stuff I can.

1. root's profile file ("/.profile") is a script that is executed each time on login. It's used to set up the user's environment. rc.sysinit on the other hand is used to start up system services. You probably shouldn't try to make rc.sysinit do the stuff that is in .profile for the most part.

2. The error message you are seeing may be somewhat misleading. It could either mean that the system could not find the file /hack/bin/ShowList.tcl (which you should be able to verify by doing an "ls -l /hack/bin/ShowList.tcl"), or it could mean that a file that ShowList.tcl was trying to reference could not be found. If it is the second (i.e. it's not the first), you may need to grok through the tcl to try to figure out which file it's having a problem finding.

3. The bash prompt should start in the home directory (i.e. /) unless there is a "cd" in your .profile

4. If you want to undo changes, just make a copy of the file before editing it. That way you can just copy back on top if you want to go back.

Hope this is of some help.

garyw90
10-23-2002, 01:27 AM
Hi,
Sorry but I have not been looking around on the message boards much recently. With the Anaheim Angels doing so well, the America's Cup and my other research project, I have not been spending much time online.

The error that you are seeing may be due to having carriage returns in your ShowList.tcl file. This sounds wierd, but for some reason you get a strange looking error message like this. This ShowList.tcl file in the zip does not have carriage returns, so when you ftp it to the Tivo make sure you are using binary mode. If you look at the file with notepad and all the lines are run together with little squares in between them, then that means the file is stored correctly on the PC. If not, you can use dos2unix or some other tool to strip out the carriage returns.

snoopy
10-23-2002, 02:01 AM
no carriage returns
It appears just as you describe with the little boxes. I am using the latest CuteFTP in binary mode, to complete the transfer. Same error. I may try something different depending on how you respond to my email. I just wanted to follow up on this post. Thanks for trying to help me with TivoApp.

snoopy
10-23-2002, 02:04 AM
Thanks for your help.
What is the actual name of this ("/.profile") file? Can I edit it using TextPad?

garyw90
10-23-2002, 03:28 AM
The error is behaving as if there are carriage returns in the script. The shell is finding the script, and finding it in the right place, but when it tries to execute it, it in unhappy. Try using an editor on the Tivo and see if it has carriage returns. If you use vim, it may say [textmode] on the bottom.

Just to double check, I copied ShowList.tcl as test.tcl, then made sure it had carriage returns on the PC side. I then ftp'ed it over to the Tivo using binary mode. I verified it still had the carriage returns by looking at it with vim, and sure enough, the status line sad [textmode]. I then tried to execute it and....
bash-2.02# ./test.tcl
bash: ./test.tcl: No such file or directory
bash-2.02#

The actual file to edit to put the path in there is called .profile, and it is located in the root directory. files that begin with a period (or dot) are hidden files in Unix (Linux) and you have to use the -a option in ls to see them. An alternative to editing this file is to put the following in your startup script options in TivoApp:
export PATH=$PATH:/hack/bin

boboli
10-23-2002, 09:43 AM
I am having some problems with TivoApp as well..

I get connected OK, but nothing shows up on NOW SHOWING..

I have dual 120G HDs and a lot of recordings... How long should I wait?? Thanks B

boboli
10-23-2002, 09:44 AM
Sorry Meant to add this as wel.

What do you mean by the "root" dir? The uppermost level dir? Or user root's directory?

Wooly
10-23-2002, 02:31 PM
I too use TivoApp to extract my recordings - quite a nice program once it's setup properly. Make sure you use MFS Stream (the modifiied one with a lower priority, so it doesn't mess-up the DTivo).

That being said, I have seen my DTivo (with 2 80 gig drives completely full) take up to one minute to generate the NowShowing list. More than 2 minutes and it's a problem with something on the DTivo. I wish I could be more help than this.

Originally posted by boboli
I am having some problems with TivoApp as well..

I get connected OK, but nothing shows up on NOW SHOWING..

I have dual 120G HDs and a lot of recordings... How long should I wait?? Thanks B

snoopy
10-23-2002, 04:19 PM
no such file or directory error in TivoApp

FIXED IT FIXED IT FIXED IT

WHAT WORKED!

1) Renamed today's updated ShowList25.tcl to ShowList.tcl and used it instead.

2) Verified permisions on all 3 files using chmod 777

**Note: Tivo customer service told me about 6 months ago that all Direct Tivo's at that time, had 2.5 software. The 3.0 was designed to fix problems with the stand-alones and includes no new features. The 2.5 software gets updated regularly on mine via my Turbonet card and to date, I have never found a need to "block" any of those updates from occuring. My software is all being stored in folder that I created just off the physical as hack/bin. I put everything directly in the hack/bin folder and go from there.

That's it! END OF STORY.





WHAT DID NOT WORK!

In troubleshooting this particular error I found out some things. I have seen this before and had fixed it. Why it took me so long to figure it out again a year later I'll never know. Ho hum... woe is me :)

The error I included in this thread's first post and at the bottom of this post is confusing because it appears to point to a completely unrelated problem. My appologies in my orginal description of what I thought was wrong.

HERE is some usefull information regarding what I did to fix my TivoApp problems that were unrelated and DID NOT WORK

1) rc.sysinit and .profile.
They are unrelated to this issue. It has absolutely NOTHING to do with the path where TivoApp is looking for stuff.

2a) Attention to Carriage Returns.
This was not the problem either.

2b) dos2unix or unix2dos.
In order to maintain carriage returns, it was suggested to use dos2unix or unix2dos. This might have worked as the permisions would have been correct by default but is an un-necessary step.

3) Binary Mode.
Further explanatin of Binary Mode as follows:
There is alot of talk about binary mode. It is interesting to note that this has never been an issue for me. I use the latest CuteFTP software and have turned binary mode on of'course. It is NOT on my default. However, it seems to have no effect. My understanding of the reason people say to use binary mode or to use a command line unzipper such as gzip to get files to their Tivo is because of PERMISSIONS or ATTRIBUTES. Permissions and Attributes in this instance, are interchangeable terms. Certain files have to have executable rights in order to function. When you transfer a file via FTP, it looses those permissions BINARY or NO BINARY (at least this is true in my current copy of the latest CuteFTP software). Dos2Unix and Unix2Dos is one of many tools suggested to fix these attribute problems as is gzip, and there is nothing wrong with using either, any, or both methods. Getting around the need for some third party methods simply requires knowing which files need to be executable and setting them using "chmod 777 filename" from the bash prompt command line. If you use gzip from the command line, it also solves the permissions problem and is an acceptable way to unzip files to your tivo.

I hope someone finds this post to be of some use. The writing of it helped me clarify some things in my own mind as well, and feedback is always appreciated.

Thanks to all those who have helped me.

BubbleLamp
10-23-2002, 05:22 PM
Originally posted by snoopy
3) Binary Mode.
Further explanatin of Binary Mode as follows:
There is alot of talk about binary mode. It is interesting to note that this has never been an issue for me. I use the latest CuteFTP software and have turned binary mode on of'course. It is NOT on my default. However, it seems to have no effect. My understanding of the reason people say to use binary mode or to use a command line unzipper such as gzip to get files to their Tivo is because of PERMISSIONS or ATTRIBUTES. Permissions and Attributes in this instance, are interchangeable terms. Certain files have to have executable rights in order to function. When you transfer a file via FTP, it looses those permissions BINARY or NO BINARY (at least this is true in my current copy of the latest CuteFTP software). Dos2Unix and Unix2Dos is one of many tools suggested to fix these attribute problems as is gzip, and there is nothing wrong with using either, any, or both methods. Getting around the need for some third party methods simply requires knowing which files need to be executable and setting them using "chmod 777 filename" from the bash prompt command line. If you use gzip from the command line, it also solves the permissions problem and is an acceptable way to unzip files to your tivo.

Please be careful when giving out information you're unsure of. Your explanation of BINARY and ASCII modes is way off. Here's a quick reference (http://www.ag.uiuc.edu/~iproject/Master/FTP/ftpascii.html) or two (http://www.barnard.columbia.edu/at/training/ftp/).

snoopy
10-23-2002, 05:32 PM
BubbleLamp,
Thank you for your clarification.
I did make a note that what I was writing was only "my understanding" of the binary issue and precisely documented what made me "think" that. This was deliberate so as to make an point out of letting people know that I am no expert and am figuring this out as I go along.

Thanks very much for the info. I read both links in thier entirety and now have a better understanding. You have helped me in previous posts as well and I appreciate the input very much.