You are not logged in.

#1 2010-08-06 07:37:58

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

[SOLVED] Automatic Login to Openbox

Since I'm on a single user machine and have a bios based password prompt at startup, I would like to log in as user automatically and start openbox the same way.

At the moment I have to log in as usual and can start openbox via startx since I have put

exec openbox-session

into ~/.xinitrc.

How can I automate these steps? I tried it with rc.local, but that way it logically logs in as root which isn't my goal. I would like not to use SLiM if possible.

Last edited by Flylow (2010-08-06 07:50:53)

Offline

#2 2010-08-06 07:45:23

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,769

Re: [SOLVED] Automatic Login to Openbox

You could try some of the ideas here:

http://wiki.archlinux.org/index.php/Start_X_at_Boot


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2010-08-06 07:50:01

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

Re: [SOLVED] Automatic Login to Openbox

Thanks for the quick reply. I've found everything needed there ;-)

Offline

#4 2010-08-06 08:50:24

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

Re: [SOLVED] Automatic Login to Openbox

Summary of what I've done to get things work. Maybe somebody can use this as it's a quick version of the wiki - just make sure to replace USERNAME with yours and you've added "exec openbox-session" to your ~/xinitrc.

Created autologin.c

#include <unistd.h>
int main() 
{
   execlp( "login", "login", "-f", "USERNAME", 0);
}

Compiled and copied into the right place

gcc -o autologin autologin.c
sudo cp autologin /usr/local/sbin/

Edited /etc/inittab

id:5:initdefault:
[..]
c1:2345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologin 38400 tty1 linux
[...]
x:5:once:/bin/su USERNAME -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"

Last edited by Flylow (2010-08-06 08:53:36)

Offline

#5 2011-12-11 01:13:40

plenty
Member
From: Brighton, UK
Registered: 2011-12-07
Posts: 5

Re: [SOLVED] Automatic Login to Openbox

OHHHH... The relief!!!!
I've spent the last couple of hours (atleast) trying to sort out this auto-login gubbins. I've been all over that 'Start X from Boot' page in my search but somehow missed that crucial link in the corner. My efforts have been directed towards lxdm, its daemon & its lxdm.conf. So glad to have come across this. Many thanks smile

Offline

Board footer

Powered by FluxBB