Author

Topic: How have you configured your Xubuntu miner to automatically load your mining... (Read 2464 times)

sr. member
Activity: 294
Merit: 250
I just moved for mining with Windows XP to Xubuntu 13.10  I was using BFGminer 3.9.0 on Windows and am now using it on Xubuntu too.  I moved to achieve better reliability and less reboots.

I have not yet set up an auto start script, but hope to today.  I am seeing about a 3% increase in hashing speed after moving to Linux.

Mtnminer
donator
Activity: 798
Merit: 500
***ninja'd  Cheesy

If you are using a cgminer .conf file, the changes are here

*********


Here is my blatant rip off of miaviator's code for our scrypt rigs using user miner, and mine.sh as the launch script, with cgminer binary in /home/miner/cgminer ... modify as necessary.

Code:
######################
#Set machine to autologin to xserver
cat > /etc/lightdm/lightdm.conf << EOF
[SeatDefaults]
autologin-user=miner
autologin-user-timeout=0
user-session=xubuntu
greeter-session=lightdm-gtk-greeter
EOF
#####################
#Generate a Base Config FIle
cat > mine.sh << EOF
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
cd /home/miner/cgminer/
screen -S miner /home/miner/cgminer/cgminer
EOF
chmod +x mine.sh
###################
#create an autostart file
cat > /home/miner/.config/autostart/miner.desktop << EOF
[Desktop Entry]
Name=Miner
Type=Application
Exec=/home/miner/mine.sh
StartupNotify=false
Hidden=false
Terminal=true
EOF
chmod 0755 /home/miner/.config/autostart/miner.desktop
donator
Activity: 686
Merit: 519
It's for the children!
config. On a restart I don't want to log in and do manual startup stuff. I know it's a script but I wrote something and didn't work straight away.

I'm running Xubuntu with cgminer in the home folder in a cgminer folder. config file is in the correct folder so cgminer knows where to get it.

Basically it's a script I need to run it in byobu and the script needs to run on startup. Note I'm using the GUI for the machine but it's not really required as I'll be using SSH from now on.

Thanks.

Code:
#Generate a Base Config FIle
cat > mine.sh << EOF
API="--api-port 4028 --api-listen --api-allow 0/0"
POOL="-o #YOURPOOL -u YOURUSER -p YOURWORKERPASS"
GENERAL="--scrypt --no-submit-stale"
CARD="--auto-fan --temp-target 82"
WORK="--worksize 256 -I 13"
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
cd /home/miner/cgminer/
screen -S miner /home/miner/cgminer/cgminer $API $POOL $GENERAL $CARD $WORK
EOF
chmod +x mine.sh
###################
#create an autostart file
cat > /home/miner/.config/autostart/miner.desktop << EOF
[Desktop Entry]
Name=Miner
Type=Application
Exec=/home/miner/mine.sh
StartupNotify=false
Hidden=false
Terminal=true
EOF
chmod 0755 /home/miner/.config/autostart/miner.desktop
###################
######################
#Set machine to autologin to xserver
cat > /etc/lightdm/lightdm.conf << EOF
[SeatDefaults]
autologin-user=miner
autologin-user-timeout=0
user-session=xubuntu
greeter-session=lightdm-gtk-greeter
EOF
###################
#Disable the screensaver
sed 's/LOCK_SCREEN=true/LOCK_SCREEN=false/g' -i /etc/default/acpi-support
###################
#Fix the grub failure bug
sed "s/:--1/0/g" -i /etc/grub.d/00_header
update-grub2
sr. member
Activity: 348
Merit: 251
config. On a restart I don't want to log in and do manual startup stuff. I know it's a script but I wrote something and didn't work straight away.

I'm running Xubuntu with cgminer in the home folder in a cgminer folder. config file is in the correct folder so cgminer knows where to get it.

Basically it's a script I need to run it in byobu and the script needs to run on startup. Note I'm using the GUI for the machine but it's not really required as I'll be using SSH from now on.

Thanks.
Jump to: