View Single Post
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#144
Hi Misty. It sounds like you are probably suffering from problem 2 below. Try following the instructions below to test and fix that, and then continue from the "echo" command in the first post.

Originally Posted by Big Phat Jan View Post
To anyone having problems, I've corrected three potential sources of them in my first post. They are as follows:

1. You need to have rootsh installed or "sudo gainroot" won't work.

2. You need to be user when echoing the alias to your /home/user/.profile file, or root will own the file (which is bad!)

You can test this using:

Code:
ls -l /home/user/.profile
If you see "root" there at all then you need to change this to "user" with the following commands:

Code:
sudo gainroot
chown user. /home/user/.profile
exit
3. The "code" tags on this forum seem to introduce line breaks depending on your screen resolution and size! I think that this is what has caused most of the problems (and this would explain why some people are having problems and others aren't).

The "echo ..." command needs to all be on one line. If this is not the case you need to edit the /home/user/.profile file and make sure it is. If this is the only alias you have, then the easiest way would be to delete the file and then redo the command making sure there are no line breaks, i.e.

Code:
rm /home/user/.profile
#below here should all be one line
echo 'alias iplayer="iplayer-dl -d /home/user/MyDocs/.videos"' >> /home/user/.profile
#above here should all be one line
It seems that pasting the echo command outside of the code tags would solve the new line problem, so here it is:

echo 'alias iplayer="iplayer-dl -d /home/user/MyDocs/.videos"' >> /home/user/.profile

If you do have other aliases your best option would be to use a text editor to edit the file instead.

Cheers,
Jan