Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: alexdrans on June 07, 2011, 10:12:15 PM



Title: Ubuntu autostart upon login?
Post by: alexdrans on June 07, 2011, 10:12:15 PM
I am trying to figure out how to get my miners to autostart once Ubuntu logs in. Every time I restart, I need to open up AMDOverdriveCtrl for each card and then open up terminals for each of my miners.

Is there any way I can put this together in a single script so that it opens new miners in separate windows, as well as opens up AMDOverdriveCtrl?

Edit; I'll tip what I can for a good solution!


Title: Re: Ubuntu autostart upon login?
Post by: alexdrans on June 07, 2011, 10:25:03 PM
Going to give this a little bump before I head off to bed. Surely someone must know whether it's possible to do this :)


Title: Re: Ubuntu autostart upon login?
Post by: Rob P. on June 07, 2011, 11:34:10 PM
Tell me what you run in each of your terminals and I'll write you a script and tell you how to install it.


Title: Re: Ubuntu autostart upon login?
Post by: alexdrans on June 08, 2011, 07:06:10 AM
AMDOverdriveCtrl -i 0
(new terminal)
AMDOverdriveCtrl -i 3
(new terminal)
cd poclbm
./gpu1.sh
(new terminal)
cd poclbm
./gpu2.sh




Title: Re: Ubuntu autostart upon login?
Post by: Rob P. on June 08, 2011, 12:16:47 PM
AMDOverdriveCtrl -i 0
(new terminal)
AMDOverdriveCtrl -i 3
(new terminal)
cd poclbm
./gpu1.sh
(new terminal)
cd poclbm
./gpu2.sh

Sorry, need the full paths to each of the commands above.  When you're in the directory type `pwd` to see where you are.
You can also use "whereis AMDOverdriveCtrl", etc, to find the full paths.

The issue is that the startup script will start in a different directory from where you are, so we need absolute paths for each command.  Also, you're not going to get any output from these commands.  Or do you want this to just run at login in the three terminals?

I can do either.  At system startup, or at your login.

Finally, give me a 'uname -a' so I know what version of linux you're running.


Title: Re: Ubuntu autostart upon login?
Post by: alexdrans on June 08, 2011, 06:41:35 PM
AMDOverdriveCtrl -i 0
(new terminal)
AMDOverdriveCtrl -i 3
(new terminal)
cd poclbm
./gpu1.sh
(new terminal)
cd poclbm
./gpu2.sh

Sorry, need the full paths to each of the commands above.  When you're in the directory type `pwd` to see where you are.
You can also use "whereis AMDOverdriveCtrl", etc, to find the full paths.

The issue is that the startup script will start in a different directory from where you are, so we need absolute paths for each command.  Also, you're not going to get any output from these commands.  Or do you want this to just run at login in the three terminals?

I can do either.  At system startup, or at your login.

Finally, give me a 'uname -a' so I know what version of linux you're running.

Ah, sorry about that. There's actually 4 terminals that need to be opened, one for each of the AMDOverdriveCtrl instances, and one for each of the miners.

The 'poclbm' directory is located at /home/alex/poclbm with gpu1.sh and gpu2.sh inside.

The output of whereis AMDOverdriveCtrl gives me AMDOverdriveCtrl: /usr/bin/AMDOverdriveCtrl /usr/share/AMDOverdriveCtrl
but I can just access this from typing AMDOverdriveCtrl -i  0(or 3) from anywhere in the terminal.

System startup or login, aren't they the same thing? There's only one user account on here that's automatically logged in when Ubuntu loads up.

Thanks for your help with this by the way!


Title: Re: Ubuntu autostart upon login?
Post by: alexdrans on June 09, 2011, 09:12:22 PM
AMDOverdriveCtrl -i 0
(new terminal)
AMDOverdriveCtrl -i 3
(new terminal)
cd poclbm
./gpu1.sh
(new terminal)
cd poclbm
./gpu2.sh

Sorry, need the full paths to each of the commands above.  When you're in the directory type `pwd` to see where you are.
You can also use "whereis AMDOverdriveCtrl", etc, to find the full paths.

The issue is that the startup script will start in a different directory from where you are, so we need absolute paths for each command.  Also, you're not going to get any output from these commands.  Or do you want this to just run at login in the three terminals?

I can do either.  At system startup, or at your login.

Finally, give me a 'uname -a' so I know what version of linux you're running.

Just reminding you that the thread is here and bumping :)


Title: Re: Ubuntu autostart upon login?
Post by: Rob P. on June 09, 2011, 09:54:21 PM
Okay:

Go here and read this quick tutorial of how to run commands at login under Ubuntu:
http://www.thegeekstuff.com/2009/07/ubuntu-open-applications-automatically-during-system-startup/

On the window where they have "Add Startup Program", add four different ones, with these parameters:

Name:  AMDOverdriveCtrl Dev 0
Command:  gnome-terminal -e /usr/bin/AMDOverdriveCtrl -i 0
Comment:  Whatever you want

Name:  AMDOverdriveCtrl Dev 3
Command:  gnome-terminal -e /usr/bin/AMDOverdriveCtrl -i 3
Comment:  Whatever you want

Name:  poclbm GPU 1
Command:  gnome-terminal -e /home/alex/poclbm/gpu1.sh
Comment:  Whatever you want

Name:  poclbm GPU 2
Command:  gnome-terminal -e /home/alex/poclbm/gpu2.sh
Comment:  Whatever you want

Then log out, and log back in to test.

If this works and you're happy, please consider helping me out a bit with whatever seems appropriate, 1 BTC would be awesome:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG