LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2003, 04:24 PM   #1
robertjay
LQ Newbie
 
Registered: Sep 2003
Location: Milwaukee, WI
Distribution: Mandrake 9.1, ClarkConnect 1.3
Posts: 12

Rep: Reputation: 0
Question Run level issue after first login


I am a linux newbie, in every sense of the word. I'm trying to *ween* myself off of the microsoft nipple, and really looking forward to it. So if this has been discussed, I am sorry for the repetition, but I searched and searched, and couldn't find anything.

I just loaded Mandrake 9.2 on my Gateway Solo 9550 laptop. It works fantastic.....the first time I login. I'm running KDM Manager, and KDE.

My problem is, when I logout to switch users, I click on "logoff robert", click the radio button to login as a different user and click "OK". Instead of taking me to my KDM login window, it *punts* me out to my graphical terminal interface (runlevel3 I believe). I have to login in the terminal as root, then type KDM to get back to my KDM login window. Then, when I log back in as any user, other than root, I have no sound (it works perfect for root), I get a warning window that says I don't have permission to access /dev/dsp. Sure enough, when I check permissions of /dsp, it is given to root, and I can't do anything with it.

I can logout and log back in as root (after the initial *punt* to runlevel3, it won't do that anymore after the first logon of a reboot), change the permission for dsp to nobody and then all other users can have sound again.

This is really no problem for me, just real annoying, but I am also trying to *ween* my wife from Microsoft too, and it doesn't help when things don't work as smooth as they can.

Like I said, I'm a newb, any assistance would be greatly appreciated.

Thanks in advance,
Robert


Last edited by robertjay; 09-15-2003 at 08:48 PM.
 
Old 09-15-2003, 05:59 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"I can logout and log back in as root (after the initial *punt* to runlevel3, it won't do that anymore), change the permission for dsp to nobody and then all other users can have sound again."

Instead of doing that try changing permissions like this
chmod 777 /dev/dsp
 
Old 09-15-2003, 09:09 PM   #3
robertjay
LQ Newbie
 
Registered: Sep 2003
Location: Milwaukee, WI
Distribution: Mandrake 9.1, ClarkConnect 1.3
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the reply jailbait!

Typing chmod777 /dev/dsp works too, but my problem is that I have to do it at all.

It would be nice to be able to go in as one user, hit logout, then be able to signon as another user. Instead of booting me out to runlevel3, then having to manually startup KDM again.

Anyone have a hint why I only get one good, correct, login? Maybe I should just work on this problem first, before I go trying to fix my sound issues.

Thanks again,
Robert
 
Old 09-15-2003, 09:28 PM   #4
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
You can start kde, or whatever your default gui is, by simply startx as a normal user. So login as a norma user and then do
startx
No need to do the detour over kdm. Might speed up things a bit for the meantime.

I don't know how good or bad it is to do chmod 777 /dev/dsp. The reason why you usually cannot use the sound device after logging in as root is that normally only *one* user can access the device at any given time. Since you login as root, no other user is then allowed to access the card. You can avoid this by logging in as normal user and using the su command to become root - then root is the one who cannot access /dev/dsp.

When you manually start KDM you should have the text screen from which you started available on ctrl-alt-F1 (if not, try F1 thru F6; it must be there on one of these). If you log out of KDM the way you describe, are there any error messages that appear on the text screen you get by pressing ctrl-alt-F1?
 
Old 09-15-2003, 11:48 PM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Whats the content of your /etc/inittab file?
 
Old 09-15-2003, 11:57 PM   #6
robertjay
LQ Newbie
 
Registered: Sep 2003
Location: Milwaukee, WI
Distribution: Mandrake 9.1, ClarkConnect 1.3
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the reply guys.

quatsch, I don't know how bad using the chmod command is, it just gets reset everytime I reboot the system. I've tried to do some reading on permissions, but I haven't found a good place to start, so far what I've read is over my head unfortunately.

I don't get any errors using ctrl-alt F1.

Demonbane, here's the whole thing:

#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by Mandrake Linux are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Thanks guys!
Robert

Last edited by robertjay; 09-16-2003 at 12:08 AM.
 
Old 09-16-2003, 12:09 AM   #7
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
maybe it's a bug in kdm. mdk9.2. is not yet final yet. But to see if I'm getting the problem. You boot, get to the login manager, login, logout and kdm shuts down. you start kdm manually after this, and you can log in and log out without kdm shutting down. Is this right?

You can check which run level you're in with the command
runlevel
you have to be root to do this. The second number tells you the current runlevel. If you're in runlevel 3 after kdm shuts down, do
init 5
as root. This will get you back to runlelvel 5 and start kdm. I suspect that when you do this kdm will shutdown when you log off.
One thing you might do is to remove K09dm from /etc/rc3.d and copy the S09dm which is in /etc/rc5.d This will have kdm started in runlelvel 3. You will then have to go to runlevel 2 to get rid of it.

BTW, your inittab looks fine

Last edited by quatsch; 09-16-2003 at 12:11 AM.
 
Old 09-16-2003, 12:18 AM   #8
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
also, if you do make changes to the /etc/rc3.d as I suggest, you'll have to edit the /etc/inittab. the line

id:5:initdefault:

needs to be changed to
id:3:initdefault:
 
Old 09-16-2003, 12:22 AM   #9
robertjay
LQ Newbie
 
Registered: Sep 2003
Location: Milwaukee, WI
Distribution: Mandrake 9.1, ClarkConnect 1.3
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by quatsch
maybe it's a bug in kdm. mdk9.2. is not yet final yet. But to see if I'm getting the problem. You boot, get to the login manager, login, logout and kdm shuts down. you start kdm manually after this, and you can log in and log out without kdm shutting down. Is this right?
Absolutely correct

Quote:
You can check which run level you're in with the command
runlevel
you have to be root to do this. The second number tells you the current runlevel. If you're in runlevel 3 after kdm shuts down, do
init 5
as root. This will get you back to runlelvel 5 and start kdm. I suspect that when you do this kdm will shutdown when you log off.
One thing you might do is to remove K09dm from /etc/rc3.d and copy the S09dm which is in /etc/rc5.d This will have kdm started in runlelvel 3. You will then have to go to runlevel 2 to get rid of it.

BTW, your inittab looks fine
I can remove the K09dm file from rc3.d, but I don't have a S09dm file in rc5.d, the closest thing is s05harddrake.

Thanks quatsch.
 
Old 09-16-2003, 12:26 AM   #10
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
oops. maybe the number is wrong. There should be a thing called
Sxxdm where xx is a number in your rc5.d. Copy that over to /etc/rc3.d If there isn't such a thing, could you post the contents of your /etc/rc5.d?
 
Old 09-16-2003, 12:27 AM   #11
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
actually, did you try see if

init 5

and

kdm

lead to different results? My suggestion is based on a hunch that they will lead to different results.
 
Old 09-16-2003, 12:52 AM   #12
robertjay
LQ Newbie
 
Registered: Sep 2003
Location: Milwaukee, WI
Distribution: Mandrake 9.1, ClarkConnect 1.3
Posts: 12

Original Poster
Rep: Reputation: 0
telinit 5 says "switching to runlevel 5", but never does. This is after I switched the files around and modified the inittab file.

If I type KDM, it starts up no problem, except for the no sound with regular non-root users.

I didn't realize 9.2 was not stable, I guess I should have known since they don't advertise it on Mandrake's website yet. Maybe I should try installing 9.1?

Thank You,
Robert
 
Old 09-16-2003, 01:04 AM   #13
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
If you do init 5, or init anything, it executes the scripts in /etc/rc5.d (or the corresponding thing for other runlevels). If you remove Sxxdm, kdm won't start. Should've explained it before. So if you put that back in to rc5.d, does
init 5
start kdm? If it does, how does kdm behave after logging out? BTW, do make backups before making changes.

When you start kdm using the command kdm, then you stay in whatever runlevel you are. So if you do it in runlevel 3, kdm will run at that runlevel. It seems to me that the problem for you is that somehow kdm does not want to run at runlevel 5. hence my suggestion to change things a bit. But I might be wrong about this.

Also, another way to start the login manager is to use the command
service dm start
(as root).

Do you get the sound problem when you first login as a normal user, then become root using su, and then start kdm?
 
Old 09-16-2003, 01:55 AM   #14
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Frankly I haven't used Mandrake before so I'm not sure why it doesn't use the /etc/inittab file to spawn the login manager, this may or may not help you but try removing(and backup) the service script that spawns kdm in /etc/rc5.d and add this to inittab:

x:5:respawn:/usr/bin/kdm -nodaemon

note your kdm executable might not be in /usr/bin/, change it to wherever it is. If it somehow stuffs something up boot into single user mode and undo the changes. Hope this helps.
 
Old 09-16-2003, 05:44 PM   #15
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
the sugestion by Demonbane might work but it might also lead to an endless loop of kdm crashes. The service dm is supposed to restart kdm after you log out and that seems to fail.
 
  


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
Run Level 3 webwolf70 Mandriva 5 01-17-2005 11:41 PM
What is run level? ejennings_98 Linux - Newbie 8 11-05-2003 05:46 PM
Run level Joey.Dale Linux - General 4 06-18-2003 05:59 PM
Run Level POWERBOOKM Linux - Newbie 2 12-01-2001 09:44 PM
run level isajera Linux - Software 2 06-22-2001 08:20 AM


All times are GMT -5. The time now is 10:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration