Foreverrising Blog

June 4, 2011

Starting your BitCoin miner on startup (Ubuntu 10.10)

Filed under: Software — Tags: , , , — foreverrising @ 11:14 pm

I actually don’t have my miner start automatically on system startup. I did at one point but (I’m no expert) I didn’t have too much time to get the miner instance to launch in it’s own window. The PC would boot, and start mining, but I would kill the process just so I could have a visual on the activity.

What I did was this:

1. Configure your user to automatically log in with no password in Ubuntu. This will allow you to remotely reboot your machine without having to login at the keyboard. If you wish to do this, DO NOT RUN YOUR BITCOIN CLIENT FROM THE SAME MACHINE! Run it on a shitty machine that would be a waste to mine on!

Open: System> Administration> Login Screen Settings.
Select the radio button “Log in as x automatically.” You will also need to remove your password.

Open: System> Preferences> Passwords and Encryption Keys.
Under the Passwords tab (default), right-click on each of the password folders and select “Change Password.” Enter the old password and leave the new password blank. Repeat for default keyring and login keyring (the ‘folders’). Reboot and make sure there is no passwords to get logged into the desktop and online.

2. Create a shell script to mine
Open: Terminal.
Type:
gedit mine.sh
Then confirm to create the file.
Paste this and fill in the correct flags:

cd /[path to your miner python file]/
python poclbm-mod.py -d [X] yada yada yada

Close and save the changes. Type
mine.sh
to confirm that it starts the miner.
Then type
chmod +x mine.sh

3. Add the script to your startup applications
Open: System> Preferences> Startup Applications
Click Add
Type:

Name: Bitcoin Miner
Command: /home/USER/mine.sh
Comment: Added miner script to startup

Reboot!

If all is well you will have a desktop behaving slowly. Open system monitor to show you that the process Python is running, then check your online stats.

I’ll post the crontab script to restart the phoenix miner if anyone wants it.

Me: 1PpEc6snjyKqy6CH7wkd6c2Wh9LTfNgCVD (If you’re feeling generous).

E-Rock

Advertisements

4 Comments »

  1. I want to share my startup script:

    #!/bin/bash
    #
    echo “Ready to mine”
    sleep 1 && echo “Cards found: ” && aticonfig –list-adapters | grep ATI
    sleep 1 && echo “Setting fan to 100%”
    aticonfig –pplib-cmd “set fanspeed 0 100” >> /dev/null
    echo “Mining…”
    python poclbm-mod.py -d 1 -v -w128 -f1 –host=deepbit.net –port=8332 –user=… –pass=…

    echo “Setting fan to auto”
    aticonfig –pplib-cmd “set fanspeed 0 auto” >> /dev/null

    Also,a Fanspeed script to use through SSH:

    #!/bin/bash
    aticonfig –pplib-cmd “set fanspeed 0 $1” >> /dev/null

    Calling it by ./setfan [number]

    Then I added the mining script to OpenBox autostart.sh

    xterm -e ./mine.sh

    a ubuntu 10.04 based distro installed on a pendrive (ext2) with only xorg/slim/openbox/ssh/stuff for mining = 1.4 GB

    Comment by Tabris — June 10, 2011 @ 1:35 am

    • You can set -f to 0. Nice script. There are a couple I’ve seen that are also nice. If you search the forums there is one which will start mining when your computer is idle which I’ve wanted to try out, but I just let mine mine. 🙂

      Comment by foreverrising — June 10, 2011 @ 9:26 am

      • Why -f 0 ? is it better?

        Comment by Tabris — June 10, 2011 @ 4:51 pm

      • It would simply allocate that much more resources to the miner. I use 0 for just mining, 30 for normal use, and 60 when I’m doing anything more graphic intensive.

        Comment by foreverrising — June 10, 2011 @ 5:57 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: