LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Won't load Gnome on rc3.d (https://www.linuxquestions.org/questions/linux-general-1/wont-load-gnome-on-rc3-d-637660/)

codex73 04-24-2008 09:11 PM

Won't load Gnome on rc3.d
 
Distro: Centos 5.0
Runtime Rc3.d (Multiuser, No X)

Problem: This host starts to the command promt multiuser which is what i want. The problem is that if i call "startx" on the promnt i will not load gnome (gdm). I have to manually started using this:

#./etc/rc3.d/gdm

That will load gnome without any problem.

How can i set my default window manager again for "startx".

PD. "startx" does start a xsession but not gnome or kde... Just a green session with one term window (white).

matthewg42 04-25-2008 03:10 AM

One does not expect startx to start the GDM login manager. GDM or KDM only run from higher runlevels. startx only starts an x-session, not a login manager. Note that to start a graphical login manager you need to by root, and that startx can be run by any user.

I don't know how much it varies from system to system, and it's been a very long time since I used it. Essentially, I think startx is just a convenient way to run xinit. You can edit the .xinitrc file in your home director for the user who is going to run startx, and run gnome-session from there.

codex73 04-25-2008 07:21 AM

This is completely true and correct. GDM is the login manager and from there you select the session type (Gnome, KDE, ect).

I found this data on a site but i think it applies to all distros:
---------------------------------------------
The easiest way to start GNOME is with GDM, the GNOME Display Manager. GDM, which is installed as a part of the GNOME desktop (but is disabled by default), can be enabled by adding gdm_enable="YES" to /etc/rc.conf. Once you have rebooted, GNOME will start automatically once you log in -- no further configuration is necessary.

GNOME may also be started from the command-line by properly configuring a file named .xinitrc. If a custom .xinitrc is already in place, simply replace the line that starts the current window manager with one that starts /usr/local/bin/gnome-session instead. If nothing special has been done to the configuration file, then it is enough simply to type:

% echo "/usr/local/bin/gnome-session" > ~/.xinitrc

Next, type startx, and the GNOME desktop environment will be started.

Note: If an older display manager, like XDM, is being used, this will not work. Instead, create an executable .xsession file with the same command in it. To do this, edit the file and replace the existing window manager command with /usr/local/bin/gnome-session:

% echo "#!/bin/sh" > ~/.xsession
% echo "/usr/local/bin/gnome-session" >> ~/.xsession
% chmod +x ~/.xsession

Yet another option is to configure the display manager to allow choosing the window manager at login time; the section on KDE details explains how to do this for kdm, the display manager of KDE.
---------------------------------------------

Thanks for your help...... it's exactly what i needed.


All times are GMT -5. The time now is 01:58 PM.