run command line at startup

Asked by Bill Lancaster

I run this command every day at startup:-

get_iplayer --listformat="<pid>|<name>|<index>" --type=radio --nocopyright >radio-index

I modified /etc/rc.local by adding the following line:-

/usr/bin/perl /usr/bin/get_iplayer --listformat="<pid>|<name>|<index>" --type=radio --nocopyright >radio-index

but nothing happens when I reboot. I believe get_iplayer needs an internet connection but this should be established when rc.local runs.

Please help

Bill Lancaster

Question information

English Edit question
Ubuntu bash Edit question
No assignee Edit question
Solved by:
Bill Lancaster
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

make a script and add it in your users startup. As you are running it in the desktop without sudo, it is running as user. /etc/rc.local commands run as root.

If you add the item in your startup it will run at login and you will have a net connection. You may want to add:

sleep 15

So the system has time to get connected before the command runs.

Revision history for this message
Bill Lancaster (bill-lancaster) said :

Thanks - it worked, didn't need sleep 15 either