How to run programs from a script?

Questions about applications and software
Forum rules
Before you post please read this

How to run programs from a script?

Postby toyonut on Sat Feb 28, 2009 5:31 pm

How do you make programs trigger on a script?
I am trying to configure my laptop-mode really well and it is going great. I just need to be able to script my ati card to auto change power states when on Battery and AC.
Code: Select all
 aticonfig --set-powerstate=1

This sets my card to the low power with ATI Powerplay.
Set powerstate=2 sets it to default.

One way is here
http://ubuntuforums.org/showthread.php?t=729644
But the instructions above dont seem to run programs not supported by Bash script.

In Laptop mode tools /etc/laptop-mode/laptop-mode.conf it tells you laptop-mode can start programs on a script too
Code: Select all
# Laptop mode tools can automatically start and stop programs when entering
# various power modes. Put scripts accepting "start" and "stop" parameters
# in the directories /etc/laptop-mode/batt-stop, batt-start, lm-ac-stop,
# lm-ac-start, nolm-ac-stop and nolm-ac-start. Laptop mode will call the
# scripts in a state-"stop" directory with the "stop" parameter when entering
# the state in question, and it will call the same scripts with the "start"
# parameter when leaving the state. Scripts in a state-"start" directory are
# called with the "start" parameter when the specified state is entered, and
# with the "stop" parameter when the specified state is left.
########################################


But I wouldnt know where to start with that.
Anyone got any advise?
toyonut
Level 1
Level 1
 
Posts: 8
Joined: Fri May 23, 2008 1:26 am

Linux Mint is funded by ads and donations.
 

Re: How to run programs from a script?

Postby grimdestripador on Mon Mar 02, 2009 2:45 am

The ubuntu forums seem to provide good examples. What specifically does not run. Dud you make the script executable, and are you running the script with root privilages.
I notices a lot of txt files needing to be written over in those scripts.
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 29 guests