i created .xinittrc?

  • Thread starter Thread starter Oz
  • Start date Start date
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

How can i know if i created the file or i have XDM?
 
Run the ls() command with -a option to list hidden files/dirs (those that begin with dot ('.')).

Code:
ls -al | grep xinit
-rw-------   1 od  od        26 Mar 13 06:53 .xinitrc


There is no display manager configured by default. So if you haven't touched anything on XDM or GDM or KDM, then there's nada. If all you got is black screen (console) after booting up, that's another sign that you don't have any display manager configured.
 
  • Thanks
Reactions: Oz
Greetings,
If you're like me, and like to test/work with several different window-managers.
I find it easier to create a custom ~/.xinitrc file in my home directory. Then it's simply a matter of commenting out one window-manager, and un-commenting another. To change my choice of window-manager.
It looks something like this:
Code:
# ICEWM
icewmbg &
exec icewm-session
# GNOME
#xterm -ls &
#exec gnome-session
# FLUXBOX
#exec gkrellm &
#startfluxbox
# KDE (3)
#startkde
# KDE (4)
#exec /usr/local/kde4/bin/startkde
As you can see from the example above, my current session is managed by IceWM (/usr/ports/x11-wm/icewm).
Anyway, I thought this might be helpful knowledge for those not already completely familiar with X.

HTH
Best wishes.
 
Back
Top