• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

A couple of Gentoo questions

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
To start an X environment, su to root, and run startx. It will bring up whichever DM you set in your config file, from which you can log in. Also, you can
Code:
rc-update add xdm default
to have X autostart every time you boot.
 
It doesn't for me... it just starts X as root, and always has.
 
X should be started as root, and in my limited experience it always has been. BUT, once you startx, it should come to a login manager where you choose whether you're logging in as root or a user. That's what I'm not getting right now. Root logs directly to the desktop in kde, and my user logs into something else. X11 I guess? Either way I'm guessing the rc-update xdm default will fix that since it will have to ask for a login once kde starts.
 
I've never seen a system configured like this. In general X should not be started as root, but rather you should start XDM/GDM/KDM or whatever you use as root, then this will make you log in to go further and start up X with KDE/GNOME/etc.
 
When configured properly, startx should literally just "start X" on vt7 (or whichever vt is free). And starting X is _all_ it should do. At that point XDM/GDM/KDM/whatever-DM should pop up and ask for a login on the X session.

pesjaboy: Make sure you've entered the correct KDE version in the config. It requires something like kde-3.5.1 for the setting. emerge -pv kdebase-startkde should give you the version number you need. What did you emerge to install KDE? If you didn't use kdebase-startkde, I suggest you do so :)
 
When configured properly, startx should literally just "start X" on vt7 (or whichever vt is free). And starting X is _all_ it should do. At that point XDM/GDM/KDM/whatever-DM should pop up and ask for a login on the X session.

XDM/GDM/KDM are services/daemons, and if they aren't running, startx will just put you right into your desktop environment. This is the normal, expected behavior. If the service is running, it will automatically bring you to a login screen using your display manager. startx is meant for starting X from the command line, not for starting display managers, which, if you are using them, will start up on their own anyways when the PC starts. startx is for people that don't use display managers.

Obviously, you can hack the stuff to do pretty much anything you want, but that doesn't mean it is normal.
 
regardless of what login manager you use, the init script being called is always xdm.
when xdm is run it reads the /etc/conf.d/xdm file, if you want kde's login manager you change the line in that file. its well explained in that file so no need for me to go in it.

Code:
nano /etc/conf.d/xdm
and yea, of course who ever issues startx will log in as that user with what ever window manager/desktop enviroment is set up, by passing the login manager.
so if root is logged in. startx will be running as root with full permissions (never recommended.)

now only someone with super user access can start xdm, be it su or sudo
/etc/init.d/xdm start

and as said above to get it to start at boot up
Code:
 rc-update add xdm defalut

that will take you straight to the login manager at boot
 
Last edited:
Oh, duh, now I see where I was thinking wrong :) You're not looking for startx. You want this:
Code:
/etc/init.d/xdm start
 
When configured properly, startx should literally just "start X" on vt7 (or whichever vt is free). And starting X is _all_ it should do. At that point XDM/GDM/KDM/whatever-DM should pop up and ask for a login on the X session.

pesjaboy: Make sure you've entered the correct KDE version in the config. It requires something like kde-3.5.1 for the setting. emerge -pv kdebase-startkde should give you the version number you need. What did you emerge to install KDE? If you didn't use kdebase-startkde, I suggest you do so :)
I did use kdebase-startkde when I emerged it. I knew I wanted to use the split builds as opposed to the monolithics. Not so much for the reasons the split builds were created, but just because I didn't want every single app that would come with kde.
regardless of what login manager you use, the init script being called is always xdm.
when xdm is run it reads the /etc/conf.d/xdm file, if you want kde's login manager you change the line in that file. its well explained in that file so no need for me to go in it.

Code:
nano /etc/conf.d/xdm
and yea, of course who ever issues startx will log in as that user with what ever window manager/desktop enviroment is set up, by passing the login manager.
so if root is logged in. startx will be running as root with full permissions (never recommended.)

now only someone with super user access can start xdm, be it su or sudo
/etc/init.d/xdm start

and as said above to get it to start at boot up
Code:
 rc-update add xdm defalut

that will take you straight to the login manager at boot

Thanks akward- that is in fact the set of commands I was looking for for what I'm trying to do as opposed to startx. And, you just saved me from having to hunt them down again :thup:

Now that I've got that all finished I rebooted and I got an error that it could not start the display manager:
Code:
start-stop-daemon: stat /usr/bin/xdm: No such file or directory (No such file or directory)
So it just put me right into the command line login prompt. I logged in as root and tried to do /etc/init.d/xdm start, but it said that xdm has already been started. That doesn't make sense considering it just told me that it couldn't start the display manager.
 
Last edited:
Rather than another edit...

If however I simply run kdm from that point, it opens kdm and I get the login screen.
 
There are two settings (XSESSION and DISPLAYMANAGER, I think). One is in /etc/conf.d/xdm, and the other is in (I think) /etc/conf.d/rc (or it might be in /etc/rc.conf). One of them needs to be set to kdm, and the other to kde-3.5.2, or whatever version of kde you have installed. I don't have a working Gentoo system at the moment so I can't be more specific :(
 
Aha, I forgot about the setting in re.conf. I finally got the versions right in each file too, hehe. Thanks! Now to get that sound working.
 
Back