Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How to auto-run commands
New Posts  All Forums:Forum Nav:

How to auto-run commands

post #1 of 8
Thread Starter 
I was playing with Fedora 18 and found that I can enable 2-finger scrolling by entering the following commands in terminal under root:
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48

However, when the system is turned off I have to enter the commands again to get my 2-finger scrolling back. I have spent many hours trying to get the system to auto-run these commands after startup but I really can't figure out how to do it. I only know very little about these kinds of things, any thoughts?
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
post #2 of 8
Quote:
Originally Posted by OCScrub View Post

I was playing with Fedora 18 and found that I can enable 2-finger scrolling by entering the following commands in terminal under root:
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48

However, when the system is turned off I have to enter the commands again to get my 2-finger scrolling back. I have spent many hours trying to get the system to auto-run these commands after startup but I really can't figure out how to do it. I only know very little about these kinds of things, any thoughts?

I'm not totally familiar with Fedora 18 or the desktop environment you're using but you should be able to add scripts or applications to run when you login (Ubuntu calls it "Startup Applications" I believe). At any rate once you find that utility the way to do it would be to put the following into a shell script and then create a custom startup action that runs the script on startup.
Code:
#!/bin/bash
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48
post #3 of 8
Thread Starter 
I used gnome-session-properties command to add a new startup application. The application has it's command linked to a file in /etc/init.d/ that contained:
#!/bin/bash
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48

I made sure the new application was selected and restarted the system, no dice.
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
post #4 of 8
Why don't you configure Synaptics directly

/etc/X11/xorg.conf.d/10-synaptics.conf

Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "VertTwoFingerScroll" "on"
Option "HorizTwoFingerScroll" "on"
Option "EmulateTwoFingerMinZ" "48"
Option "EmulateTwoFingerMinW" "5"
EndSection
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
post #5 of 8
Thread Starter 
Forgot to mention, I already changed that (though my file was 50-synaptics.conf)
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
post #6 of 8
Quote:
Originally Posted by OCScrub View Post

Forgot to mention, I already changed that (though my file was 50-synaptics.conf)
Sounds like it might be a bug or something then if that file isn't being read or obeyed. When you just boot up the system, without doing anything else, do you see the config options you added to the config file when you run
Code:
synclient -l
post #7 of 8
Thread Starter 
Running "synclient -l" shows a long list of settings.

Option "EmulateTwoFingerMinZ" "48"
Option "EmulateTwoFingerMinW" "5"

are both listed with a value of 10, instead of the values I have defined.
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
Hex
(11 items)
 
OLD C2D
(8 items)
 
 
CPUMotherboardGraphicsRAM
Xeon X5660 ASUS Sabertooth x58 Diamond 7970  Kingston 
Hard DriveOptical DriveCoolingOS
WD Black Blu-ray :) Win 7 64-bit 
PowerCaseAudio
HX750 (modular) Antec 300  Sound Blaster Titanium  
CPUMotherboardGraphicsRAM
E6400 Intel D975XBX2 EVGA 8800 GT 4 GB 
Hard DriveCoolingOSPower
Seagate Coolmaster N520 Win 7  550 W 
CPUMotherboardGraphicsRAM
Athlon x2 4200 Asus M2N32-SLI Deluxe 3870 2 x 2 Gb 
Hard DriveOSPower
320 Gb Windows Vista 64-bit 550 W Modular 
  hide details  
Reply
post #8 of 8
Quote:
Originally Posted by OCScrub View Post

Running "synclient -l" shows a long list of settings.

Option "EmulateTwoFingerMinZ" "48"
Option "EmulateTwoFingerMinW" "5"

are both listed with a value of 10, instead of the values I have defined.

That really doesn't make any sense to me. It's like it isn't reading the file or something. Might not be a bad idea to report it as a bug.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How to auto-run commands