Skip to content

Cannot boot directly to X

I have been following both the wiki for automatic login at boot and that for automatically starting X on login. (https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console and https://wiki.archlinux.org/index.php/Start_X_at_Login respectively) However, neither of these are working.

When I boot the machine, it runs through the boot process, then hangs at the end of the process. No login screen is shown, nor is the user loged in. To solve this I have to switch to a second TTY and manually log in.

Once I have logged in, X does not start.

Both the Wikis above have been followed to the letter and if it helps, I am running on a rasberry pi. Is there anything that I can do to fix this?

Thanks for your help.

10 points12 comments
Open on Reddit
About this post
Posted
Archived
Score
10 · 100% up
Kind
Text
ID
26c7ea

Author

14
posts
59
comments
3
media
View profile

13 comments

Those options for starting xorg on login are dumb,

you have systemd, use it

https://github.com/sofar/xorg-launch-helper https://github.com/sofar/user-session-units

enable xorg.service... then you need user-session-units for the dbus.target and service... there are aur packages.

This came from a blog post i wrote a long time ago and have since deleted the whole blog for.

http://git.kaictl.net/wgiokas/systemd-user.git/tree/dwm.service

Get a window manager service unit... like dwm above. then you want a wm.target that will be your default.target once enabled

http://git.kaictl.net/wgiokas/systemd-user.git/tree/wm.target

yay Alias=

Now, put everything you would normally put in your .xinitrc in it's own .service unit, and make it WantedBy=mystuff.target

http://git.kaictl.net/wgiokas/systemd-user.git/tree/mystuff.target

Which will be started before your wm, but after your xorg.

then... once you login with the autologin that you have already mentioned above... it will launch a user@<uid>.service and will start your user session.

If you need networking, add /etc/systemd/system/user@<uid>.service.d/network.conf that just has

[Unit]
After=network.target

and it will make the user session wait for networking to start your user session.

And that is how I have setup my last 5 raspberry pis that are sitting around just running midori.

10 points

Well, I'll be damned. I've been using the wiki way like a caveman.

3 points

Could this be integrated with the default Arch setup somehow? This seems incredibly useful but not a lot of people will think or know how to do it.

edit: words

2 points

it's in the wiki, title: systemd/user. Plus it's a little hackish at this point. If by xorg 1.16 launchd logind works with xserver correctly (it's supposed to)....

3 points

This is exactly how you should do it. And feel free to grab that systemd-user repo if you want!

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.