SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?).
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645
Rep:
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.
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!
I have the feeling of being a pain-in-the-bottocks-newb here...
NOPE
Quote:
How about bypassing this: "Do you want to see available display modes" (or smthing like that) and 30sec wait.
If your getting the error I THINK you are getting (frambuffer), you have to adjust your lilo video mode.
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?
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' &
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.
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.
(the additional lines are in red... obviously)
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"
The only difference being "vesa" instead of "vesafb"
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.