Bitcoin Forum

Bitcoin => Mining => Topic started by: IlbiStarz on July 06, 2011, 03:38:21 AM



Title: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 03:38:21 AM
Hey guys,

So I've been trying to get this to work for 3 days now, and this is really frustrating me. What I want to do is to run the miner upon startup. This is for Ubuntu.

So first I went into System > Startup Applications and then selected all my miners. I have 4 files in my home folder that I run to mine. (./Mine1, ./Mine2, ./Mine3, ./Mine4) This doesn't work. Nothing happens when I login.

Then I tried to put those 4 files into Home/User/.Config/Autostart This still doesn't work. I then tried to change the default program to open txt files from gedit to gnome-terminal, but it still doesn't work.

PLEASEE HELPPPP!!!1111!!!!!


Title: Re: Startup Miner PLEASE HELP!
Post by: TurdHurdur on July 06, 2011, 03:40:20 AM
Are they executable?


Title: Re: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 03:49:24 AM
Yes I've allowed them to run as executable, or else I would not have been able to run them in my home folder.


Title: Re: Startup Miner PLEASE HELP!
Post by: TurdHurdur on July 06, 2011, 03:52:39 AM
So, you've chmod'd them to 755? What's the shebang line?


Title: Re: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 04:01:08 AM
...what?

Can someone tell me why I can't make or paste files into /etc/init.d/?


Title: Re: Startup Miner PLEASE HELP!
Post by: Inaba on July 06, 2011, 04:29:05 AM
/etc/init.d is owned by root and you can't just randomly put files in there... or if you do they won't work.

You should probably look into putting your stuff in rc.local file, or I vaguely recall a way to autostart programs in Gnome from the control panel.  I've done it once in the distant past, but can't remember the exact steps.

I've avoided autostarting the miners in case something goes horribly wrong, I don't want them starting on their own and freezing up the system in a perpetual loop.  This is mainly a problem when they are remote boxes and I don't have access to them physically.


Title: Re: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 04:34:10 AM
/etc/init.d is owned by root and you can't just randomly put files in there... or if you do they won't work.

You should probably look into putting your stuff in rc.local file, or I vaguely recall a way to autostart programs in Gnome from the control panel.  I've done it once in the distant past, but can't remember the exact steps.

I've avoided autostarting the miners in case something goes horribly wrong, I don't want them starting on their own and freezing up the system in a perpetual loop.  This is mainly a problem when they are remote boxes and I don't have access to them physically.


I've tried using sudo -i and sudo bash but I don't see how it helps me physically copy the files into /etc.

If everything works like it is supposed to, I will be able to stop the miners before they startup. I've put a sleep 30 before it actually opens poclbm.


Title: Re: Startup Miner PLEASE HELP!
Post by: shotgun on July 06, 2011, 04:44:53 AM
OP: start them up via xinitrc - they aren't starting because you're not doing something correctly - but without some logging there's no way to troubleshoot your issue.

This is from an arch linux wiki but the content is applicable: https://wiki.archlinux.org/index.php/Xinitrc

The miners need X to be running, along with environment variables set (LD_LIBRARY_PATH amongst others) before they will run correctly.


Title: Re: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 04:52:25 AM
I tech Linux tech-savvy at all so I have no idea what to do with that page...

If other things need to run before the miners can run, I think I am letting them...I have the miners start 30 seconds after login, which is even later than if I were to do it manually. This means the problem is most likely telling them to open in a terminal. (I usually manually open them in terminal ./Mine1)


Title: Re: Startup Miner PLEASE HELP!
Post by: IlbiStarz on July 06, 2011, 05:06:47 AM
Okay so I've used sudo cp to copy the miner scripts into /etc/init.d

But it still doesn't run when I login...

However, when I go into /etc/init.d and double click the miner (I couldn't do this before) it gives me the option to display or run in terminal. Running it in terminal works normally, EXCEPT that it closes right after it opens. (I started my overclock script, it still overclocked my cards, but it closed right after it finished) I think I've made progress :P


Title: Re: Startup Miner PLEASE HELP!
Post by: hollajandro on July 06, 2011, 06:35:29 AM
You can't put miners in /etc/init.d. For one thing the system doesn't just run everything in there. All the files in init.d are scripts that have a certain format. For another thing, everything in there will be run before X starts so they would fail to launch anyways. Search for info on xinitrc for your user and put stuff in there. If you find your way there remember to end your miner lines with an ampersand or it will run one but nothing else. & forks processes into the background.


Title: Re: Startup Miner PLEASE HELP!
Post by: evlew on July 06, 2011, 10:14:13 PM
Refer to this thread.  It will still apply to ubuntu

http://forum.bitcoin.org/index.php?topic=7374.msg248025#msg248025

I am using this setup on 3 miners (4 cards each)
This will check every 10 mins if miners are running based on two variables.  Whether the minerx.sh script is running and whether or not there is a load on the GPU's.  If either condition is true it will kill the miner and reopen it.  This has saved me a lot of stress and worrying. 

Hope this helps.