You are not logged in.

#1 2013-04-29 14:00:09

x1101
Member
Registered: 2012-09-05
Posts: 11

Issues with Systemd autologin and starting X (LXDE)

Hello, I am having difficulty with getting my system going with the following setup

  • raspberry pi running arch linux

  • systemd

  • Autologin via systemd unit

  • auto startx via .bash_profile

Everything on this works except that last item.
I've attempted to follow this wiki post, but with no success.

In troubleshooting I had .bas_profile dump the values of both $DISPLAY and $XDG_VTNR into a file for review, what I found was that $DISPLAY was blank (not

:0 

as expected) while $XDG_VTNR was 1 (as expected).


I have a feeling that its something to do with systemd units not firing in the right order, and that I need an After=$foo in one of my unit files, but I am unsure which one.

Can anyone provide any further insight into what I might be doing wrong here?

Offline

#2 2013-04-29 14:48:28

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Issues with Systemd autologin and starting X (LXDE)

The example in that wiki page tests for an empty $DISPLAY, so I would say that is also as expected. The startx script will set the DISPLAY variable.

Last edited by Raynman (2013-04-29 14:48:39)

Offline

#3 2013-04-29 14:52:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: Issues with Systemd autologin and starting X (LXDE)

Does this then leave you logged in on tty1?  If so, can you startx manually from there?  This would determine whether it was an issue starting X, or an issue with the conditional in your bash_profile.

In any case, you should be posting this over on the archARM forums as there may be relevant differences.  When you do go there, it'd help them help you if you posted your actual bash_profile - I suspect there may be issues with the order of entries in that file.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-04-29 15:03:48

x1101
Member
Registered: 2012-09-05
Posts: 11

Re: Issues with Systemd autologin and starting X (LXDE)

When the system boots and the systemd messages finish, I am left logged into tty1 with the specified user. I can manually startx without issue.  Here is my full bash_profile, which is just the one from /etc/skel/ with the noted tweak

#
# ~/.bash_profile
#

#I think this is happening too soon, lets nap a bit first
sleep 20
#this should startx automagically, I hope
[[ $DISPLAY = :0 && $XDG_VTNR -eq 1 ]] && exec startx

I didn't post to archARM because:

  1. I didn't think about it

  2. This seems more like a "I'm doing something wrong with systemd and bash_profile" issue and not at "something is weird with Arch on ARM" issue

Offline

#5 2013-04-29 15:11:20

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Issues with Systemd autologin and starting X (LXDE)

Why are you testing for "$DISPLAY = :0"?

That's kind of the opposite of the suggested test "-z $DISPLAY"

Bash Reference Manual wrote:

-z string

    True if the length of string is zero.

Last edited by alphaniner (2013-04-29 15:16:26)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2013-04-29 15:17:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Issues with Systemd autologin and starting X (LXDE)

While we do love the Rasberry Pi, these forums are not the appropriate place for ARM support.

Please see http://archlinuxarm.org/
Thanks.  Closing.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB