Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set my Ubuntu 13.04 machine in a way that, upon reboot, an instruction is executed and a program is launched with specific parameters, REGARDLESS of whether a user is logged on to the machine physically or by SSH.

This is the instruction that needs to be executed:

/root/ccminer/ccminer -a x11 -o stratum+tcp://drk.smartcoinpools.com:7903 -u XgZLPCQkGvvpK42jAAtgRHvs8J25xKn1XS -p picciolibeddi -q

I have modified, therefore, my /etc/rc.local as follows:

 #!/bin/sh -e
 # rc.local
 # This script is executed at the end of each multiuser runlevel.
 # Make sure that the script will "exit 0" on success or any other
 # value on error.
 # In order to enable or disable this script just change the execution
 # bits.
 # By default this script does nothing.

 /root/ccminer/ccminer -a x11 -o stratum+tcp://drk.smartcoinpools.com:7903 -u XgZLPCQkGvvpK42jAAtgRHvs8J25xKn1XS -p picciolibeddi -q

exit 0

I can't really understand why this instruction is totally ignored after rebooting, yet if I launch it manually from shell it works perfectly, so there are no errors of syntax in it.

I would appreciate it loads if you could please help me, bearing in mind that I need to run this command BEFORE any user is logged in.

share|improve this question
Do you really have to start a miner with root privileges? Also, what's the problem with writing a simple upstart/systemd rule? – Braiam Jul 21 '14 at 14:48
Try adding >/root/c.log 2>&1 to the end of that command line and see if any error messages appear in the c.log file. – Mark Plotnick Jul 21 '14 at 16:09

A few things:

1) Doesn't the x11 option require that the program is launched while an xserver is running?

2) Apart from this you could try cron, using the @reboot directive.

3) You might also use the screen utility to daemonize your script.

4) Further you might use sudo -u underprivileged-user ... to prevent running the program as root.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.