Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: mackminer on October 23, 2011, 01:34:37 PM



Title: How can automate cgminer starting in screen on linuxcoin restart
Post by: mackminer on October 23, 2011, 01:34:37 PM
Hello,
I am regularly rebooting my rigs at the moment due to issues I'm running into while tweaking my cards for max performance.

I'm using cgminer and I would like if it could be automated to start rather than me having to do it manually. At the moment upon logon I have to start screen. Then export DISPLAY=:0 and then enter the cgminer folder and run the starting line with all arguments etc. It's getting annoying now and I would like something quicker.

Can anyone point me in the right direction?

Thanks.


Title: Re: How can automate cgminer starting in screen on linuxcoin restart
Post by: ovidiusoft on October 23, 2011, 04:50:37 PM
Add this line to /etc/xdg/lxsession/LXDE/autostart:

Code:
@lxterminal --command=screen

and create .screenrc in the home directory:

Code:
startup_message off
screen -t MINER 0 sudo /path/to/your/cgminer and parameters

(you can drop the sudo, I don't remember why I put it there, but I must have had a reason :) ).


Title: Re: How can automate cgminer starting in screen on linuxcoin restart
Post by: mackminer on October 23, 2011, 06:07:42 PM
Add this line to /etc/xdg/lxsession/LXDE/autostart:

Code:
@lxterminal --command=screen

and create .screenrc in the home directory:

Code:
startup_message off
screen -t MINER 0 sudo /path/to/your/cgminer and parameters

(you can drop the sudo, I don't remember why I put it there, but I must have had a reason :) ).

Excellent - I've just added that to my system. Won't be able to test for a few days but thanks!  :)


Title: Re: How can automate cgminer starting in screen on linuxcoin restart
Post by: Valle on April 15, 2013, 07:25:07 AM
There is no lxsession directory for ubuntu, so it does not work.