This manual for example does not say what should be in this file?
Or this is the answer :
----------------------------------------

startx(1) looks for the file .xinitrc in the user's home directory. .xinitrc is usually a shell script, which can start as many X "client" (applications that use X) programs as desired. When this script exits, the X server shuts down. Generally, most of the programs run by this script should run in the background, though the last one should run in the foreground (typically the window manager); when it exits, the script will exit, and X will be shutdown.

In the simplest case, this can be as little as just the name of the window manager you wish to invoke:

/root/.xinitrc implies that you are logging into the system as root. This is not generally considered best practice. Users should log into their systems using non-root accounts using su(1) or sudo(8)only when needed. The point here is to minimize the possibility of doing irreparable damage from issuing incorrect commands.

As to the notation used earlier, ~/.xinitrc, the tilde, (~), expands to the home directory of the current user.

So, if you have logged in with a non-root account, /root/.xinitrc will have no effect since it customizes the X environment only for the root user.

This manual for example does not say what should be in this file?
Or this is the answer :
...

You have answered your own question.

barti, there is no reason to copy-and-paste large sections of the FAQ into messages here unless you have specific questions about a sentence or two. Otherwise, just refer to the section number(s).

Likewise, creating several different messages, one after another, each with separate questions, is unnecessary. Simply edit a single message. I suspect this will help you organize your own thoughts into a more coherent pattern as well.

If you have performed the first reboot, you are no longer installing; you are now in the process of configuring. You should be using a non-root account now, only going into root through su(1) or sudo(8). Simply logging into the root account is sloppy, dangerous, & teaches nothing. Using a non-root account will show you when specifically root access is needed.

Quote:

What should I write there ?

I can only assume you are referring to ~/.xinitrc as I can't read your mind, & you certainly aren't overly specific in your messages. You earlier quoted Section 11.5.2 which answered this question. What follow-up questions do you have?

hi barti ! Congratulations ! I envy you since you have gnome working :-) .. (poor me, I had to regress to 5.0 just to install gnome 2 then upgrade etc ... )
To avoid logging as root , set sudo this way :
0- Login as root with su
1- run this command : visudo
2- uncomment (remove initial #) this line to use sudo without password :

Code:

%wheel ALL=(ALL) NOPASSWD: SETENV: ALL

The ~/.xinitrc file is needed if you want to run some window manager other than default fvwm that you described as grey (fvwm's conf file is /etc/X11/xinit/xinitrc)

The X -configure commands is needed only when X fails to start so you have to let load all drivers to get a second chance with some new or exotic hardware.
For me it's this simple :
no xdm , no .xinitrc , just install yoyr favorite window manager and start it with the command xinit .. example : golem , a lovely window manager :

Code:

sudo pkg_add golem

$ xinit /usr/local/bin/golem
or make an alias in your .profile (it's in in your home directory)

barti , get the ftplist file and choose the closest mirror to you.
you put a link about .xinitrc in Arch .. while Arch allows for more tweaks and customizations , OpenBSD thinks buttons are bad and me as a newbie user I don't need to set those .. in the end all you need is CLI+some powerful desktop (gnome/kde) or CLI+some lightweight wm for legacy hardware .. the shiny idea of having tens of window managers set for you to choose from doesn't fascinate an OpenBSD user .. :-)

Quote:

What did u say about version 5.0 ?

I had to first install 5.0 and gnome-session set .. then upgrade to 5.1 .. because 5.0 is the the last gnome2 release .. maybe it has some sec risk or something .. if only the gnome team keeps gnome2 parallel to gnome3 in the successful fashion of kde3 // kde4 ..

Quote:

Maybe it is a bug in the system? my gray screen?

You see .. that's why I'd rather you start X with a window manager other than gnome3 ..
first remove .xinitrc and install let's say : golem ? .. then
and as a user , do :

Code:

xinit /usr/local/bin/golem

if it starts , the problem is with gnome3 simply.
Usually when X fails , as root we reconfigure X doing :

Code:

# X -configure
# X -config /root/xorg.conf.new

but your case seems like mine : gnome3 is already a heavy guest now :-(

The grey screen (and sometimes the green screen !) happens when a machine fails to meet the gnome 3 requirements (my case with Acer Aspire 5610) .. I suggested that you experiment with another non-problematic window manager (kde , xfce4 , ...) .. your X is working since xdm once worked.I mentioned X -configure for the info only since you asked.

Quote:

Do I need both? if yes then why?

I don't need any and you won't .. xinit (or startx) /path/to/new_window_manager would suffice when you want to use a newly installed window manager ! I gave you examples.