Wednesday, May 30, 2007

Play it on TV

I was thinking about how to watch movies stored on my computer on TV screen, without much investments.
The major problem is that most movies are stored on computer in different formats and players are freely available to install and run. If you want them to play, need to have a DVD/CD player with right set of decoders or use converters to DVD format, not a cost & time saving one's.
Found this cool stuff on the net about how to play movies on your computer on TV.

Getting shell script variable values

Here is the problem

bash-2.05# cat
echo "Environment variables" > out.log
env >> out.log
echo $ATM_PIN

bash-2.05# sh

bash-2.05# cat out.log |grep -i atm

While debugging a shell script, if the values of the variables are required in an intermittent state of the shell script execution use the -a option.

bash-2.05# sh -a
bash-2.05# cat out.log |grep -i atm

Thursday, May 17, 2007

Configuring rsh service on Linux

By default the rsh service is not enabled (obviously).

So here are the steps

1. Check if the rpms are installed. (else use the cd's to install)
redhat# rpm -qa|grep rsh
2. In /etc/xinetd.d/rsh set disable = no
3. Edit the following files

redhat# cat /etc/hosts.allow
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
ALL : localhost/hostA
redhat# cat /etc/hosts.equiv
redhat# cat .rhosts
+ user1

4. /etc/init.d/xinetd restart
5. Test the above
redhat# rsh localhost
//password less login to remote machine

Disclaimer: more secure services like ssh are recommended than services like rsh.