Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
autologin_mit_linux [2011/02/24 14:41] admin angelegt |
autologin_mit_linux [2011/02/24 14:45] (aktuell) admin |
||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
**Problem:** Ohne gestartem kdm/gdm/xdm soll ein Benutzer automatisch beim Start angemeldet werden, und ein leerer X-Server gestartet werden: | **Problem:** Ohne gestartem kdm/gdm/xdm soll ein Benutzer automatisch beim Start angemeldet werden, und ein leerer X-Server gestartet werden: | ||
- | */etc/inittab: | + | |
- | + | <code bash /etc/inittab> | |
- | ... | + | ... |
- | 1:2345:respawn:/sbin/mingetty tty1" ändern in "1:2345:respawn:/sbin/autologin tty1 login -f username | + | 1:2345:respawn:/sbin/mingetty tty1" ändern in "1:2345:respawn:/sbin/autologin tty1 login -f username |
- | ... | + | ... |
+ | </code> | ||
+ | |||
+ | <code bash /home/user/.bashrc> | ||
+ | ... | ||
+ | case `/usr/bin/tty` in /dev/tty1) | ||
+ | /sbin/autostartx | ||
+ | esac | ||
+ | </code> | ||
<code bash /sbin/autlogin> | <code bash /sbin/autlogin> | ||
#!/bin/bash | #!/bin/bash | ||
- | # Scriptname: autologin | ||
- | # autologin-script based on article in Linux Journal 58 | ||
- | # Put script in /sbin and make root owner | ||
- | # Edit /etc/inittab and change the line(s) that looks like this: | ||
- | # 1:2345:respawn:/sbin/mingetty tty1 | ||
- | # to | ||
- | # 1:2345:respawn:/sbin/autologin tty1 login -f username | ||
- | # where username is your username | ||
- | # reboot to take effect | ||
exec 0</dev/$1 1>/dev/$1 2>&1 | exec 0</dev/$1 1>/dev/$1 2>&1 | ||
cat /etc/issue | cat /etc/issue | ||
Zeile 27: | Zeile 26: | ||
<code bash /sbin/autologinx> | <code bash /sbin/autologinx> | ||
#!/bin/bash | #!/bin/bash | ||
- | # Scriptname: autostartx | ||
- | # autostartx-script based on article in Linux Magazine No 2 | ||
- | # This script checks to see if X is up, if not | ||
- | # the script startx X automatically in 5 seconds | ||
case `/usr/bin/tty` in /dev/tty[0-9]*) | case `/usr/bin/tty` in /dev/tty[0-9]*) | ||
echo -e "\nLocal login - finding X-Lockfile.\n" | echo -e "\nLocal login - finding X-Lockfile.\n" | ||
Zeile 52: | Zeile 47: | ||
esac | esac | ||
</code> | </code> | ||
+ | |||
+ | chmod +x /sbin/autologin /sbin/autologinx |