LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to change permanently a script in etc (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-permanently-a-script-in-etc-804712/)

joham34 04-28-2010 04:46 AM

how to change permanently a script in etc
 
Hello everybody.
Newbie but Linux enthousiast here.
I play MAME in Ubuntu 9.10 and every time i boot my PC I calibrate my joystick with jscal. The correction values are stored in a script ( /etc/joystick.cal ) but when I reboot, the old values are written again in so I have either to repeat calibration or open the script and give the right correction values (which I have stored somewhere).
So , what is the way to save my changes in this script permanently ?
Thanks in advance

catkin 04-28-2010 05:01 AM

The location and name of /etc/joystick.cal suggest that it is a configuration file, not a script. There's some info about setting up joysticks on ubuntu here.

joham34 04-28-2010 05:52 AM

Quote:

Originally Posted by catkin (Post 3950364)
The location and name of /etc/joystick.cal suggest that it is a configuration file, not a script. There's some info about setting up joysticks on ubuntu here.

I have already tried jscalibrator, didnt work for me . jscal works fine but I have to repeat calibration after boot, this is the issue

onebuck 04-28-2010 07:49 AM

Hi,

Quote:

Originally Posted by joham34 (Post 3950423)
I have already tried jscalibrator, didnt work for me . jscal works fine but I have to repeat calibration after boot, this is the issue

Why not just save the calibration data or backup the '/etc/joystick.cal' in '/etc/joystick.cal-restore' file then just copy that back to '/etc/joystick.cal' after a boot.

catkin 04-28-2010 08:12 AM

Quote:

Originally Posted by onebuck (Post 3950546)
Why not just save the calibration data or backup the '/etc/joystick.cal' in '/etc/joystick.cal-restore' file then just copy that back to '/etc/joystick.cal' after a boot.

Simple but effective workaround :) Could be done during the boot, that is by a boot script.

joham34 04-29-2010 12:18 AM

Really simple and effective!
 
Yes, it solved the problem. Thank you

onebuck 04-29-2010 07:52 AM

Hi,

Glad it worked.

Please mark the post as [Solved] via the Thread Tools.

:hattip:


All times are GMT -5. The time now is 11:24 AM.