You are not logged in.
Pages: 1
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 startxI 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
startx sources your ~/.xinitrc file. What is contained in it?
Offline
So far only
exec startkdeThanks for the fast reply!
Oha.
Offline
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
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/LinuxOha.
Offline
You've added that conditional to your bash_profile, but you are not using bash.
For Zsh, add it to ~/.zlogin (or ~/.zprofile) instead.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Oh. I see.
I works like a charm!
Thank You ![]()
Oha.
Offline
Pages: 1