Bitcoin Forum
May 12, 2024, 04:02:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How have you configured your Xubuntu miner to automatically load your mining...  (Read 2439 times)
mackminer (OP)
Sr. Member
****
Offline Offline

Activity: 348
Merit: 251



View Profile
January 13, 2014, 09:39:21 AM
 #1

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.

1BFf3Whvj118A5akc5fHhfLLwxYduMmq1d
1715486529
Hero Member
*
Offline Offline

Posts: 1715486529

View Profile Personal Message (Offline)

Ignore
1715486529
Reply with quote  #2

1715486529
Report to moderator
1715486529
Hero Member
*
Offline Offline

Posts: 1715486529

View Profile Personal Message (Offline)

Ignore
1715486529
Reply with quote  #2

1715486529
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715486529
Hero Member
*
Offline Offline

Posts: 1715486529

View Profile Personal Message (Offline)

Ignore
1715486529
Reply with quote  #2

1715486529
Report to moderator
miaviator
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
January 13, 2014, 08:35:36 PM
 #2

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

gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
January 13, 2014, 08:44:22 PM
 #3

***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 <config>
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

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
mtnminer
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
January 15, 2014, 04:24:11 PM
 #4

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!