LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   startx automatically (http://www.linuxquestions.org/questions/slackware-14/startx-automatically-124880/)

free_andrew 12-11-2003 08:36 AM

startx automatically
 
Is there a way to have KDE start-up automatically, followed by a security/login prompt?


-Andrew

belial 12-11-2003 08:50 AM

Yep
 
Just add in

/etc/rc.d/rc.M

a following line:

kdm

This will be your graphical login

or add to

/etc/profile

startx

command

GrayGhost 12-11-2003 09:37 AM

You can edit /etc/inittab and set the default runlevel to 4 then edit /etc/rc/rc.d/rc.4 and put whichever login manager you want to use(GDM,KDM,XDM) at the beginning of the script.

fr0zen 12-11-2003 11:53 AM

Doesn't X normally run on level 5?

tipaul 12-11-2003 12:11 PM

inittab 5?
 
In Slackware, Runlevel 4 is multi-user (Graphical)...

I know that in RedHat, Mandrake and others, it's 5.... But it's not the case here...!

free_andrew 12-12-2003 09:35 AM

I've tried adding 'startx' to '/etc/profile'.

This isn't so bad - after the user logs in, Startx automatically starts.

Ideally, I'd like the computer to start-up within a GUI login. I don't mind the way I've got it working right now, but I want it to be easier for some of the other users.

What you've suggested below - will this boot me from power-on into a GUI login?


-Andrew



Quote:

Originally posted by GrayGhost
You can edit /etc/inittab and set the default runlevel to 4 then edit /etc/rc/rc.d/rc.4 and put whichever login manager you want to use(GDM,KDM,XDM) at the beginning of the script.

tipaul 12-12-2003 11:06 AM

inittab...
 
ABSOLUTELY!!!!

YOU MUST change the runlevel in /etc/inittab from :3: to :4: to get able the GUI login...

By default, GDM is the one that will be used... But if you want to change it to KDM, you must do what belial told you....!

Hope the responses you got are enough for you to be able to get this GUI-LOGING starting!!! :p

tbranham 12-12-2003 11:11 AM

Yes, free_andrew, changing to runlevel 4 will do the trick. Don't forget to remove the 'startx' command from your '/etc/profile/' when you do so.

free_andrew 12-12-2003 07:56 PM

You guys rock!


;)

mariose 11-06-2014 03:19 AM

Works great!

Added kdm to the top of /etc/profile

Code:

bash-4.2# cat /etc/profile 
kdm
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.

and

Change the runlevel to 4 in /etc/inittab

Code:

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

Thank you all

titopoquito 11-06-2014 04:48 AM

Quote:

Originally Posted by mariose (Post 5265401)
Works great!

Added kdm to the top of /etc/profile

Code:

bash-4.2# cat /etc/profile 
kdm
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.


It's the wrong place IMHO, the suggestion above also said to change it in /etc/rc.d/rc.M where you will find another existing entry for xdm I think. Just replace it there :)

mariose 11-06-2014 05:07 AM

Got it. Thanks titopoquito

fsauer 11-06-2014 05:56 AM

Quote:

Originally Posted by titopoquito (Post 5265432)
It's the wrong place IMHO, the suggestion above also said to change it in /etc/rc.d/rc.M where you will find another existing entry for xdm I think. Just replace it there :)

You should have considered GrayGhost's post more than most of the others ...

Actually, it is not rc.M. All the selection of the login manager is in /etc/rc.d/rc.4, and it should choose kdm automatically (if you have not installed gdm before that). So, setting the default runlevel to 4 is good enough in almost all cases, as a short inspection of rc.4 shows.

Just for the records....

Good luck
Franz

krwlr 11-06-2014 10:33 AM

Code:

alex@localhost $ cat ~/.bash_profile
. ~/.bashrc
. ~/.bash_aliases
. ~/perl5/perlbrew/etc/bashrc

if [ `tty` = /dev/tty1 ]; then
    startx
fi


bassmadrigal 11-06-2014 11:53 AM

I don't know why it was required to revive an 11 year old thread for something that is as easy as changing the default runlevel to 4 in /etc/inittab. There is no reason to modify any other files to add kdm to launch, because it will launch by default if you have the runlevel in /etc/inittab set to 4. For more info, see the Slackware docs wiki entry on it.

http://docs.slackware.com/slackbook:...raphical_login

Next time, it'd probably be best to let dead threads stay dead and not try to bring them back to life.


All times are GMT -5. The time now is 03:18 AM.