
On 2010-08-19 17:20, dwgallien wrote: ...
I'm asking about how to start gnome directly and by default from runlevel 3 by using the "startx" command.
The script starts the server and then tries to call a window manager. It will execute .xinitrc if that is found, in that file there would be included a statement like "exec twm" (this is the example in the man page). However, install this is not set up on a vanilla install. So when not using xinitrc, the script uses a env variable, $WINDOWMANAGER, which is set at logon, it is taken from /etc/sysconfig/windowmanager DEFAULT-WM. The value is the name of the program which actually starts up the DE or WM, so e.g., for KDE it is the literal "startkde". But note that what is passed to startx is the fully qualified file name, i.e., /usr/bin/startkde. If there is not a valid variable, startx will also look in /usr/X11R6/bin to find the startup program there.
Ah, at logon. However, it is ignored, even after running SuSEconfig and relogin: ## Path: Desktop/Window manager ## Description: ## Type: string(gnome,startkde,startkde3,startxfce4,twm) ## Default: kde ## Config: profiles,kde,susewm # # Here you can set the default window manager (kde, fvwm, ...) # DEFAULT_WM="gnome" According to the comments, the correct string is "gnome", but it doesn't work: cer@nimrodel:~> echo $WINDOWMANAGER /usr/X11R6/bin/kde
Try this . . . boot into runlevel 3 and logon. Immediately do echo $WINDOWMANAGER. When you do startx, that is what is being executed.
which it is kde, regardless of the default global setting. I have the feeling that it is only used as the initial settings for new users in the runlevel 5 login manager (gdm, kdm, xdm...). Might be a bug :-? I have to try on another computer to verify.
The variable can overriden, too. I found that "startx startkde" failed while "startx /usr/bin/startkde" worked; "startx twm" failed but "startx /usr/bin/twm" worked, etc. If changing the literal in sysconfig doesn't translate into a windowmanager variable which works, try "startx <fully qualified name>". Unfortunately since I don't have gnome, I can't provide it's startup program name.
Nice hint, thanks. Yes, I always forget that one, because I knew it once and had forgotten it. Yes, "startx /usr/bin/gnome" works. I was looking for a "startgnome" script, but it does not exist. -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar))