im a failure :/
No worries, trial & error is a learning process - personally, I'd rather fail and learn than succeed without understanding why. Try going through
this thread and experiment with different methods, then choose the one that works best for you.
I've posted this before in this thread but I guess every now and then it's helpful to refresh as it's a long topic and hard to read everything.
Assuming Ubuntu, which now uses Upstart the correct way to start cgminer at boot is with a conf file located inetc/init. This doesn't require any auto-login or other stuff. Just one simple extra file in the right place. Here is a working example that I have used for many months,
/etc/init/miner.conf
description "Start BTC Mining"
start on runlevel [2345]
stop on runlevel [016]
kill timeout 30
script
sleep 15
cdhome/ubuntu
execusr/bin/screen -dmS Miner su -cusr/local/bin/startcg ubuntu
end script
Note above it runs as user "ubuntu" but you should replace that with your user name. It is more secure to not run as root user, which would be the default during an init process like this. The "sleep" I have there is to allow time for X to be started at boot. There is a better way but this works fine too. I use "screen" to allow me to remote in with ssh and attach/detach as desired. If you're not familiar with that then google it. You can not bother with screen but then it's harder to login remotely and see realtime status. Also, if it's not already installed then "sudo apt-get install screen" would be needed before using this.
This conf file starts cgminer by running the startcg script. You can put what you need in there. Mine contains:
#!/bin/bash
export AMDAPPSDKROOT=/home/ubuntu/AMD-APP-SDK-v2.4-lnx32/
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}
export DISPLAY=:0
cgminer 2>>/var/log/cgminer.log
Yours may be a bit different but typically pretty similar to this. I use cgminer.conf but some people like to use the cmd line args in this file instead.
Useful things to know:
To start mining manually: sudo start miner
To attach to cgminer after remote login: sudo screen -r
(I make an alias for this, alias mm='sudo screen -r' and put it in .bashrc file)
To detach from within cgminer: <ctrl>A D
You can disable starting at boot by renaming the conf file, eg. mv miner.conf miner.conf.down
(that's handy when changing GPU cards so they don't start with wrong settings).