LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-15-2004, 10:35 AM   #1
TChris
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Rep: Reputation: 0
Post KDM starting of X


Hi,

I've written a python script that allow users to choose between different X configuration (for example internal/external screen of a laptop, TV-out, ...). Now I would like this script to be run before server x and before kdm when linux is starting up and when i restart X server (ctrl-alt-backspace).

Where do I call/put this script ?

Thanks

Christophe
 
Old 02-15-2004, 02:02 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Where do I call/put this script ?"

You need to put the script in runlevel 5 initialization. The runlevel initialization scripts are written by the distributor and they are different from distributor to distributor. I will describe how to do it in Fedora. Mandrake is very similar to Fedora so you can probably tailor what I have to say to Mandrake.

/etc/inittab contains a table of what scripts to run to initialize each runlevel. Runlevel 5 is run with X11. On Fedora specifying runlevel 5 results in all of the scripts in /etc/rc.d/rc5.d being run in alphabetical order. The last script in the list is S99local which is used for user addons to runlevel 5.

The first place that I would try the script is in /etc/rc.d/rc5.d/S99local.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 02-15-2004, 04:11 PM   #3
TChris
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy Yes but ...

Hi,

Ok but first, if I put the script in rc5.d/S99local, the script is launched but it does not block the starting process. In other words, my script is launched and before I can do anything else, X is started. If I go to screen 1 (ctrl-alt-F1), I can see the menu of my script but x is now started. Second, when I will restart x (for example I want to use my external screen), I don't want to restart my system but only X.

Any other idea,

Chris
 
Old 02-15-2004, 05:55 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Any other idea,"

Another possibility is the startx script, /usr/X11R6/bin/startx. Your startx script should contain a xinit command. You could try inserting your script into startx just ahead of the xinit command.

Another possibility is to rename startx to startx2. Then name your script startx and make the last command in your script startx2.

Does your script change XF86Config? If it does then how does it take care of the problem of two different users wanting to start X at the same time with two different configurations?

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 02-16-2004, 02:49 AM   #5
TChris
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Post Change of XF86Config

I've two versions of my script. One uses a symbolic link to the selected XF86ConfigXXX and the other uses XF86Config layout.

startx --layout ...

I'll try your suggestion and tell you if it's ok.

Thanks,

Chris
 
Old 02-16-2004, 06:51 AM   #6
TChris
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Smile Run level 4 is the quasi solution

Hi,

Booting mandrake in runlevel 4 (not use by mandrake) and adding the line

x:4:respawn:startXMenu

with startXMenu :

myscript
kdm -nodaemon

executes my script and then launches KDM.

It's OK when I boot linux. Now I would like to have the same behaviour when I use ctrl--backspace.

Any idea ?

Thanks,

Chris
 
Old 02-16-2004, 05:08 PM   #7
TChris
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Angry Ahrrrrrrrrrrrrrrrrrrrrrgggggggggg

Why it is always so complicated !!!!!!!!!!!!!

I just want to run a script that let me choose from several x configurations before starting kdm and it is IMPOSSIBLE !!!

I try anything:

Adding line into startx, xinit, prefdm, kdm, rc5.d/S30dm, ...

Runing in runlevel 4 with an explicit call to my script, ...

...

It just does not work !

Kdm is always launch and my script does not !!!

PLEASEEEEEEEEE HELP !

Another day and I'll go back to Windows (At least, I can choose in Windows which configuration of screen I use).

HELP ME !

Chris
 
  


Reply



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
Starting up KDM instead of GDM? vbraun Fedora 9 01-19-2007 11:14 AM
Trouble starting Synaptic after KDM install dhatcher Debian 8 06-03-2005 09:21 PM
starting kde through kdm ulmo Linux - Newbie 2 09-12-2004 07:45 AM
kdm is starting up on tty2 instead of tty7 peterrobin Linux - General 7 09-02-2004 03:05 AM
problem with starting kdm: /dev/apm_bios severinw Linux - Newbie 1 11-01-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration