PDA

View Full Version : Making kdm appear by default on login



clintonian
03-11-2003, 03:12 AM
Hello everyone - long time lurker and knoppix writer, new contributor/question asker...

Anyway,

I have nearly gone crazy and exhausted all sources of info for this one. I have two versions of knoppix KDE that I have been modifying. One version boots to the kdm login screen and the other logs in to the desktop as per usual. I simply CANNOT figure out exactly where the diffrence lies. I have a new build and I want to make the login via kdm rather than just logging in to the desktop, but I cannot figure out how. Any ideas? I'm going crazy with this.

I looked at init.d/knoppix-autoconfig, inittab, etc. to no avail.

Thanks a MILLION to anyone who can help.

Clint [/b]

clintonian
03-11-2003, 08:07 PM
I find it hard to believe that no one has encountered a need/desire to try have the gui kdm logon. Anyway, if you have any ideas, please let me know where I can change this. I thought about changing the last line in inittab from xsession start to kdm -nodaemon or something the like. Any ideas?

Clint

A. Jorge Garcia
03-11-2003, 08:52 PM
Well, I'm waiting on a new LAN to be installed at my school. At that point I will run knx-hdinstall to install KNOPPIX to the hard-disks and set up a server everyone logs-in to via KDM.

I'm not clear how you would set up such a network with only CDs?

Regards,

clintonian
03-11-2003, 09:25 PM
Hopefully giving an explanation for why I need the function will make the request just, thus spur replies. I am making an edition for doing non-intrusive searches of suspect computer systems in a law enforcement capacity. I would like to be able to have the clean login screen appear and give the user (investigator) different login environments depending on the different situations. I know how to accomplish this if I am doing a hard drive install of knoppix - then it becomes trivial. The hard part is trying to get this done on the cd boot. That said, as my original post indicated, I HAVE made one version and through I know not by what means, the CD boots to kdm. I can't see why it does in order to replicate it.

Clint

David Douthitt
03-12-2003, 02:41 AM
kdm (or gdm, or xdm) is normally started via /etc/inittab in run level 5. In Knoppix, run level 5 runs "startx" as knoppix instead.

To get a proper kdm environment, you'd have to configure kdm (obviously) then change the inittab to reflect what you want.

You can use the boot process to run a knoppix.sh script on the floppy drive (and with 3.2, perhaps on a hard drive or USB drive?). This script could use rsync with the backup options to copy the new /etc/inittab into place, then change runlevels. Seems pretty brutal, but it would work.

The reason it has to be brutal (in some way or other) is because /etc/init is the first job created by the kernel, and then run. Once it is running, changing the contents of /etc/inittab are not reflected by init.

Changing the init level would be:

init 4

...or whatever you choose. You could also re-use run level 5 and just make sure that the startx process initially started by runlevel 5 doesn't exit cleanly (otherwise, it'll reboot!).

Now that I think about it.... when knoppix.sh runs, startx has not yet started: changing /etc/inittab and telling init to reload init 5 just might work:

telinit q

Not sure. Try it (or I will) :-)

clintonian
03-12-2003, 06:03 AM
Exactly where is the divergence point during boot when the system would say "execute kdm" rather than "execute startx" I have looked everywhere. Man - this shouldn't be this hard...

David Douthitt
03-12-2003, 03:48 PM
Exactly where is the divergence point during boot when the system would say "execute kdm" rather than "execute startx" I have looked everywhere. Man - this shouldn't be this hard...

No it shouldn't...


kdm (or gdm, or xdm) is normally started via /etc/inittab in run level 5.

So, translating even further:

1. Do a "man inittab" and read the manual page ("manpage") of inittab and its format. Unfortunately, it doesn't seem that "man kdm" will be of any use - it should be, but it isn't (kdm is undocumented - sigh)...

2. Open /etc/inittab in your favorite editor (I use vi - and proudly, too!).

3. Edit the line which is run for run level 5 and which runs startx.

4. Change this line (which runs startx) to run kdm instead. It looks as if kdm should take a "-nodaemon" option; I'd recommend using it - it's probably needed.

After having done this, if you want this preserved for use with a CDROM distribution, then you need to either burn a new CD with this new configuration or save the configuration somewhere so that it can be loaded during boot.

clintonian
03-12-2003, 10:33 PM
thanks for the info. as soon as I get a chance, I will test it out. It is the last line in the script and it says something like:

"blah blah.. xsession start"

I'm not where I can see the line right now... anyway, this is where I take it I change to something like:

/usr/bin/kdm -nodaemon?

Thanks for your assistance - I'll give it a shot asap.

Clint