Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-02-2007, 11:01 AM   #1
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 434

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

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 -
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 -
$. .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, 11:17 AM   #2
Registered: Jun 2005
Location: The Pudding Isles
Distribution: Slackware
Posts: 573

Rep: Reputation: 59
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, 11:22 AM   #3
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

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

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

Section "Files"

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

Section "ServerFlags"
	Option	    "AIGLX" "off"

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

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

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"

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

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

Section "DRI"
	Group        0
	Mode         0666

Section "Extensions"
	Option	    "Composite" "False"
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, 04:42 AM   #4
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 434

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.


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 01:36 AM
How do I start a program automatically when KDE starts up? zmaint Linux - Software 8 12-21-2004 05:52 PM
How to start programs when KDE starts CodeWarrior Linux - Software 5 02-09-2004 05:54 PM
kde start script not found Elemuy Slackware 6 12-24-2003 06:05 AM
Programs start when KDE starts face_master Linux - Software 1 07-20-2003 02:36 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:20 PM.

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