LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Runlevel 3 and 4 startup configs (https://www.linuxquestions.org/questions/linux-software-2/runlevel-3-and-4-startup-configs-127238/)

ghight 12-19-2003 08:37 AM

Runlevel 3 and 4 startup configs
 
Okay, I'm sure there is a catalog of info out there that would sum this up in about 400 pages, but I'm looking very generally here. Heres my situation:

I use Slackware at home and want to make it easier on my family to use so I set the default runlevel in the inittab file to 4 to bring up a graphical login. When I use the standard runlevel 3, I log in at the CLI and type startx. When I do, KDE starts up and my konsole bash prompt is nice and clear. However, when I change to runlevel 4 and login at the graphical login screen, I can change the session to KDE or XFCE from the default GNOME which is fine, but I lose my nice bash prompt in Konsole. When I change inittab back to 3 I get the nice CLI back.

Can somebody sum up which file I'd need to edit to get KDE to be the default session from the Graphical login and how do I get my nice bash prompt back in runlevel 4?

Thanks in advance,

trickykid 12-19-2003 08:56 AM

Well you'd want to edit your KDM or GDM config file, whichever one your using to set the default, maybe just even remove the others so they only see or can choose KDE.

You could also create each user a .bash_login file in their home directory and simply put "startx" in it. When the login at the console prompt after booting, it will startx automatically and start whatever you've set as their default WindowManager/Desktop, etc?

ghight 12-19-2003 09:37 AM

Its the login with the sunflower on it and the buttons look "GMONE-y" so I think its GDM. I see where I can edit the list of available sessions, but one would think they could add that to "gdmsetup". That's a topic for another day.

I did notice that I don't have a .bashrc file in my home directory. Does Slackware look at that and is that where I can add my bash prompts? Do you know what I'd need to do have a .bashrc file automatically configured when I setup a new user?

I know I'm straying a little, but I'm really getting into Slackware after years of RedHat. Its funny becuase I know Slack users are typically CLI-jockeys, but I find Slack much easier to configure in X without the dedicated config programs than with anything else RedHat ever offered. Now if I just hadn't trained our 3 new "associate administrators" on RedHat maybe the world could be a slightly better place. Webmin needs work for Slackware too, but I'm working on that as we speak.

trickykid 12-19-2003 09:54 AM

Yes, if you have a .bashrc file Slackware will look at that but if you wanted to have it startx for each member when the login, you will want to create the file .bash_login and just simply add startx in the file, so when the user logs in, they will immediately start X and no longer be staring at the CLI.

cd /home/$USER/
touch .bash_login
vi .bash_login
Code:

#!/bin/bash

startx
~
~

logout

And then relogin to test... :)

ghight 12-19-2003 10:27 AM

Thanks! As if you are reading my mind, I do like to have the option of working from the console if I need to do some down and dirty stuff. I had pretty much resigned myself to just using Konsole and let that be it. This would be a good way me to have the CLI and also to get the kids into X without much hassle.

A work around I thought about too was loading gdm in rc.local so I could just do runlevel 3 which picks up the bash prompt. Is there anything bad about that?

However, for curiosity sake, I'd still like to figure out why runlevel 4 doesn't read the system wide prompt setup in /etc/profile. It's as though it's skipping it all together. I loaded kdm and it does the same thing.


All times are GMT -5. The time now is 12:30 PM.