You are not logged in.

#1 2009-05-02 16:50:47

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Autologin

Hi

I have resurrected an old laptop to use it to run a terminal emulator via telnet to a Unix server running a veterinary management app. I have setup a non-root user called vet and would like my system to automatically to login to that user after startup (regardless of security implications). After that I intend to auto run something like xterm to run telnet to this Unix server.

My main questions are:

a) How to setup an autologin in basic Archlinux (command-line)
b) Where to set-up to run an app automatically - is this in /etc/rc.local as I want this telnet to run for the user "vet" only

With kind regards,
Martin


Martin

Offline

#2 2009-05-02 16:55:12

djnm
Member
From: USA
Registered: 2008-12-21
Posts: 78

Re: Autologin

Well I assume if you want to start xterm, you want to start X at startup and log in.
See: http://wiki.archlinux.org/index.php/Start_X_at_boot

You can setup your auto run X apps in ~/.xinitrc or an autostart script/setting for your particular WM/DE.


br0tat0chip in #archlinux and on freenode

Offline

#3 2009-05-02 16:55:40

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Autologin

Welcome to the forums. Have you searched the wiki?

Too late.

Last edited by haxit (2009-05-02 16:55:50)


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#4 2009-05-02 16:59:20

ctarwater
Member
From: Geosynchronous Orbit
Registered: 2009-02-05
Posts: 297

Re: Autologin

this wiki page will walk you through logging in a specific user at boot:  http://wiki.archlinux.org/index.php/Aut … on_startup

(rest of post removed because it was irrelevant)
sorry, should have read your post correctly.

Last edited by ctarwater (2009-05-02 17:11:57)


I'm married to an author.  This is shameless self-promotion.  www.backthatelfup.com

Offline

#5 2009-05-02 17:05:58

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Re: Autologin

haxit wrote:

Have you searched the wiki?

Yes, but all I found (and recognized) was an autologin once a graphical interface was started

djnm wrote:

Well I assume if you want to start xterm, you want to start X at startup and log in.

I think thi sis where my poor lack of experience comes in. I actually don't want to run a graphical interface so I presume the "terminal emulator" is unnecessary as I already am in a terminal ;-)


Martin

Offline

#6 2009-05-02 17:10:09

djnm
Member
From: USA
Registered: 2008-12-21
Posts: 78

Re: Autologin


br0tat0chip in #archlinux and on freenode

Offline

#7 2009-05-02 18:49:22

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Re: Autologin

Hi

OK tried the latter and now have a problem I cannot get out of. It looks like I don't have mingetty installed and I my boot-up is cycling forever giving me the warning

INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: Id "c1" respawning too fast : disabled for 5 minutes

Any idea how to break the cycle?


Martin

Offline

#8 2009-05-02 19:13:16

greenfish
Member
From: eating fish in /dev/null
Registered: 2008-08-30
Posts: 226

Re: Autologin

McDragon wrote:

Hi

OK tried the latter and now have a problem I cannot get out of. It looks like I don't have mingetty installed and I my boot-up is cycling forever giving me the warning

INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: Id "c1" respawning too fast : disabled for 5 minutes

Any idea how to break the cycle?

Have you tried http://aur.archlinux.org/packages.php?d … s=0&SeB=nd

?


ARCH64 archSKYNET server AMD  Phenom(tm) II X2 550 HDD 6TB Ram 8GB
Hobbies: Running, Pistol Marksmanship, Classic Music

Offline

#9 2009-05-02 19:16:52

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Re: Autologin

Well no, I can't get back to the system as this warning keeps cycling forever. If I reboot the same happens.
No I have tried booting the install CD but I don't know how (if at all) I can repair the inittdb file. I am currently at root@archiso but I want to go to root@LAB (lab is the hostname of the laptop).


Martin

Offline

#10 2009-05-02 19:24:57

greenfish
Member
From: eating fish in /dev/null
Registered: 2008-08-30
Posts: 226

Re: Autologin

McDragon wrote:

Well no, I can't get back to the system as this warning keeps cycling forever. If I reboot the same happens.
No I have tried booting the install CD but I don't know how (if at all) I can repair the inittdb file. I am currently at root@archiso but I want to go to root@LAB (lab is the hostname of the laptop).

Hmm you have a point.

Try going into single mode, edit your GRUB/kernel line with single (press e on the kernel line) and when youre done press b for boot.

Then edit your /etc/inittab so it looks exactly as the default one you had during an install.

I'm using another way to get autologin from /etc/locale I think, want to try it when you're past this problem?

my /etc/inittab

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)    Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
id:3:initdefault:
# Boot to X11
#id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:once:/etc/rc.single
rm:2345:once:/etc/rc.multi
rh:06:once:/etc/rc.shutdown
su:S:once:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null

# End of file

heres how i autologin using /etc/rc.local

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

su - yourusername -c 'source /etc/profile;startx'

Last edited by greenfish (2009-05-02 19:28:40)


ARCH64 archSKYNET server AMD  Phenom(tm) II X2 550 HDD 6TB Ram 8GB
Hobbies: Running, Pistol Marksmanship, Classic Music

Offline

#11 2009-05-02 20:36:00

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Re: Autologin

Well got over the problem of correctly going into single mode by using the following tutorial:

http://www.redhat.com/docs/manuals/linu … ingle.html

However I don't understand the last line of your second suggestion. Doesn't that just start an x session

Last edited by McDragon (2009-05-02 20:41:40)


Martin

Offline

#12 2009-05-02 20:47:15

greenfish
Member
From: eating fish in /dev/null
Registered: 2008-08-30
Posts: 226

Re: Autologin

McDragon wrote:

Well got over the problem of correctly going into single mode by using the following tutorial:

http://www.redhat.com/docs/manuals/linu … ingle.html

However I don't understand the last line of your second suggestion. Doesn't that just start an x session

My suggestion of going into single didn't work for ya? The line specified in my locale autologins my user with a new .serverauth everytime.

If you want a free tip friend, always try new stuff in linux, that's how you learn if the stuff works or breaks, either way you will learn cool

you're not planning on running any X at all? if so my bad...

I hope im not being too unclear here, im only on my 9th beer big_smile

Last edited by greenfish (2009-05-02 20:48:04)


ARCH64 archSKYNET server AMD  Phenom(tm) II X2 550 HDD 6TB Ram 8GB
Hobbies: Running, Pistol Marksmanship, Classic Music

Offline

#13 2009-05-02 21:09:09

McDragon
Member
From: Wales
Registered: 2009-05-02
Posts: 7
Website

Re: Autologin

OK, tried the "Using a C login program" from the tutorial http://wiki.archlinux.org/index.php/Aut … on_startup and it HAS WORKED.

I keep on getting confused when virtual machines get mentioned but it works the way I want it. After the boot-up I can see it has logged in as VET automatically.

Thanks everyone for the help on this.


Martin

Offline

Board footer

Powered by FluxBB