You are not logged in.

#1 2013-02-08 00:29:56

ubunchu
Member
Registered: 2012-05-01
Posts: 181

[SOLVED] Automatic login to TTY1, openbox error

SOLUTION at the last post.

Hello,
I was trying to create the systemd autologin.service, to log into TTY1 right after boot.
I have been following the instructions on the wiki:
https://wiki.archlinux.org/index.php/Au … al_console

PROBLEM: after boot, the login happens a few times with an error, flashing, and then dissapears leaving with a basic underscore " _ ". I can still use TTY2.
If I go back to TT1, I see the following error multiple times, (maybe its a loop):

Last login: today, etc TTY1
Openbox-Message: Failed to open the display from the DISPLAY environment variable.

Which is weird because I don't have openbox set to autostart or anything, I think.  (.xinitrc is basic as well; .dmrc has kde-plasma set.)

+Info:

$ systemctl --failed
UNIT                   LOAD   ACTIVE SUB    DESCRIPTION
autologin@tty1.service loaded failed failed Getty on tty1

$ systemctl status autologin@tty1.service
autologin@tty1.service - Getty on tty1
	  Loaded: loaded (/etc/systemd/system/autologin@.service; enabled)
	  Active: failed (Result: start-limit) since Fri 2013-02-08 01:02:10 CET; 8min ago
	    Docs: man:agetty(8)
	          man:systemd-getty-generator(8)
	          http://0pointer.de/blog/projects/serial-console.html
	 Process: 878 ExecStart=/sbin/agetty --noclear -a ubunchu %I 38400 linux (code=exited, status=0/SUCCESS)

Any hints on what could be it? What file should I check?
Thanks in advance! Cheers!

Last edited by ubunchu (2013-02-21 09:34:15)


Don't forget to mark as [SOLVED].

Offline

#2 2013-02-08 08:51:02

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Automatic login to TTY1, openbox error

What exactly have you done? My guess is that you try to launch an Xserver multiple times. enable the autologin service mentioned in the wiki and configure the default target of systemd to be multi-user, not graphical:

systemctl -f enable multi-user.target

Now you should have enabled autologin, but only in text console. Try this setup first and from the text console type startx and see if all works well. If yes, put something like this in your ~/.profile to automatically start the graphical environment:

if [ "$(tty)" == "/dev/tty1" ] && [[ $- == *i* ]] ; then
exec startx
fi

Offline

#3 2013-02-08 09:30:01

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: [SOLVED] Automatic login to TTY1, openbox error

Thanks for the reply,
but no, i was only trying to log in in the console on TTY1, not graphically, and I want to start X manually (if needed). "systemctl enable multi-user.target" is enabled. (I don't have the ~/.profile file.)
Update: I get logged in automatically into TTY2 (don't know why), but on TTY1 the same problem persists (the openbox error).

Last edited by ubunchu (2013-02-08 09:39:18)


Don't forget to mark as [SOLVED].

Offline

#4 2013-02-08 09:39:12

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Automatic login to TTY1, openbox error

According to your error something want to lauch an X server. Post the output of systemctl list-unit-files and examine the output of journalctl. To debug your problem

1) First disable the autologin and see if you have the login prompt at the text console; try to login and see if it works.
2) If 1 is OK. enable the autologin service and see if it works.

If that still does not work, you should tell exactly what you have done. Are you sure you use vanillla arch? (and no derivative like archbang that may have configured the system in way we cannot know here).

Last edited by olive (2013-02-08 09:47:14)

Offline

#5 2013-02-08 10:06:57

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: [SOLVED] Automatic login to TTY1, openbox error

systemctl list-unit-files 
UNIT FILE                                   STATE   
proc-sys-fs-binfmt_misc.automount           static  
dev-hugepages.mount                         static  
dev-mqueue.mount                            static  
proc-fs-nfsd.mount                          static  
proc-sys-fs-binfmt_misc.mount               static  
sys-fs-fuse-connections.mount               static  
sys-kernel-config.mount                     static  
sys-kernel-debug.mount                      static  
tmp.mount                                   static  
var-lib-nfs-rpc_pipefs.mount                static  
cups.path                                   enabled 
systemd-ask-password-console.path           static  
systemd-ask-password-wall.path              static  
accounts-daemon.service                     disabled
adb.service                                 disabled
atieventsd.service                          disabled
autologin@.service                          enabled 
autovt@.service                             disabled
avahi-daemon.service                        disabled
avahi-dnsconfd.service                      disabled
blkmapd.service                             disabled
bluetooth.service                           disabled
brltty.service                              disabled
canberra-system-bootup.service              disabled
canberra-system-shutdown-reboot.service     disabled
canberra-system-shutdown.service            disabled
colord.service                              static  
console-getty.service                       disabled
console-shell.service                       disabled
cronie.service                              disabled
cups-browsed.service                        disabled
cups.service                                enabled 
cupsd.service                               disabled
dbus-org.freedesktop.hostname1.service      static  
dbus-org.freedesktop.locale1.service        static  
dbus-org.freedesktop.login1.service         static  
dbus-org.freedesktop.NetworkManager.service enabled 
dbus-org.freedesktop.timedate1.service      static  
dbus.service                                static  
debug-shell.service                         disabled
dhcpcd.service                              disabled
dhcpcd@.service                             disabled
emergency.service                           static  
fancontrol.service                          disabled
ftpd.service                                disabled
gdm.service                                 disabled
getty@.service                              disabled
git-daemon@.service                         static  
gpm.service                                 disabled
healthd.service                             disabled
ip6tables.service                           disabled
iptables.service                            disabled
irexec.service                              disabled
kdm.service                                 disabled
krb5-kadmind.service                        disabled
krb5-kdc.service                            disabled
krb5-kpropd.service                         disabled
krb5-kpropd@.service                        static  
lightdm.service                             disabled
lirc.service                                disabled
lircm.service                               disabled
lm_sensors.service                          disabled
lvm-on-crypt.service                        disabled
lvm.service                                 disabled
lxdm.service                                disabled
mdadm.service                               disabled
mysqld.service                              disabled
net-auto-wired.service                      disabled
net-auto-wireless.service                   disabled
net-profiles.service                        disabled
netcfg.service                              disabled
netcfg@.service                             disabled
NetworkManager-wait-online.service          disabled
NetworkManager.service                      enabled 
nfsd.service                                disabled
nmbd.service                                disabled
nscd.service                                disabled
polkit.service                              static  
ppp@.service                                disabled
quotaon.service                             static  
rescue.service                              static  
rpc-gssd.service                            disabled
rpc-idmapd.service                          disabled
rpc-mountd.service                          disabled
rpc-statd.service                           disabled
rpc-svcgssd.service                         disabled
rpcbind.service                             disabled
rsyncd.service                              disabled
rsyncd@.service                             static  
rtkit-daemon.service                        disabled
saned@.service                              static  
sensord.service                             disabled
serial-getty@.service                       static  
smbd.service                                disabled
smbd@.service                               static  
snmpd.service                               disabled
speech-dispatcherd.service                  disabled
sshd.service                                enabled 
sshd@.service                               static  
sshdgenkeys.service                         static  
svnserve.service                            disabled
swat@.service                               static  
syslog-ng.service                           disabled
systemd-ask-password-console.service        static  
systemd-ask-password-wall.service           static  
systemd-binfmt.service                      static  
systemd-fsck-root.service                   static  
systemd-fsck@.service                       static  
systemd-halt.service                        static  
systemd-hibernate.service                   static  
systemd-hostnamed.service                   static  
systemd-hybrid-sleep.service                static  
systemd-initctl.service                     static  
systemd-journal-flush.service               static  
systemd-journal-gatewayd.service            static  
systemd-journald.service                    static  
systemd-kexec.service                       static  
systemd-localed.service                     static  
systemd-logind.service                      static  
systemd-modules-load.service                static  
systemd-poweroff.service                    static  
systemd-quotacheck.service                  static  
systemd-random-seed-load.service            static  
systemd-random-seed-save.service            static  
systemd-readahead-collect.service           disabled
systemd-readahead-done.service              static  
systemd-readahead-drop.service              disabled
systemd-readahead-replay.service            disabled
systemd-reboot.service                      static  
systemd-remount-fs.service                  static  
systemd-shutdownd.service                   static  
systemd-suspend.service                     static  
systemd-sysctl.service                      static  
systemd-timedated.service                   static  
systemd-tmpfiles-clean.service              static  
systemd-tmpfiles-setup.service              static  
systemd-udev-settle.service                 static  
systemd-udev-trigger.service                static  
systemd-udevd.service                       static  
systemd-update-utmp-runlevel.service        static  
systemd-update-utmp-shutdown.service        static  
systemd-user-sessions.service               static  
systemd-vconsole-setup.service              static  
transmission.service                        disabled
udisks.service                              disabled
udisks2.service                             static  
upower.service                              disabled
usbmuxd.service                             static  
user@.service                               static  
uuidd.service                               static  
vncserver.service                           disabled
winbindd.service                            disabled
wpa_supplicant-nl80211@.service             disabled
wpa_supplicant-wired@.service               disabled
wpa_supplicant.service                      disabled
wpa_supplicant@.service                     disabled
x11vnc.service                              static  
xinetd.service                              disabled
avahi-daemon.socket                         disabled
cups.socket                                 enabled 
dbus.socket                                 static  
git-daemon.socket                           disabled
krb5-kpropd.socket                          disabled
rsyncd.socket                               disabled
saned.socket                                disabled
smbd.socket                                 disabled
sshd.socket                                 enabled 
swat.socket                                 disabled
syslog.socket                               static  
systemd-initctl.socket                      static  
systemd-journal-gatewayd.socket             disabled
systemd-journald.socket                     static  
systemd-shutdownd.socket                    static  
systemd-udevd-control.socket                static  
systemd-udevd-kernel.socket                 static  
uuidd.socket                                disabled
basic.target                                static  
bluetooth.target                            static  
cryptsetup.target                           static  
ctrl-alt-del.target                         disabled
default.target                              enabled 
emergency.target                            static  
final.target                                static  
getty.target                                static  
graphical.target                            disabled
halt.target                                 disabled
hibernate.target                            static  
hybrid-sleep.target                         static  
kexec.target                                disabled
local-fs-pre.target                         static  
local-fs.target                             static  
mail-transfer-agent.target                  static  
multi-user.target                           enabled 
network.target                              static  
nss-lookup.target                           static  
nss-user-lookup.target                      static  
poweroff.target                             disabled
printer.target                              static  
reboot.target                               disabled
remote-fs-pre.target                        static  
remote-fs.target                            enabled 
rescue.target                               disabled
rpcbind.target                              static  
runlevel0.target                            disabled
runlevel1.target                            disabled
runlevel2.target                            disabled
runlevel3.target                            disabled
runlevel4.target                            disabled
runlevel5.target                            disabled
runlevel6.target                            disabled
shutdown.target                             static  
sigpwr.target                               static  
sleep.target                                static  
smartcard.target                            static  
sockets.target                              static  
sound.target                                static  
suspend.target                              static  
swap.target                                 static  
sysinit.target                              static  
syslog.target                               static  
system-update.target                        static  
time-sync.target                            static  
umount.target                               static  
systemd-readahead-done.timer                static  
systemd-tmpfiles-clean.timer                static  

225 unit files listed.

For some reason I can't disable "autologin@tty1".
Yes, this is a vanilla arch (customised by myself).
This is what I have done:

cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
-Edited the file: /etc/systemd/system/autologin@.service
  the line: ExecStart=-/sbin/agetty --noclear %I 38400 linux
  to be like this: ExecStart=-/sbin/agetty --noclear -a ubunchu %I 38400
sudo systemctl daemon-reload
sudo systemctl disable getty@tty1
sudo systemctl enable autologin@tty1
sudo systemctl start autologin@tty1
sudo systemctl enable multi-user.target
-now tried disabling:
sudo systemctl disable getty@tty1 (again)
sudo systemctl disable autologin@tty
sudo systemctl disable autologin@tty1
sudo systemctl disable autologin@tty1.service
sudo systemctl disable autologin@tty.service
sudo systemctl disable autologin@.service
-no output, looks like it does not disable it

Don't forget to mark as [SOLVED].

Offline

#6 2013-02-21 09:33:34

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: [SOLVED] Automatic login to TTY1, openbox error

Looks like the wrong environment variable was caused by ".bash_profile"
after removing it, the error did not reappear. This caused the problem:

#
# ~/.bash_profile
#
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
 exec openbox-session
fi

Don't forget to mark as [SOLVED].

Offline

Board footer

Powered by FluxBB