Page 1 of 1
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 8:17 am
by Helpme1986
My first guide so be gentle!
Can imagine alot of people wanting to auto login and/or startx (I originally looked into this to launch Liam's XBMC automatically, instead of startx just use xbmc) so did a guide, might stop a few questions on the forums (or if it doesnt its something easy to link to)
http://elinux.org/RPi_Debian_Auto_Login
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 8:40 am
by naicheben
Thank you. German translation here
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 8:54 am
by asb
A nicer way to do it is to modify /home/pi/.bash_profile with e.g.:
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startxfi Then you can log in to your other ttys fine.
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:07 am
by Helpme1986
asb said:
A nicer way to do it is to modify /home/pi/.bash_profile with e.g.:
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startxfi Then you can log in to your other ttys fine.
I originally tried this but .bash_profile didnt exist (using nano it created a new file)
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:07 am
by naicheben
asb said:
A nicer way to do it is to modify /home/pi/.bash_profile with e.g.:
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startxfi Then you can log in to your other ttys fine.
Is this known to work on the RPi?
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:22 am
by asb
Helpme1986: yep, just create the file.
naicheben: Yes, I've used it a lot on the Pi
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:26 am
by frying_fish
Helpme1986 said:
asb said:
A nicer way to do it is to modify /home/pi/.bash_profile with e.g.:
if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startxfi Then you can log in to your other ttys fine.
I originally tried this but .bash_profile didnt exist (using nano it created a new file)
No harm with adding a new bash_profile if it doesn't exist. It doesn't have to exist, but if it is there then when starting a bash shell it will check through it and see if any settings need to be set through it.
I assume this has worked fine for everyone so far?
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:37 am
by Chris.Rowland
That's really nice, thank you.
Can I make a suggestion, could you add a few lines of explanation to say what you are doing. It would help people to understand what's going on.
I guess that you are editing the inittab file and replacing the getty command with a login command of some sort. Are the angle brackets some sort of redirection? I guess that -f pi is specifying the user, it now doesn't seem to need a password.
The second change seems to be to add the startx command to the end of the profile file so that LXDE is run automatically.
Re: *GUIDE* Debian Auto Login & StartX
Posted: Thu Apr 26, 2012 9:44 am
by poing
Googling 'LXDE' and looking at the images a thought struck me. On Windows if the desktop background is a bitmap it will use more RAM then when it's just a solid color. If that's the same with LXDE it would probably be better to use a solid color (and set it in this script) considering the limited amount of RAM on the Pi.
Re: *GUIDE* Debian Auto Login & StartX
Posted: Mon Jan 21, 2013 10:53 am
by drbob
Awesome - pulled my hair out for awhile on this topic -- seems there is much conflicting information that spins a person in circles. This worked...
Now, a small additional question:
Want to run the command
x11vnc -forever -display :0
after startx is executed. Thought I'd be slick and try to pop it in after the startx command, but that doesn't fly... advice?
Re: *GUIDE* Debian Auto Login & StartX
Posted: Wed Feb 13, 2013 11:27 pm
by FixedCoil
@dfbob
Try ending startx with & e.g. 'startx &', this will launch startx in the background and return the shell command prompt to accept the next command.
HTH