You are not logged in.
I followed the wiki http://wiki.archlinux.org/index.php/Start_X_at_Boot
But it doesn't work for me.
The wiki says to add this to .bash_profile:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx
logout
fi
But I think it's wrong and I added:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
logout
fi
But when I login X doesn't start. I don't want login managers.
Where am I wrong?
Last edited by Garret (2010-08-10 11:46:07)
Offline
Do you log into tty1?
Can you still startx by typing it in?
Last edited by karol (2010-08-10 10:20:44)
Offline
(. startx instead of startx to avoid starting extra copy of bash)
Can you start the WM succeeesfully by manually running startx? Any error messages on login?
Offline
Do you log into tty1? Yes
Can you still startx by typing it in? Yes
Offline
Is your bash_profile sourced correctly? Insert some harmless echo command instead of startx and logout and see if it will work.
Offline
Is your bash_profile sourced correctly? Insert some harmless echo command instead of startx and logout and see if it will work.
This is my .bash_profile:
. $HOME/.bashrc
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx
logout
fi
Offline
I have
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec /usr/bin/startx >> $HOME/.xsession-errors 2>&1
fi
and works fine.
Offline
What karol meant was making a bash_profile like this:
. $HOME/.bashrc
echo test
then login a bash prompt and check if it echos "test"
Offline
Are you using bash as your login shell? I use dash so of course it wouldn't work here.
Offline
I have
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec /usr/bin/startx >> $HOME/.xsession-errors 2>&1
fiand works fine.
Adding that source all worked fine.
Really thanks!
Offline
Please mark the thread as solved once your problem/issue has been resolved.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
This whole starting X after logging in at the standard terminal is interesting, But why would you want to do this anyways?
I use a login manager (GDM on virtual terminal 7). If I ever want to use one of the standard terminals (tty1-tty6) I simply use Ctrl+Alt+F1 (or F2, F3, etc).
Let me guess: is it because you want to save time by not loading the login manager?
joe@trusktr.io - joe at true skater dot io.
Offline
Some people just don't use a login manager to begin with.
Offline
Let me guess: is it because you want to save time by not loading the login manager?
I wanted to try this thing for a more "geek" experience but consider I love Slim login manager too
Offline
the development of Slim has been discontinued. so if you get bugs, do not expect them to get fixed any time soon
graphical logins, IMO, are just not worth it.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
^ not quite true. Slim 1.3.2 was released close to a month ago.
Offline
I stand corrected then. IIRC, the development had stalled for about 2 years. I guess someone stepped up and took over.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I use this in my .zshrc:
if [ ! "$(pidof X)" ]
then
startx
fi
Offline
Now I notice a strange behaviour:
I encrypted my $home folder with ecrypts following this guide -> http://sysphere.org/~anrxc/j/articles/e … index.html
At startup when I login into my shell I have to write the "startx" command to start the X server.
But if I exit from my shell and relogin the X server starts automatically (as it should do due to the .bash_profile script). So only when I type in for the second time my username and password the script works.
A similar behaviour I observed with slim:
When I login with slim it shows again the login page and when I insert for the 2nd time my login informations the X server starts.
I don't understand why...
Offline
try putting the X server execution in your /etc/profile, that way you can tell if the problem arises from the encryption of your $HOME or if there is something else.
I would say that your shell sources the .bash_profile before the "un-encryption" (sorry, i don't know the right word), but I have never encrypted my $HOME, so I could be wrong.
Offline
try putting the X server execution in your /etc/profile, that way you can tell if the problem arises from the encryption of your $HOME or if there is something else.
What do I have to do exactly to putting the X server execution in my /etc/profile?
I would say that your shell sources the .bash_profile before the "un-encryption".
I think you're right and it's the most logical conclusion about the issue.
Offline
/etc/profile is like $HOME/.bash_profile but system wide (man bash), so writing the same snippet you have in your .bash_profile should do it.
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec /usr/bin/startx
fi
remove the logging part in case it produces some problems.
Offline
/etc/profile is like $HOME/.bash_profile but system wide (man bash), so writing the same snippet you have in your .bash_profile should do it.
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec /usr/bin/startx
firemove the logging part in case it produces some problems.
Adding that source after I login the shell shows a xauth error that I didn't copy.
To stop the error I have to press CTRL+C. After that the X server starts but in the root session.
Offline
Adding that source after I login the shell shows a xauth error that I didn't copy.
To stop the error I have to press CTRL+C. After that the X server starts but in the root session.
Ok, I didn't expected that, but I've been reading the guide you posted, and it seems that if you write the "... exec startx..." right after the automount part, everything should work fine. I guess what's happening is you are changing your encrypted .profile instead of the unencrypted one.
While you are logged off your /home/user directory should have a link to /home/.ecryptfs/user/.Private/.profile which is read on login. Once the encrypted partition is mounted the original contents in /home/user are hidden. Maybe you are editing only the file inside the encrypted folder, which shadows the original one, and not doing anithing to the unencrypted one, which sits in your home by default. In other words you have to edit your /home/.ecryptfs/user/.Private/.profile, adding in the end of the file, the "if... exec startx..." part.
hope it works this time.
Offline