[ubuntu] How can have a script auto run at login.

view story

http://ubuntuforums.org – Ok so i have been at this for days now and have not been able to find a solution. i have been all over these forums and others for hours at a time trying to find something that works. I will post the two scripts below that i am refering to. Basicly is what i am trying to do is have the ability to click on my "run" script which will perform an action such as "apt-get update && apt-get upgrade" then create another script and then restart my computer...this second script "or series of commands" would then run once to call upon a third script to perform actio (Hardware)