Booting straight to desktop (Was: Run 'startx' on boot?)
Hi.
I'm all new to Linux in any form, so I just have to ask this as there's a ton of stuff for me to learn... This must propably be one of the most often asked newb-questions for which I've been trying and am currently searching an answer for: how do I/can I make the 'startx' command run when I boot up the computer, so that it goes straight to KDE (that's the GUI, right?). |
You need to install kdm, gdm, or xdm. Since you are using kde, you can use kdm.
|
You need some of the mentioned apps and probably to change the runlevel manually. If you search for "runleven graphical login" for example you find threads on this for different distros.
Another solution can be to append a line with "startx" in your user's startup files, for example if using bash shell in ~/.bashrc odr ~/bash_profile. |
To save you some time, I typed this up a while ago,
here is a copy and paste from my file: --------------------------------------------------------------------- NOTE: Before changing files, always make a back up of the unmodified file, especially if it is working. I usually give it an extension of .original. (example: cp /etc/inittab /etc/inittab.original) Edit the file /etc/inittab Change: # Default runlevel. (Do not set to 0 or 6) id:3:initdefault: to # Default runlevel. (Do not set to 0 or 6) id:4:initdefault: So that you have tty2 - tty4, while in /etc/inittab: Change: # These are the standard console login getties in multiuser mode: c1:1235:respawn:/sbin/agetty 38400 tty1 linux c2:1235:respawn:/sbin/agetty 38400 tty2 linux c3:1235:respawn:/sbin/agetty 38400 tty3 linux c4:1235:respawn:/sbin/agetty 38400 tty4 linux c5:1235:respawn:/sbin/agetty 38400 tty5 linux c6:12345:respawn:/sbin/agetty 38400 tty6 linux to # These are the standard console login getties in multiuser mode: c1:12345:respawn:/sbin/agetty 38400 tty1 linux c2:12345:respawn:/sbin/agetty 38400 tty2 linux c3:12345:respawn:/sbin/agetty 38400 tty3 linux c4:12345:respawn:/sbin/agetty 38400 tty4 linux c5:12345:respawn:/sbin/agetty 38400 tty5 linux c6:12345:respawn:/sbin/agetty 38400 tty6 linux Save and exit /etc/inittab: Then open the file /etc/rc.d/rc.4 Here is where you select your login manager. By default, you have 3 options, GDM, KDM, and XDM. To make your selection, simply put the one you want first in the list. (What it looks like by default) # Try to use GNOME's gdm session manager: if [ -x /usr/bin/gdm ]; then exec /usr/bin/gdm -nodaemon fi # Not there? OK, try to use KDE's kdm session manager: if [ -x /opt/kde/bin/kdm ]; then exec /opt/kde/bin/kdm -nodaemon fi # If all you have is XDM, I guess it will have to do: if [ -x /usr/X11R6/bin/xdm ]; then exec /usr/X11R6/bin/xdm -nodaemon fi If you want KDM, instead of GDM, copy and past the KDE section above the GDM section, so it looks like this: # KDE first: if [ -x /opt/kde/bin/kdm ]; then exec /opt/kde/bin/kdm -nodaemon fi # GDM if we have too: if [ -x /usr/bin/gdm ]; then exec /usr/bin/gdm -nodaemon fi # XDM will be our last resort: if [ -x /usr/X11R6/bin/xdm ]; then exec /usr/X11R6/bin/xdm -nodaemon fi save and exit Now when you restart you computer, the defualt runlevel will be 4 and the GUI login manager will start automatically. MAKE SURE YOUR X IS WORKING BEFORE MAKING THESE CHANGES! Good luck! -tw |
Great, thanks.
Now the putie boots to graphical login after those changes. Two more boot-up questions: Since I'm running Slackware-only on this computer, is there a way to bypass the LILO-loader (make it autoselect OS)? How about bypassing this: "Do you want to see available display modes" (or smthing like that) and 30sec wait. I have the feeling of being a pain-in-the-bottocks-newb here... :newbie: |
Set the timeout option in /etc/lilo.conf, it is in decisecond (0.1 second) unit,
then run lilo to take the change in account |
Quote:
Quote:
This can get a little tricky at times, depending on some variables (video card, kernel FB settings, etc.), Try NOT using a frame buffer in the /etc/lilo.conf file. You should have a line that looks like: vga=773 or something like that. add a " # " infront of that line. Then right below that line, add the line: vga=0 (<--- thats a 'zero' ) then run 'lilo' to rewrite your changes. It'll look ugly when the system boots, but see if you get that 'list video modes error'. What kind of video card do you have? -tw http://www.ibiblio.org/pub/Linux/doc...fer-HOWTO.html And if it get complicated: http://www.kernel.org/pub/scm/linux/...ion/svga.txt,v |
Others mentioned the 'standard' XDM (or GDM, or equivalent), but I use a different method.
At home, only I use my computer, so no need for a login. So I put this at the end of /etc/rc.d/rc.local to have X loaded as my user automatically: Code:
su - barrett -c 'PATH=/usr/X11R6/bin:$PATH startx' & |
you can open the kdm or gdm manager and set the autologin option there, dont need to make this su command....
regards |
Barret9h: As a nice feature there's an autologon- and passwordless-logon options in KDE, which I already use :)
-tw: Before doing what you suggested, I'll write here the exact message I get to avoid any confusion: "You passed an unidentified mode number. Press <RETURN> to see video modes available, <SPACE> to continue or wait 30 secs" Is this the 'frambuffer'-error you mean? |
Ok, I went ahead with LILO timeout (=0) so Linux loads immediately. I also changed LILO config as tw suggested and now the boot is streamlined straight to desktop. Thank you all for answering, on the weekend I'll try to find time to do some reading on Slackware in general.
|
Quote:
What video card do you have? -tw |
The comp is HP Omnibook XE3 (P3 700MHz/256MBRAM/20GBHD). The display adapter is S3 Savage/IX AGP 2X
|
You usally dont want 0 sec timeout. Use a short so that you can "save" and start the kernel with some options. Usefull if you mess around.
Use 2 or 3 seconds time out. That's prob. fast enough. Good luck with your Slacware, and welcome to Linux land ;) |
Mezza9 - If i'm wrong, I'm hoping someone will correct me before you try it.
I think this is the method for you to get higher screen resolution when booting. Lets pretend this is the section of your /etc/lilo.conf that boots your linux. Code:
# 2.6.11.4 BEGINS Code:
# 2.6.11.4 BEGINS This will use the vesa frame buffer to display 1024x768 16bit color. IF you are using a 2.4.xx kernel, use this line instead: Code:
append="video=vesa:ywrap,mtrr splash=silent" Then, of course run 'lilo' and reboot... the worst that can happen is you'll end up with that " select video mode within 30 sec." error. And as Jaxån mentioned, I second the motion of a 2 or 3 second delay on lilo. If you decide to try it out, post results.... I'd be interested in how it goes. -tw |
All times are GMT -5. The time now is 11:57 AM. |