Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
startx automatically
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20099

PostPosted: Tue Sep 10, 2002 6:20 pm    Post subject: Reply with quote

Anyone up for making a :remove foot from mouth: emoticon?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
johpe916
n00b
n00b


Joined: 13 Sep 2002
Posts: 45
Location: Sweden

PostPosted: Tue Oct 22, 2002 10:34 am    Post subject: Reply with quote

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
View user's profile Send private message
herbie
Guru
Guru


Joined: 09 Oct 2002
Posts: 319
Location: London UK

PostPosted: Mon Dec 09, 2002 10:12 pm    Post subject: Reply with quote

A rather nice solution to this involving a short c program is described here
http://www.linuxgazette.com/issue72/chung.html

Herbie.
Back to top
View user's profile Send private message
shakti
Guru
Guru


Joined: 15 May 2002
Posts: 358
Location: omnipresent

PostPosted: Thu May 22, 2003 4:56 am    Post subject: Reply with quote

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
Code:
xdm
. It takes about 8 to 10 seconds on my pII400 but at least it comes up. While issuing
Code:
startx
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
View user's profile Send private message
nadamsieee
Guru
Guru


Joined: 30 May 2003
Posts: 340
Location: Atlanta, GA, USA

PostPosted: Tue Jul 13, 2004 3:38 am    Post subject: Reply with quote

herbie wrote:
A rather nice solution to this involving a short c program is described here
http://www.linuxgazette.com/issue72/chung.html

Herbie.


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
View user's profile Send private message
Root Moose
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2004
Posts: 112

PostPosted: Tue Nov 09, 2004 6:07 pm    Post subject: Reply with quote

Yep, this works quite nicely.

r@m
Back to top
View user's profile Send private message
bassvandijk
Guru
Guru


Joined: 13 Sep 2002
Posts: 306
Location: Haps, Netherlands

PostPosted: Tue Jan 18, 2005 4:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
gi1242
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jul 2004
Posts: 146

PostPosted: Sat May 14, 2005 6:02 am    Post subject: Reply with quote

Hmm. I just found this thread while browsing. I've been auto-logging myself in for a *while* now by tweeking my inittab. Check out https://forums.gentoo.org/viewtopic-t-241621.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum