Re: HOWTO: Automatically login to XFCE without a boot loader
Thanks for this. I had been looking for a way to lighten the load on a 750Mhz laptop, and the first thing I wanted to dump was gdm. I needed the autologin though.
This worked perfectly under an extremely lightweight Xubuntu 6.06.1 system after installing build-essential. It's very nice to be able to automatically log in without the desktop manager.
Thanks again!
EDIT: I should mention I didn't have the same luck on an Edgy installation, but I blame that mostly on all the weird tweaks and modifications I've done since I installed it. I'll try some other time on a fresh build and see if it works ... maybe once Edgy is fully stable.
Re: HOWTO: Automatically login to XFCE without a boot loader
I just would like to tell that it works on Debian Sarge too.
Great.
Thx.
DANIeL
Re: HOWTO: Automatically login to XFCE without a boot loader
Quote:
Originally Posted by
K.Mandla
I'll try some other time on a fresh build and see if it works ... maybe once Edgy is fully stable.
If you've tried this autologin under Edgy and had no luck, here's the reason.
The upstart boot sequence, as I understand it, abandons inittab, and instead uses a series of files under /etc/event.d/ to spawn tty consoles.
That means each console has a separate tty file inside /etc/event.d/ ... edit tty1 in the same way you would for inittab, to get the autologin working. In other words. ...
Code:
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5
stop on shutdown
respawn /sbin/getty -n -l /usr/local/sbin/autologin 38400 tty1
That should do the trick for you. Cheers! 8)
P.S.: I should mention that this is only the case for Edgy post-Knot 2, which means if you install from Knot 1 or 2, and don't find those files, you should either use the old system for Dapper, or dist-upgrade to the new bootup system. There is some related information here.
Re: HOWTO: Automatically login to XFCE without a boot loader
I get the following error message any ideas what's up?
autologin.c: In function ‘main’:
autologin.c:1: warning: incompatible implicit declaration of built-in function ‘execlp’
autologin.c:1:62: warning: no newline at end of file
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
Re: HOWTO: Automatically login to XFCE without a boot loader
silly me, i just started a new thread on a problem i had with this... my openbox startup script is written to start gnome-volume-manager, but when doing the autologin sequence, it doesn't seem to load. and then, when i try to write files to my manually mounted external drives, i find them "unwritable." ideas?
more specifics are @ my thread (http://ubuntuforums.org/showthread.php?t=363713)
================================================== ============
EDIT:
nevermind... i just dumped gnome-volume-manager and went with ivman... works; not sure why, but it does.
Re: HOWTO: Automatically login to XFCE without a login manager
Hi,
To the author - please update the guide and tell ppl. to install build-essentials in order to successfully compile the program? Thanks for the guide btw!
linuks
Re: HOWTO: Automatically login to XFCE without a boot loader
Quote:
Originally Posted by
Tobitas
could you maybe also supply a script for automated shut down, so I dont have to type "sudo halt"?
thanks
hello. try this. add this line to /etc/sudoers
Code:
%users localhost=NOPASSWD:/sbin/reboot, /sbin/poweroff
this makes possible to any user from the users group to invoke sudo reboot or sudo poweroff without the need of typing in root password.
lastly, make a change in ~/.bash_profile as such:
Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startx; sudo poweroff;
fi
for me it works like a charm. btw. I don't use any of the xDMs (have GDM in my Debian/Etch installed but disabled), just terminal login with the autologin feature created according to the how-to found in this topic.
the effect is: when I invoke "log off" from gnome menu, the xserver shuts down and the sudo poweroff command is executed automaticlly (no need to give root password).
btw. anyone could tell me what are the drawbacks of my solution?
one quiet annoying thing I found is that when you want to resetart xorg (by ctrl+alt+backspace) the computer goes off, because the power off command is invoked always after the xserver shutdown. a good thing would be to swap this command with the call of some kind of script which could offer choosing, if the user wants to restart or halt the system or just log off (back to text login prompt). I'm not the best in bash programming so if anyone can help, I'd be thankful. the use of ncurser would be nice.
Re: HOWTO: Automatically login to XFCE without a boot loader
Quote:
Originally Posted by
wrrr
hello. try this. add this line to
/etc/sudoers
Code:
%users localhost=NOPASSWD:/sbin/reboot, /sbin/poweroff
this makes possible to any user from the
users group to invoke
sudo reboot or
sudo poweroff without the need of typing in root password.
lastly, make a change in
~/.bash_profile as such:
Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startx; sudo poweroff;
fi
for me it works like a charm. btw. I don't use any of the xDMs (have GDM in my Debian/Etch installed but disabled), just terminal login with the autologin feature created according to the how-to found in this topic.
the effect is: when I invoke "log off" from gnome menu, the xserver shuts down and the
sudo poweroff command is executed automaticlly (no need to give root password).
btw. anyone could tell me what are the drawbacks of my solution?
looks okay to me, i do mine a little different(using debian+xfce4).no compiling needed, i apt-get mingetty. "user" is my login name.
Code:
my sudoers line:
%nopasswd ALL=(root) NOPASSWD: /usr/bin/conky, /sbin/halt, /sbin/reboot, /sbin/shutdown, /usr/sbin/xfsm-shutdown-helper, /usr/bin/thunar, /usr/bin/mousepad, /usr/sbin/synaptic
Code:
my login line(/etc/inittab):
1:2345:respawn:/sbin/mingetty tty1 --autologin user
Code:
bash_profile:
if [ `tty` = "/dev/tty1" ]; then
startx
fi
Re: HOWTO: Automatically login to XFCE without a login manager
Please can this be updated to remove "sudo" from the first nano line and from the gcc line, as it is not required.
Re: HOWTO: Automatically login to XFCE without a login manager
Credit to "shallow thoughts" for this.
First the bad news:
The login files changed again in Karmic. The file to edit is now /etc/init/tty1.conf but the line is the same.
The good news:
You don't need to compile an "autologin" binary - a script containing
Code:
#! /bin/sh
/bin/login -f yourusername
is enough. :)