Autologin Table of Contents Creating john Autologin john Autostarting X This page describes how to create the user john and automatically log him in when booting Arch Linux. We assume that you're issuing all commands described here on your device.

Creating john

# useradd –create-home john This will add the user john and create the directory /home/john.

Autologin john

Next we need to edit the /etc/inittab file to launch a custom login script instead of /bin/login. Find the line

c1:2345:respawn:/sbin/agetty -8 38400 vc/4 linux and change it to

c1:2345:respawn:/bin/autologin john Of course we have to create the file /bin/autologin which takes care of logging the user which is passed as argument.

#! /bin/bash

exec /bin/login -f $1

Put this shell script under /bin and make sure it is owned by root:root and has the correct permissions -rwxr-xr-x.

# chown root:root /bin/autologin # chmod 755 /bin/autologin Now you can reboot your smartphone and be already logged in as john. Have fun! :-)

Autostarting X

If you automatically want to log into X you can just add the following line to your shell's startup file (e.g. ~/.bashrc for bash)

exec startx

auto-login.txt · Last modified: 2014/09/17 14:58 by archmobile
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki