LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-02-2007, 10:01 AM   #1
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 431

Rep: Reputation: 32
How to ensure that a script start before kde starts?


Hi,
I have finally sorted out all the issues concerning bringing synaptics touchpad in my Acer Aspire 5100 to life, thanks to the learned members of this forum! It took me a long time but it is definitely worth the effort. My question is - in order to make synaptics work, I have to remove the module psmouse and reload it once again before starting X, otherwise startx will crash, dumping me to the command prompt. I do it by executing the following script -
Quote:
#!/bin/bash
sudo /sbin/modprobe -r psmouse
sudo /sbin/modprobe psmouse
before entering runlevel 4 (I am using Slackware 11).
I have to do this manually.
If I call this script from .bashrc, it is of no use because, .bashrc is not being executed automatically when I log in. I have to mannually do -
Quote:
$. .bashrc
Moreover if I want to directly go into runlevel 4 without first getting into runlevel 3 (by making the necessary changes to /etc/fstab) then the above script will not be executed before starting X.
So how do I ensure that this script is executed before X starts.
 
Old 06-02-2007, 10:17 AM   #2
Eternal_Newbie
Member
 
Registered: Jun 2005
Location: The Pudding Isles
Distribution: Slackware 13.37
Posts: 573

Rep: Reputation: 58
Have you tried putting the script in /etc/rc.d/, making it chmod +x and calling it from /etc/rc.d/rc.local ? That is the usual procedure for user scripts that have to run at boot.
 
Old 06-02-2007, 10:22 AM   #3
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Not sure of your issue with the touchpad but here is my /etc/X11/xorg.conf for my Acer 5100-5840.
Code:
# Xorg configuration created by system-config-display

Section "ServerLayout"
	Identifier     "single head configuration"
	Screen      0  "Screen0" 0 0
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "Synaptics" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
	Load  "dri"
	Load  "extmod"
	Load  "glx"
EndSection

Section "ServerFlags"
	Option	    "AIGLX" "off"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
EndSection

Section "InputDevice"
	Identifier  "Synaptics"
	Driver      "synaptics"
	Option	    "Device" "/dev/input/mice"
	Option	    "Protocol" "auto-dev"
	Option	    "Emulate3Buttons" "yes"
#	Option	    "TouchpadOff" "2"
	Option	    "UseShm" "true"
EndSection

Section "Monitor"

 ### Comment all HorizSync and VertSync values to use DDC:
	Identifier   "Monitor0"
	ModelName    "LCD Panel 1280x800"
	HorizSync    31.5 - 90.0
	VertRefresh  59.9 - 60.1
	Option	    "dpms"
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "fglrx"
	Option	    "Centermode" "off"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1280x800" "1152x864" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "DRI"
	Group        0
	Mode         0666
EndSection

Section "Extensions"
	Option	    "Composite" "False"
EndSection
I would either use one of the existing service scripts in /etc/init.d as a reference and make your own and start it as S99 in your run level 3 and 4. Probably name it it starting withj an ' a '. Example s99afix.
 
Old 06-03-2007, 03:42 AM   #4
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 431

Original Poster
Rep: Reputation: 32
Thanks Eternal_Newbie, I put the script in /etc/rc.d and called it from /etc/rc.d/rc.local as u suggested. It is working like a charm.

Thanks for your xorg.conf Brian, I was having problems withe fglrx drivers as well, I'll try out you xorg.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE starts on :0.0 and :0.1, to start only on :0.0 ..? RedDwarf Linux - Software 1 02-13-2005 12:36 AM
How do I start a program automatically when KDE starts up? zmaint Linux - Software 8 12-21-2004 04:52 PM
How to start programs when KDE starts CodeWarrior Linux - Software 5 02-09-2004 04:54 PM
kde start script not found Elemuy Slackware 6 12-24-2003 05:05 AM
Programs start when KDE starts face_master Linux - Software 1 07-20-2003 01:36 AM


All times are GMT -5. The time now is 07:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration