[ale] how do I - icon starts script starts 4 scripts

Ron Frazier (ALE) atllinuxenthinfo at techstarship.com
Wed Apr 17 20:48:55 EDT 2013


Hi Brian,

Thanks for the partial reply.  Not enough to get me where I need to be, 
but enough to start heading there.  More replies in line.

Sincerely,

Ron

On 4/17/2013 3:08 PM, Brian MacLeod wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 4/17/13 2:35 PM, Ron Frazier (ALE) wrote:
>    
>> Thanks (I think) dev null.  However, sometimes it's more efficient
>> to just ask someone who knows rather than spend hours searching
>> through results in Google.  There are some nuances to my question
>> that make the answers non obvious.
>>      
>
> I'm going to be a grouch here.
>
> The only nuances that aren't obvious in this situation are the
> Terminal/Window Manger you use and the specification of window size,
> The rest of what you asked is answered very well with the various
> documents explaining how to write bash scripts, as posted by dev null,
> and where you place your icon / your philosophy on how things should
> start up on boot.
>
>    

I've written exactly 1 prior linux script in my life, years ago, and I 
didn't remember how to do it.  None of this is obvious to me.  I'm was 
not / am not aware of the existence of specific documents by dev null on 
the topic nor of their location.  I'd be glad to look them over them if 
enlightened.  Figuring out how to create a general simple shell script 
wouldn't be too hard.  Figuring out how to comment it wouldn't be too 
hard.  However, figuring out how to link 4 miner scripts to one master 
miner script to one desktop icon is not something that I could easily 
get by general google searching.  I needed task specific advice which is 
why I posted the message.  Scott Plante provided some more detailed 
advice which allowed me to fit in the rest of the puzzle pieces and get 
something working.  I'll tell how I did that in my reply to him.

> Unless you have ABSOLUTE physical control of this machine and its
> location, I would give great pause to having the window manager
> auto-login and do this unless you script in some sort of screen lock,
> but that would defeat your purpose in having the terminals displaying
> the information.
>
> Frankly, if at all possible, I'd ditch the window-manager altogether
> and do this in screen, but even then with your heavy concentration on
> other security matters, this may not be the solution you think it is.
>   And I capitalized ABSOLUTE for a reason.
>
>
>    

I see what you're saying.  I guess I originally wrote something slightly 
different from what I meant.  I actually want it to autostart when I log 
in, not when it boots.  I would still have to log into the machine.  The 
machine is in my house, so I have total control unless it were stolen or 
something.

Your comment brings up an interesting thought.  I wonder if it would be 
possible to do a screen saver in such a way where the screen is visible, 
but the user is locked out of the mouse and keyboard unless he / she 
enters the password into a popup box after attempting to use the mouse 
or keyboard.  Not really necessary in my case, but it would be 
interesting.  The user could watch all they want, but not act on 
anything without reauthenticating.

> BEGIN QUOTE:
> - --------
> So, my first question is how do I set up a basic script file with
> these commands in it.  I can fill in all the details later.
>
> cd ~/cgminer
> export .....
> ./cgminer .....
>
> Also, how do I put comments in the file?
> - --------
> END QUOTE
>
>
>
> ummm...
>
>
>
>
> BEGIN SCRIPT
> - -------
> #!/bin/bash
>
> # Other than the required shell interpreter line
> # above, the hashed lines are comments.
> # This is a hash #
>
> cd ~/cgminer
> export .....
> ./cgminer .....
>
> - -------
> END SCRIPT
>
>
>    

It's that first line that always gets me, since it looks like a 
comment.  Also, sometimes I get into DOS-THINK mode and think REM is a 
comment.  Other things like some programming languages use * as a 
comment.  So I can never remember which is which.

> BEGIN QUOTE
> - --------
> Finally, I want to create a master script to start all the other 4.
> Here's the trick.  I want the master script to start each of the sub
> scripts in its own window and continue executing commands in the
> master script.  I don't want the master script to hang waiting for
> MINER1 to exit before executing MINER2, and so forth.
>
> Let's say that the master script is called START-MINERS.
> - --------
>
>
> BEGIN START-MINERS
> - --------
> #!/bin/bash
>
> # The ampersand after the command causes a fork and puts
> # the job in the background.
> # Commonly, geometry can be set by --geometry= option.
> # See your terminal man page for details.
>
>    

Yes, the "&" should be quite helpful.  Mint 13 uses mate-terminal as its 
terminal emulator.  There is no man page for it.  It does have a --help 
option which I've been able to get some info from.

> $TERMINAL $SCRIPT1&
> $TERMINAL $SCRIPT2&
> $TERMINAL $SCRIPT3&
> $TERMINAL $SCRIPT4&
> - --------
> END START-MINERS
>
>
> Brian
>    


-- 

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new email messages very quickly.)

Ron Frazier
770-205-9422 (O)   Leave a message.
linuxdude AT techstarship.com
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU



More information about the Ale mailing list