PDA

View Full Version : Automate KDM at startup



regday
09-25-2004, 05:18 PM
As a total newbie to Linux I tried the Knoppix CD and was sufficiently impressed to trash an old Win2000 system and do an install to harddisk. I installed Knoppix via the knoppix-installer but it threw up some error message right near the end and black-screened almost immediately so I couldn't read them, or for that matter do anything about it. I repeated the installation but the same happened again so I rebooted minus the CD just in case and to my surprise up came a commandline interface. I logged in as root and ran KDM. Everything seemed ok apart from the login buttons being in what appeared to be some foreign script but hitting enter got me into the KDE environment and I've been able to successfully setup my major apps. However, I would really like to automatically start the KDM login.

I've been reading a lot of Linux material, much at this stage reading like a foreign language, and think the /etc/init.d/xdm script is the key(and I guess login as root to edit it?), but don't know how to modify this to run KDM, can someone please help(I'll happily post my current file if necessary). Feel free to tell me I've got it hopelessly wrong as long as you can offer a solution!

Reg

Markus
09-25-2004, 05:35 PM
You could check /etc/inittab to see if runlevel 5 (graphical) is the default, should have a line like:
# The default runlevel.
id:5:initdefault:
Also check /etc/rc5.d to see if KDM is started, you don't need XDM, you should have a line like:
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S99kdm -> ../init.d/kdm
If not, do: update-rc.d kdm defaults
BTW, you can remove XDM with: update-rc.d -f xdm remove

That said, you should boot the CD with the testcd cheatcode to see if it's ok, the installer could have left you with an incomplete install. Try installing from Ctrl-Alt-F1 instead of doing it from a GUI.

regday
09-25-2004, 06:28 PM
You could check /etc/inittab to see if runlevel 5 (graphical) is the default, should have a line like:
# The default runlevel.
id:5:initdefault:


Checked and this is OK



Also check /etc/rc5.d to see if KDM is started, you don't need XDM, you should have a line like:
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S99kdm -> ../init.d/kdm
If not, do: update-rc.d kdm defaults
BTW, you can remove XDM with: update-rc.d -f xdm remove


I'm using the KDE interface as being new to Linux I'm not yet comfortable with the shell/commandline. Using Konqueror in my /etc/rc5.d I have two files and s99.kdm has a link attribute of ./init.d/kdm, and I'm assuming that this is the same thing?

I've just tried changing the line
HEED_DEFAULT_DISPLAY_MANAGER=true
to false as commented in the s99.kdm file but with no joy.



That said, you should boot the CD with the testcd cheatcode to see if it's ok, the installer could have left you with an incomplete install. Try installing from Ctrl-Alt-F1 instead of doing it from a GUI.

I did do the instal from the commandline and not a GUI, and running the testcd option gave a clean bill of health, but thanks for the suggestion.

Thanks for taking the time to respond, and all other suggestions welcomed.

Reg

Markus
09-25-2004, 08:17 PM
I'm using the KDE interface as being new to Linux I'm not yet comfortable with the shell/commandline. Using Konqueror in my /etc/rc5.d I have two files and s99.kdm has a link attribute of ./init.d/kdm, and I'm assuming that this is the same thing? What do you mean with two files? Mine looks like this:
markus@fujibox:~$ ll /etc/rc5.d
total 0
lrwxrwxrwx 1 root root 18 Apr 28 19:58 S10sysklogd -> ../init.d/sysklogd
lrwxrwxrwx 1 root root 15 Apr 28 19:58 S11klogd -> ../init.d/klogd
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S14ppp -> ../init.d/ppp
lrwxrwxrwx 1 root root 18 May 31 22:08 S18quotarpc -> ../init.d/quotarpc
lrwxrwxrwx 1 root root 15 Apr 28 19:58 S20acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 14 Apr 28 19:58 S20alsa -> ../init.d/alsa
lrwxrwxrwx 1 root root 17 Apr 28 19:58 S20makedev -> ../init.d/makedev
lrwxrwxrwx 1 root root 19 Aug 3 11:49 S20pppstatus -> ../init.d/pppstatus
lrwxrwxrwx 1 root root 13 May 1 15:17 S20xfs -> ../init.d/xfs
lrwxrwxrwx 1 root root 16 May 16 19:45 S20xprint -> ../init.d/xprint
lrwxrwxrwx 1 root root 15 Sep 12 18:20 S21aumix -> ../init.d/aumix
lrwxrwxrwx 1 root root 18 May 21 20:24 S35whereami -> ../init.d/whereami
lrwxrwxrwx 1 root root 14 Apr 28 19:58 S89cron -> ../init.d/cron
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S99kdm -> ../init.d/kdm
lrwxrwxrwx 1 root root 19 Apr 28 19:58 S99rmnologin -> ../init.d/rmnologin

shah
09-26-2004, 05:19 AM
Do a reinstall from gui (kde). :D

regday
09-26-2004, 10:04 AM
I'm using the KDE interface as being new to Linux I'm not yet comfortable with the shell/commandline. Using Konqueror in my /etc/rc5.d I have two files and s99.kdm has a link attribute of ./init.d/kdm, and I'm assuming that this is the same thing? What do you mean with two files? Mine looks like this:
markus@fujibox:~$ ll /etc/rc5.d
total 0
lrwxrwxrwx 1 root root 18 Apr 28 19:58 S10sysklogd -> ../init.d/sysklogd
lrwxrwxrwx 1 root root 15 Apr 28 19:58 S11klogd -> ../init.d/klogd
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S14ppp -> ../init.d/ppp
lrwxrwxrwx 1 root root 18 May 31 22:08 S18quotarpc -> ../init.d/quotarpc
lrwxrwxrwx 1 root root 15 Apr 28 19:58 S20acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 14 Apr 28 19:58 S20alsa -> ../init.d/alsa
lrwxrwxrwx 1 root root 17 Apr 28 19:58 S20makedev -> ../init.d/makedev
lrwxrwxrwx 1 root root 19 Aug 3 11:49 S20pppstatus -> ../init.d/pppstatus
lrwxrwxrwx 1 root root 13 May 1 15:17 S20xfs -> ../init.d/xfs
lrwxrwxrwx 1 root root 16 May 16 19:45 S20xprint -> ../init.d/xprint
lrwxrwxrwx 1 root root 15 Sep 12 18:20 S21aumix -> ../init.d/aumix
lrwxrwxrwx 1 root root 18 May 21 20:24 S35whereami -> ../init.d/whereami
lrwxrwxrwx 1 root root 14 Apr 28 19:58 S89cron -> ../init.d/cron
lrwxrwxrwx 1 root root 13 Apr 28 19:58 S99kdm -> ../init.d/kdm
lrwxrwxrwx 1 root root 19 Apr 28 19:58 S99rmnologin -> ../init.d/rmnologin

I used the terminal prog and got :-
rday@Linux1:~$ ll /etc/rc5.d
total 0
lrwxrwxrwx 1 root root 16 2004-09-24 11:57 S20cupsys -> ../init.d/cupsys
lrwxrwxrwx 1 root root 13 2004-09-24 11:57 S99kdm -> ../init.d/kdm

Reg

regday
09-26-2004, 10:06 AM
Do a reinstall from gui (kde). :D

How would I do that?

Reg

shah
09-26-2004, 11:47 AM
Boot from cdrom, when presented with boot prompt, hit <enter> if you prefer kernel 2.4.26 or use cheatcodes which I would suggest:
knoppix26 alsa <enter>

Knoppix will load to kde.
Once in kde, open konsole by clicking "tv" icon at the bottom and type this command:
su <enter>
knoppix-installer <enter>

Follow instruction, you don't need to create any partition because you already has that. I would suggest you choose debian like hdd installation, it less problematic to me. Also choose to install lilo to mbr.
:D :D :D

regday
09-26-2004, 01:33 PM
Boot from cdrom, when presented with boot prompt, hit <enter> if you prefer kernel 2.4.26 or use cheatcodes which I would suggest:
knoppix26 alsa <enter>

Knoppix will load to kde.
Once in kde, open konsole by clicking "tv" icon at the bottom and type this command:
su <enter>
knoppix-installer <enter>

Follow instruction, you don't need to create any partition because you already has that. I would suggest you choose debian like hdd installation, it less problematic to me. Also choose to install lilo to mbr.
:D :D :D

If/When I decide to do a total reinstall I'll give your approach a try - thanks.

Reg

Markus
09-26-2004, 03:43 PM
Sorry to say, but a reinstall might be in order. What type of install did you choose: Knoppix, Beginner, Debian?
Does anything happen when you boot with your current install and do: sudo init 5
You could also try Ctrl-Alt-F7 (or F5)?
BTW, how much RAM do you have, and partition size of install?
If would be nice to know what error messages you got, can you find anything in /var/log?

teckjunkie
09-26-2004, 04:02 PM
For me it automatically does it if I do a debian install... if I do a beginner install it doesnt automatically load... the cheatcodes I use are

knoppix26 alsa lang=us 2

then just do the install... hope this helps...

EDIT:
sorry runlevel 2 will not boot in gui (but you can still run the install from there)
I never even thought about that Sorri.

kelmo
09-27-2004, 03:25 AM
Please do not install from runlevel 2 as previously suggested!

Markus
09-27-2004, 09:25 AM
Please do not install from runlevel 2 as previously suggested! It doesn't work? My bad in that case.

regday
09-28-2004, 08:28 PM
Boot from cdrom, when presented with boot prompt, hit <enter> if you prefer kernel 2.4.26 or use cheatcodes which I would suggest:
knoppix26 alsa <enter>

Knoppix will load to kde.
Once in kde, open konsole by clicking "tv" icon at the bottom and type this command:
su <enter>
knoppix-installer <enter>

Follow instruction, you don't need to create any partition because you already has that. I would suggest you choose debian like hdd installation, it less problematic to me. Also choose to install lilo to mbr.
:D :D :D

Tried the instal from KDE a number of times with a variety of error messages. The beginners install seemed to work but would then hang on reboot with some message about the ramdisk, but when I tried the Debian install it booted into a KDE environment after throwing up a number of erroe messages - they went by a little too quick to read them.. However, this install appears to be the best, although it left me to configure the network. Sorry it's taken a while to get back but thanks again for the help - time to get acquainted with the Unix commandline!!

Reg

jalexstark
09-29-2004, 07:16 PM
Well, booting with the CD in another machine across a network was impressive. HD install was not. I am trying to fix all the problems.

How come I get:

root@0[knoppix]# ls -al /etc/rc5.d/
total 12
drwxr-xr-x 2 root root 4096 Sep 28 16:18 .
drwxr-xr-x 150 root root 8192 Sep 29 13:59 ..
lrwxrwxrwx 1 root root 16 Sep 28 16:18 S20cupsys -> ../init.d/cupsys
root@0[knoppix]#


????

I used the mid-Sept 3.6 with a "Debian" hd install. I did not get many options - far fewer menus that configuration parameters mentioned.

Knoppix is in danger of getting a serious problem: popularity combined with terrible security (sudo, root login shells, etc) combined with no documentation!

Alex

champagnemojo
09-29-2004, 09:03 PM
Knoppix is in danger of getting a serious problem: popularity combined with terrible security (sudo, root login shells, etc) combined with no documentation!

Alex

There's documentation...the web's full of it. :wink: You have to set sudo up in knoppix before it works. So you don't have to enable it. And people don't have to look far to see people suggesting that users don't login as root. It's up to the user how secure it is...just like with Windows.

And alot of the configuration parameters for the hd-install are not in the gui. You have to edit the .knofig file.

jalexstark
09-30-2004, 05:33 PM
There's documentation...the web's full of it. You have to set sudo up in knoppix before it works. So you don't have to enable it. And people don't have to look far to see people suggesting that users don't login as root. It's up to the user how secure it is...just like with Windows.


Well, I am neither as clever nor as knowledgeable as you. For me, the mass of possibly-related information creates a fog. As I see it, the less that Knoppix's security is like Windows, the better.

The problem that I have is that the key HOWTOs and installer instructions did not guide me where I wanted to go. This was from terminal server boot to a HD install with a standard (KDM?) login (also to users with a home dir, the network running, and avoiding the major security risks).

I added my question to this thread because I was suffering from a (to me) curious lack of entries in my rc5.d directory. Plus I saw lots of worrying errors and warnings during install.

Maybe you could give me the benefit of your knowledge and point me to something that will guide an all-too ordinary user through the setup. I cannot be the only one having these difficulties, given the activity on this forum, but I would be willing to make a start at list of suggested tweaks, configurations and actions.

Alex.

Rain7
10-04-2004, 06:12 AM
I'm having troubles also. KDM won't start after hd-install

http://www.knoppix.net/forum/viewtopic.php?t=13848