Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: autologin< Next Oldest | Next Newest >
xmak Offline





Group: Members
Posts: 3
Joined: Feb. 2005
Posted: Feb. 18 2005,15:30 QUOTE

I've searched and searched through /etc and init.d but I just can't figure out how to automatically log in some user when system starts.

Is there anyone that could tell me about it.

An where can I find the documentation about the init process of dsl?
Back to top
Profile PM 
tronik Offline





Group: Members
Posts: 182
Joined: Dec. 2004
Posted: Feb. 18 2005,19:41 QUOTE

dsl's root using /.bash_profile. it su's to user 'dsl' in there, then user dsl's ~dsl/.bash_profile calls X.

you should probably check out /.bash_profile

the multiple terminals started with root are started by inittab, check /etc/inittab


--------------
-william
atlanta, GA, USA

DSL 1.0+2.4.27/sata : P4 2.4norwood : 512ddr2 : nvgf4ti4200-64 : 128mbLexar Jumpdrive Elite
Back to top
Profile PM WEB 
Agus
Unregistered






Posted: July 25 2005,14:51 QUOTE

Well,
I tried doing dsl-hdinstall for multiusers and singleuser and I found the difference in /etc/inittab:

for singleuser with autologin:
< 1:12345:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1
< 2:234:respawn:/bin/bash -login >/dev/tty2 2>&1 </dev/tty2
< 3:234:respawn:/bin/bash -login >/dev/tty3 2>&1 </dev/tty3
< 4:234:respawn:/bin/bash -login >/dev/tty4 2>&1 </dev/tty4

for multiuser and no autoloin:
> 1:2345:respawn:/sbin/getty 115200 tty1
> 2:2345:respawn:/sbin/getty 115200 tty2
> 3:2345:respawn:/sbin/getty 115200 tty3
> 4:2345:respawn:/sbin/getty 115200 tty4

I haven't tried this myself.  Let me know if you find out anyhing.


Agus
Back to top
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: July 25 2005,20:00 QUOTE

This is my understanding of how DSL's autologin works:

The /etc/inittab specifies that the root user should be automatically logged in

Code Sample
1:12345:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1


If the runlevel is equal to 5 (the default runlevel) it then switches to the 'dsl' user as specified in /.bash_profile:

Code Sample
#!/bin/bash
RUNLEVEL=`runlevel|cut -f2 -d' '`
if [ $RUNLEVEL -eq 5 ]
then
  export HOME=/home/dsl
  cd $HOME
  while [ 1 ]; do
     su - dsl
  done
fi


The X Windows System is started as specified in /home/dsl/.bash_profile (this file originally resides in /etc/skel and is copied to /home/dsl/ by dsl-config).

Code Sample
#!/bin/bash
export IRCNICK=DSL
SSH=`env | grep SSH_CONNECTION`
if [ -z "$SSH" ]; then startx; fi
Back to top
Profile PM 
3 replies since Feb. 18 2005,15:30 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: autologin

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code