You are not logged in.

#1 2014-09-09 12:48:14

tentorange
Member
From: Germany
Registered: 2014-09-09
Posts: 8

[SOLVED] Autostart startx after login

Hi everyone,

I have a problem with autostarting startx after I log in.
So far the machine boots, terminal login dialog appears, I log in, get my terminal and start X manually via "startx".
But I want my system to start X automatically after logging in. Without me typing in the command.

So I did some research (both internet and the Arch forums) and couldn't come up with a working solution to that problem.
More or less every thread links to the Start X at Login page.
And I did add the lines in question to my .bash_profile (after I made a skeleton copy of it, as described).
But still nothing happens after logging in (I waited for about half a minute). So it doesn't work for, or I am doing something wrong.
Here my .bash_profile:

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

I have no idea how to proceed.
Does anyone have an idea how to solve this?

Last edited by tentorange (2014-09-09 13:45:34)


Oha.

Offline

#2 2014-09-09 12:58:15

CarlD
Member
From: London
Registered: 2013-11-23
Posts: 128

Re: [SOLVED] Autostart startx after login

startx sources your ~/.xinitrc file. What is contained in it?

Offline

#3 2014-09-09 13:01:24

tentorange
Member
From: Germany
Registered: 2014-09-09
Posts: 8

Re: [SOLVED] Autostart startx after login

So far only

exec startkde

Thanks for the fast reply!


Oha.

Offline

#4 2014-09-09 13:04:36

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

Re: [SOLVED] Autostart startx after login

Nothing happens?  Do you mean you are just at a command prompt, no errors, nothing?  And you are not logged out?  Even with a faulty or empty xinitrc, this would still end your current login session.

So it seems the conditionals don't pass.  This means either that X is already running, or you do not have an active login session.  Are you booting with an alternative init system?  If you get to a command prompt enter the following commands and report their results:

pgrep Xorg

echo $0

echo $XDG_VTNR

loginctl

uname -a

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-09-09 13:25:37

tentorange
Member
From: Germany
Registered: 2014-09-09
Posts: 8

Re: [SOLVED] Autostart startx after login

Yes. I just get the command prompt, nothing else to it.

tjark@compt ~ % pgrep Xorg                                                                                          :(
1 tjark@compt ~ % echo $0
-zsh
tjark@compt ~ % echo $XDG_VTNR
1
tjark@compt ~ % loginctl
   SESSION        UID USER             SEAT            
        c1       1000 tjark            seat0           

1 sessions listed.
tjark@compt ~ % uname -a
Linux compt 3.16.2-1-ARCH #1 SMP PREEMPT Sat Sep 6 13:12:51 CEST 2014 x86_64 GNU/Linux

Oha.

Offline

#6 2014-09-09 13:34:40

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

Re: [SOLVED] Autostart startx after login

You've added that conditional to your bash_profile, but you are not using bash.

wiki wrote:

For Zsh, add it to ~/.zlogin (or ~/.zprofile) instead.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2014-09-09 13:42:05

tentorange
Member
From: Germany
Registered: 2014-09-09
Posts: 8

Re: [SOLVED] Autostart startx after login

Oh. I see.

I works like a charm!

Thank You smile


Oha.

Offline

Board footer

Powered by FluxBB