On Tue, Sep 10, 2002 at 03:07:58AM -0000, D Cyriac wrote:
> Hi,
> 
> Change the entry
> id:3:initdefault: in /etc/inittab to
> id:5:initdefault:
> Next time you will get graphical logon[runlevel 5]
> 
> On Tue, 10 Sep 2002 cj wrote :
> >G'day all
> >How can I get X to start automaticlly.
> >ie so it's a graphical login instead of a text(console) login.

A related question I had was this: how can I have some accounts
automatically fire up X on login but not leave X always running and
wasting RAM on a machine that is also used as a server.  Also, when
the X session was logged out I wanted the original login to go away
too.

My solution was to put this in the user's .bashrc file:

  if [ "$TERM" = "linux" ] ; then
      echo "About to start X..."
      sleep 1
      exec startx
  fi

The warning and sleep are my being paranoid and providing a chance to
ctrl-C out of the auto X launch.


Another benefit over a traditional manual "startx" is that if the X
session goes into a password protected screen saver a random person
can't just walk up to the machine, switch to virtual console 1 and do
what s/he will.  Doing the exec the text console is still there, and
one can do a ctrl-C there to kill the X session, but there is no
prompt available for doing anything more subtle; a ctrl-C kills the X
session and logs the user out.


-kb, the Kent who has a bash alias called "x" that does his "exec
startx" more conveniently.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to