View Full Version : tivo .profile
helpdeskdan
03-15-2007, 10:55 PM
I added my own .profile file, but it doesn't seem to work. I wish these to be executed when I telnet in. Any ideas? Many thanks!
bash-2.02# pwd
/
bash-2.02# cat .profile
# move away from /
export HOME=/var/hack/
export PATH=/var/hack/bin:$PATH
export PATH=$PATH:/var/hack:/var/hack/bin
export HISTFILE=$HOME/.bash_history
export HISTFILESIZE=999
export HISTSIZE=999
export TERMCAP=$HOME/.termcap
# other ENV settings
export LESS=-QMi
export EDITOR='/var/hack/bin/vim'
export LD_LIBRARY_PATH=/var/hack/lib
alias which='type -path'
alias reset='echo -ne "\033c" && stty sane'
cd
bash-2.02#
Finnstang
03-16-2007, 08:29 AM
put it at the top of your author file.
The aliases can stay in .profile
Finnstang
03-16-2007, 08:36 AM
Here is the contents of my .profile
export TIVO_ROOT=
export TIVO_REMOTE=TIVO
export MFS_DEVICE=/dev/hda10
TERM=xterm
alias rw='echo "mounting read write"; mount -o remount,rw /'
alias ro='echo "mounting read only"; mount -o remount,ro /'
alias twp='echo "starting Tivowebplus"; /enhancements/TWPrunc.sh'
alias ffind='find / -name'
alias author='vi /etc/rc.d/rc.sysinit.author'
alias root='vi /var/spool/cron/crontabs/root'
alias twprs='echo "restarting Tivowebplus"; sh /enhancements/TWPrestart.sh'
alias ll='ls -l'
alias m='more'
alias h='history'
BTUx9
03-16-2007, 11:50 AM
a possible answer your question:
bash looks for $HOME/.profile
At startup, $HOME is set to /, so that finds /.profile
But you are setting HOME to /var/hack... if you already have HOME set when telnet is started, bash is going to be looking for /var/hack/.profile
You may want to put your file in /etc/profile (notice, no dot) and see if that helps
ocntscha
03-16-2007, 08:13 PM
I'd guess your tnlited isn't set to start bash as a login shell, make sure it looks something like this..
/sbin/tnlited 23 /bin/bash --login &
helpdeskdan
03-16-2007, 10:24 PM
Wow, BTUx9! A celebrity - you're the author of TivoWebplus 2! That probably won't run on my old series 1, eh? I run 1.2.1 and am afraid to touch it. :-\ I really should upgrade someday.
Responses:
#1. What's an author file? I have noticed that TivoWebplus references this file as a "startup file" or something, but it does not exist.
#2. At first, I though this would have worked.
bash-2.02# ls
bash: ls: command not found
bash-2.02# echo $HOME
/var/hack/
bash-2.02# pwd
/var/tmp
bash-2.02# cp /.profile .
As it turned out, it was just as you said - /var/hack/.profile was the fix.
#3. My line says:
/sbin/tnlited 23 /bin/bash -login &
With one dash. 2 dashes makes a difference? Afraid to touch it - don't want to have to pull the HD.
Many thanks for all the replies,
-Dan
ocntscha
03-17-2007, 12:21 AM
With one dash. 2 dashes makes a difference? Afraid to touch it - don't want to have to pull the HD.One dash or two, doesn't matter. Glad its working for you but I'm a bit surprised at what the solution was, unless you are manually setting HOME to /var/hack/ in your author file?[/CODE]
BTUx9
03-17-2007, 10:05 AM
Wow, BTUx9! A celebrity - you're the author of TivoWebplus 2! That probably won't run on my old series 1, eh? I run 1.2.1 and am afraid to touch it. :-\ I really should upgrade someday.
Responses:
#1. What's an author file? I have noticed that TivoWebplus references this file as a "startup file" or something, but it does not exist.
TWP2 runs fine on S1s... there are just a few external modules that haven't been updated to be compatible with it, but if you aren't using any of those, it shouldn't be an issue
the author file is /etc/rc.d/rc.sysinit.author
helpdeskdan
03-17-2007, 10:44 AM
Yeah, ocntscha, I have no idea why it works. You'll have to ask BTUx9. I'm not setting it anywhere else that I know of.
What is the rc.sysinit.author file for? I don't seem to have one. Is it important? Just create one in vi?
I see this is the guide for upgrading to tivowebplus:
http://www.tivocommunity.com/tivo-vb/showthread.php?t=344356
Many Thanks,
-Dan
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.