Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 29141  / 2 Years ago, thu, august 4, 2022, 3:21:58

My problem in a nutshell is that I have to run a script every time I use my computer so I'm trying to automate the process a bit.



My system has the nvidia gt540m vga card. The card is dual. It has one high end card for demanding tasks, and it uses the low end onboard card for everything else.



Ubuntu at this time does not support this type of vga card, and it powers them both at all times, when only using the onboard one.



This results in very low battery life time.



I am rather new to ubuntu so I had to follow a ton of tutorials before actually finding a script to solve the problem.



I downloaded an acpi_call folder to the directory /home/anpel, and with the following commands, I kill the card:



cd /acpi_call
sudo insmod acpi_call.ko
sudo ./test_off.sh


Next step, since I had to manually run the commands each and every time I booted, was to make a shell script on my desktop, which I run, it prompts me for my password, and after providing it, it kills my card. The script looks like this:



cd ~/acpi_call
sudo insmod acpi_call.ko
sudo ./test_off.sh
echo VGA card dead
exit


Now, I am trying to make my system run this script every time my computer boots, so I don't have to do it manually every time.



I don't have the experience to change anything to my system without at least some guidance, because I think it's highly likely I will mess everything up, and I have no idea how to clean up my mess, so I haven't really tried anything, but I am reading that adding my script to the /etc/rc.local file will get the job done.



Is that true or is there something else I have to try?



---- EDIT -----



I use ubuntu 11.10, sorry for not mentioning that.


More From » 11.10

 Answers
2

You could run your script file as a Startup Application (System - Preferences - Startup Applications in Ubuntu 10.04 LTS - not sure where the equivalent is in 11.10).



For example, to run the inosync utility on bootup, I added an entry in Startup Applications with



Name=inosync
Command=/home/toaster/inosync.sh
Comment=Mirror DataDisk to Barracuda_01


The bash script file inosync.sh must be enabled to execute. This can be achieved using sudo nautilus in Terminal, navigating to the file, right-clicking and selecting Properties, going to the Permissions tab, and checking "Allow executing file as a program".


[#40108] Thursday, August 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wheance

Total Points: 314
Total Questions: 96
Total Answers: 112

Location: Benin
Member since Thu, Aug 12, 2021
3 Years ago
;