runnig x at startup

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
roadrash
Pro
Posts: 91
Joined: Tue Aug 19, 2003 5:52 pm
Location: Huntingdon, England

runnig x at startup

Post by roadrash »

I have just installed gentoo linux on a pc to play around with and get a better understanding of what to do with the gentoox on my xboxes. I have just installed X windows and want to to be able to have it start during bootup like it does on gentoox. at the moment I have to log in and then type "startx".
is there a startup script that i can add this command too that will launch X without having to log in?
The_Nerd
Newbie
Posts: 4
Joined: Tue Sep 16, 2003 11:33 am

Post by The_Nerd »

you can easily do this.. i kno its enable by default on gentoox but on regualr gentoo.. all you should need to do is edit your inittab file.. go to /etc and type "pico inittab" or you can edit it with another text editor. change your run level to "3" i believe.. so the line in the file looks like..

# Default runlevel.
id:3:initdefault:

then to choose what GUI to start.. if you have mutiple ones.. edit the
/home/gentoox/.xinitrc file with pico.. if you have kde.. then it should say..

startkde

mine right now says

startxfce4

because i have gentoox booting to xfce4 instead of kde

i think that should do it.. i'm not a linux pro by any means so u may want to check with someone else to make sure my info is accurate... but i believe it should work. and you have to be root to edit those files! :D
hope i could help-The_Nerd
roadrash
Pro
Posts: 91
Joined: Tue Aug 19, 2003 5:52 pm
Location: Huntingdon, England

Post by roadrash »

Ive tried that and it didnt work. As soon as the system boots up I am prompted to login. So i have to log in as root and then type:
startx
startxfce4
if i log in as the user i created ("roadrash") and add those 2 commands to a .xinitrc file in the directory /home/roadrash i get a screen full of errors. In fact i cant even use the command reboot like i can if i log in as root.
has anyone got an idea as to how to get these 2 commands to execute upon system bootup & why i cant use the reboot command as any user other than root?
The_Nerd
Newbie
Posts: 4
Joined: Tue Sep 16, 2003 11:33 am

Post by The_Nerd »

hmm i thought that would definately work.. if i finsih my homework soon.. i'll give it a shot tonight.. if it'll help i'll send you my xinitrc files and the like for ya. just pm me or something.. in the meantime.. anyone else kno waht to write in?-The_Nerd
bikr
Novice
Posts: 46
Joined: Mon Aug 11, 2003 5:11 pm
Contact:

Post by bikr »

i believe runlevel 5 is with gui , not 3
roadrash
Pro
Posts: 91
Joined: Tue Aug 19, 2003 5:52 pm
Location: Huntingdon, England

Post by roadrash »

so if I set to run level 5 will that save me having to login and type "startx"?
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

No, dont change anything in inittab. All you do is run:

rc-update add xdm default

You never need to change default runlevels in Gentoo, there are actually only 3 used (see inside /etc/runlevels) and default is "3", so if you change to 5... youre in for a world of trouble.
roadrash
Pro
Posts: 91
Joined: Tue Aug 19, 2003 5:52 pm
Location: Huntingdon, England

Post by roadrash »

now when it boots up i get a xfree86 login box and after logging in i get a "Session menu" with only 3 options i can choose, choosesessionlistwidget, Default/Fail safe & Cancel. if i select default/failsafe or cancel i get a black screen with a mouse pointer/cross and cant do anything except hit the off switch. If i select "choosesessionlistwidget" it just sends me back to the xfree86 login box and then after login i'm back at the "session menu" again. and all i can do is hit the power off switch.

I just hit ctrl+alt+F1 and now i'm am back in the shell (phew). how can I stop it doing this? now if i type startx i just get the message "fatal server error" server is already runningfor display 0
maic
Newbie
Posts: 5
Joined: Thu Sep 25, 2003 10:26 pm

Post by maic »

Hi !

When the loginscreen appears just press "strg + alt + F2" then login as root.
then cd to /etc/rc.config .... scroll down to the end of the config file and add here:
XSESSION="kde-3.1.3" for example.

To kill the graphical loginscreen just type "killall kdm" for KDM or "killall gdm" for GDM.
after killing the loginscreen just type "startx" to run your X.

When you get any error messages reconfigure your XF86Config file in /etc/X11/



maic
Post Reply