View previous topic :: View next topic |
Author |
Message |
pjp Administrator
Joined: 16 Apr 2002 Posts: 20099
|
Posted: Tue Sep 10, 2002 6:20 pm Post subject: |
|
|
Anyone up for making a :remove foot from mouth: emoticon? _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
johpe916 n00b
Joined: 13 Sep 2002 Posts: 45 Location: Sweden
|
Posted: Tue Oct 22, 2002 10:34 am Post subject: |
|
|
Okey, I wanted to do an automated login(without gdm,kdm,xdm) and after that startx. I tried the script this forum talks about but I got the exact same result as some people before me. It didn't work.
Then I found this page,
http://www.krzywanek.de/linux/autologin.htm
I edited /etc/inittab and added "/usr/X11R6/bin/startx" in /sbin/autologin and added the path environment to the same file.
This works ok. Just one thing that puzzles me. I sure I'm logged on as root (this is what I wanted). But somehow mozilla and xmms has forgotten my preferences. My home directory is /root, and that is where the needed files are. Not a big problem, just wondered if anyone had anything interesting to say about it.
/Johan |
|
Back to top |
|
|
herbie Guru
Joined: 09 Oct 2002 Posts: 319 Location: London UK
|
|
Back to top |
|
|
shakti Guru
Joined: 15 May 2002 Posts: 358 Location: omnipresent
|
Posted: Thu May 22, 2003 4:56 am Post subject: |
|
|
johpe916 wrote: | Okey, I wanted to do an automated login(without gdm,kdm,xdm) and after that startx. I tried the script this forum talks about but I got the exact same result as some people before me. It didn't work.
Then I found this page,
http://www.krzywanek.de/linux/autologin.htm
I edited /etc/inittab and added "/usr/X11R6/bin/startx" in /sbin/autologin and added the path environment to the same file.
This works ok. Just one thing that puzzles me. I sure I'm logged on as root (this is what I wanted). But somehow mozilla and xmms has forgotten my preferences. My home directory is /root, and that is where the needed files are. Not a big problem, just wondered if anyone had anything interesting to say about it.
/Johan |
now i would really like to do that as this is what i need for my stand alone multimedia box. The only problem is that i can only start X with . It takes about 8 to 10 seconds on my pII400 but at least it comes up. While issuing gives me an error Code: | cannot find free VT |
Now i can change VT's with ctrl-alt f1 truw 6.....strange
So i keep on fideling, any ideas are apreciated. When i get this to work i could translate this how to to english.... _________________ Using Gentoo since 2002. |
|
Back to top |
|
|
nadamsieee Guru
Joined: 30 May 2003 Posts: 340 Location: Atlanta, GA, USA
|
Posted: Tue Jul 13, 2004 3:38 am Post subject: |
|
|
Great find, herbie. I have this working on my laptop with the default user as "lapper". Here is the C code I used (autologinlapper.c):
Code: |
int main() {
execlp("login", "login", "-f", "lapper", 0);
} |
Here is the line from /etc/inittab:
Code: | #c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c1:12345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologinlapper 38400 tty1 |
And here is the lapper account's .bash_profile:
Code: | #This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc
# Auto-login to X
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/vc/1 ]; then
startx
fi |
The key is substituting YOUR_LOGIN_NAME for lapper in all the above examples, and getting the $(tty) == /dev/vc/1 line correct (Gentoo isn't given as an example in the original article).
WARNING
If you don't get the C program correct, or if you mess up the line in inittab, you'll have to use your Gentoo install CD as a rescue disk. BE SURE TO MAKE A BACKUP OF /etc/inittab !!! _________________ nadams (at) ieee (dot) org |
|
Back to top |
|
|
Root Moose Tux's lil' helper
Joined: 29 Jan 2004 Posts: 112
|
Posted: Tue Nov 09, 2004 6:07 pm Post subject: |
|
|
Yep, this works quite nicely.
r@m |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Tue Jan 18, 2005 4:53 pm Post subject: |
|
|
I have one problem.
Somehow the environment variable DISPLAY is set before .bashrc is sourced causing the if [ -z "$DISPLAY" ] condition to fail.
I noticed this: Code: | pa -A | grep login
7245 login -- DISPLAY=:0.0 |
How is that -- DISPLAY=:0.0 argument coming there? |
|
Back to top |
|
|
gi1242 Tux's lil' helper
Joined: 29 Jul 2004 Posts: 146
|
|
Back to top |
|
|
|