LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   startx automatic? (https://www.linuxquestions.org/questions/linux-newbie-8/startx-automatic-51858/)

lanif 03-26-2003 11:11 AM

startx automatic?
 
I have a problem that every time when I start my linux it didn't show up it grahpic mode .I have to login in textmode first and then type: startx to get in grahic mode.
I try to edit in 'init' set level 5 default
and 'telinit 5' but it didn't work.
What should I do?
Thanks.

wapcaplet 03-26-2003 11:26 AM

I believe you just need to edit your /etc/inittab file, and change the line:

id:3:initdefault:

to:

id:5:initdefault:

cuckoopint 03-26-2003 03:43 PM

Quote:

I believe you just need to edit your /etc/inittab file
yeah, but this assumes one has a graphical login like XDM, GDM, etc. Otherwise, one could try creating/editing a ~/.bash_login script to run startx after a correct login.

Proud 03-26-2003 04:01 PM

Erm no, as root just cd to /etc, then vi inittab :)
Trust me, I just did it! (Personal victory over VI btw) :D

cuckoopint 03-26-2003 04:31 PM

Quote:

Erm no, as root just cd to /etc, then vi inittab
Trust me, I just did it! (Personal victory over VI btw)
yeah...and what graphical login starts?
: )

if you don't know, just go and check /etc/rc5.d/
; )

Proud 03-26-2003 04:37 PM

Hmm, ok so in theory you need a graphical login manager, but why would you startx without one? :confused:
I asume Lanif has one already anyway as he just wants to automate getting in to it :P

cuckoopint 03-26-2003 06:12 PM

Quote:

Hmm, ok so in theory you need a graphical login manager, but why would you startx without one?
Actually, the two don't relate. Maybe you should look at what your graphical login does. Simplified, it's a pretty image that takes your username and password, sends it back to the system, gets back an authentication, and runs startx and .xsession. True, this is a little simplified (there are lots of IF situations, the code handles, as well as security checks, but that's the idea). On the other hand, a console login runs a tty which takes your username/password, sends it to the system, and on authentication starts a login bash shell (but w/o running startx). see the difference? Look at the display of 'pstree' to get a better idea of how your gui login is just a login bash shell with 'startx' run automatically.

And as you say, you 'assume' that the gui login is setup. That's what my original post said. If you boot into runlevel 5, but there is no gui login to welcome you, the script may go into some wacky infinite loop of searching for one, or if the inittab was written rather inteligently, it may try to drop you to runlevel 3, or even 1.


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