[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I enable X autologin without using a display manager?



If I am not mistaken, your inittab is modified from within the initramfs early during boot time. Adding 'noautologin' to the kernel parameters should stop that. You would the have to modify the line for tty1 by hand if you still want autologin.

The error message from startx happens because 5 instances of bash are trying to run startx at the same time. This should not be an issue if you use noautologin and modify your inittab to only automatically log in to tty1.
Another way to solve this would be a slight modification to your .bash_profile:

===============
 if [ $(tty) = '/dev/tty1' ]
then
  startx
fi
===============

That's what I opted for, because I like having a few spare tty's. If you are going for kiosk mode, you may prefer the hand edited inittab + noautologin and maybe even add an 'exit' to the end of your .bash_profile.

Hope that helps,
 --Juergen

On Tue, Mar 31, 2009 at 4:32 AM, Fredrik Israelsson <fredrik_is@hotmail.com> wrote:

I can see now that in my DebianLive/chroot directory, the etc/inittab file contains


1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6,

but when looking on my running live system, built from this, I can see that inittab reads


1:2345:respawn:/bin/login -f user </dev/tty1 >/dev/tty1 2>&1
1:23:respawn:/bin/login -f user </dev/tty2 >/dev/tty2 2>&1
1:23:respawn:/bin/login -f user </dev/tty3 >/dev/tty3 2>&1
1:23:respawn:/bin/login -f user </dev/tty4 >/dev/tty4 2>&1
1:23:respawn:/bin/login -f user </dev/tty5 >/dev/tty5 2>&1
1:23:respawn:/bin/login -f user </dev/tty6 >/dev/tty6 2>&1

Who is changing my inittab file, and when?

Why does the command startx in .bash_profile result in the X server complaining about a server already running, when omitting the startx command in .bash_profile results in X not starting at all?

Regards,
Fredrik


From: fredrik_is@hotmail.comSubject: RE: How do I enable X autologin without using a display manager?
Date: Tue, 31 Mar 2009 07:47:12 +0000


Hi!
Thank You for helping me!
I have tried to edit the files you wrote about, but I still don't get it to work properly.

In my Debian Live build, I have aldready got the line

1:2345:respawn:/bin/login -f user </dev/tty1 >/dev/tty1 2&>1,

and no line containing getty. Is this because if have configured the live-helper to enable autologin?

Still, when I am adding startx to my .bash_profile, the X server complains about "server already running on display 0. Remove the X lock file in /tmp".
So, I suspect that I somehow already have got a live build that enables X autologin, so I try once again to build without a .bash_profile and without editing /etc/inittab, but still with a .xinitrc that starts my application. The result then is the same as usual. I get to a console, automatically logged in as user "user", but no X.

In your post about the inittab and the .bash_profile, I notice that the line in .bash_profile says 'startx "'. Is the quotation mark (") accidentaly put there, or should it be included (and why in that case)?

Regards,
Fredrik

> From: stwn@kuliax.org
> To: debian-live@lists.debian.org
> Subject: Re: How do I enable X autologin without using a display manager?
> Date: Fri, 27 Mar 2009 22:39:29 +0700
>
> On Friday 27 March 2009 09:34:44 Iwan Setiawan wrote:
>
> > Put startx in .xinitrc, and include it in chroot_local-includes/~?
>
> Thanks to varadarajan narayanan for making me notice that my first reply has
> gone nowhere & not complete :D
>
> Actually I have used 3 files to do the autologin without display manager, but
> I still use desktop environment:
>
> - /etc/inittab and .bash_profile like varadarajan stated
>
> - also .xinitrc which I said earlier. It contains:
>
> /usr/bin/qiv -zr /usr/share/dir/images/
> sudo /usr/bin/app &
> wait
> startlxde
>
> This script, as you all know, run qiv to display wallpaper randomly, app to
> generate something, and start the LXDE.
>
> Ok. In case anybody was wondering why i replied with .xinitrc right away :)
>
> --
> There is a word for that and that word is "crap".
>
> - Alexander Viro on linux-kernel
>
>
> --
> To UNSUBSCRIBE, email to debian-live-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>


Dela foton på ett smidigt sätt med Windows Live™ Photos. Dra och släpp

Hitta inspiration till middagsmaten! MSN Mat & Dryck


Reply to: