1

I'm trying to delay the command python /opt/splashtop-streamer/SRStreamer.pyc by ten seconds at startup, everything I have tried is failing. If I remember correctly a command with sh at the beginning was the only way I ever got this to work. I've looked all over the internet for the answer.

Both of the answers work but there's a bug I can't fix that has something to do with these solutions.

Daniel
  • 372
  • 2
  • 9
  • 26
  • 1
    ...and what exactly have you tried? If you give details, it's easier to spot a solution for you. Moreover, it's not clear what you mean for startup. System startup? Your graphic login? Console login? Please edit your question. – Rmano Oct 18 '14 at 07:40
  • also possible duplicate of [How can I delay a specific program on startup?](http://askubuntu.com/questions/28685/how-can-i-delay-a-specific-program-on-startup) – αғsнιη Oct 18 '14 at 07:50
  • possible duplicate of [Execute a command 20 seconds after the desktop is booted](http://askubuntu.com/questions/518503/execute-a-command-20-seconds-after-the-desktop-is-booted) – Jacob Vlijm Oct 18 '14 at 08:03

2 Answers2

5

Prefixing the command with sleep 10 && should do the work if I correctly understood your question. Like this

bash -c 'sleep 10 && python /opt/splashtop-streamer/SRStreamer.pyc'

Try man sleep for more options.

αғsнιη
  • 35,092
  • 41
  • 129
  • 192
Chintan
  • 340
  • 2
  • 13
  • The program won't load at startup with this command. I think I got it to load before with a sh command. – Daniel Oct 18 '14 at 12:18
0

This is what works: sh -c "sleep 10 && python /opt/splashtop-streamer/SRStreamer.pyc" but it's leading to another problem which I posted here: Another copy of splashtop streamer is running

Daniel
  • 372
  • 2
  • 9
  • 26