Hello, I'm on Debian unstable. I have this problem with desktop environment.
Background on Problems:
Specifically speaking, it is with the ability to switch between KDE 3.2 and Gnome. I heard that one can do so by editing the .xinitrc file (i.e by adding exec gnome-session). I did a locate xinitrc and found it resides only in /etc/xinit/. But 2 Xsessions exist, one in /etc/X11/ and the other is in /etc/kde3/kdm/. There is however, no .xinitrc file in the home directories of other users on the same box. I can log into Gnome as root, see the desktop in its full glory but when I tried to do so as a normal user, I can't get into Gnome. What I was presented with was just the default wallpaper background and not even a bootsplash. I understand that one should unless necessary avoid logging in as root but without doing so I can't get to use Gnome as a normal user.
Questions:
1.
How can I specify the default desktop environment to use for different users on a system (e.g. user 1 use Gnome, User 2 use Kde, User 3 use AfterStep)?
2.
Is it a must that I create separate .xinitrc files for each and every user in their home directories on my system?
3.
What should the entries in .xinitrc be?
4.
Should I add exec gnome-session at the end of the xinitrc files (if there's a need for me to create separate xinitrc file for each and every user that is) after the line '. /etc/X11/Xsession' in each of the users' home directories?
5.
Do the contents for each of these xinitrc files for the different users resemble the one in /etc/xinit/xinitrc except for the exec gnome-session or exec startkde portion?
6.
What other files do I need to make changes to? Would the installation of gdm be better if one prefers to use Gnome instead of Kde?
7.)
Can I have multiple desktop environment/window manager options such as startkde, gnome-session in the same xinitrc file without confusing either kdm or gdm as to which desktop environment/window manager I or other users on system wants to use?
8.)
Must I comment out exec startkde if I only want to use Gnome exclusively?
These are the xinitrc and Xsession files I manage to find on my box...
1.)
Xsession:
Code:
#!/bin/sh
#
# /etc/X11/Xsession
#
# global Xsession file -- used by display managers and xinit (startx)
# $Id: Xsession 1119 2004-03-01 15:40:14Z branden $
#set -e
PROGNAME=Xsession
message () {
# pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
message_nonl () {
# pretty-print messages of arbitrary length (no trailing newline); use
# xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
errormsg () {
# exit script with error
message "$*"
exit 1
}
internal_errormsg () {
# exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
# One big call to message() for the sake of xmessage; if we had two then
# the user would have dismissed the error we want reported before seeing the
# request to report it.
errormsg "$*" \
"Please report the installed version of the \"xfree86-common\"" \
"package and the complete text of this error message to" \
"<debian-x@lists.debian.org>."
}
run_parts () {
# until run-parts --noexec is implemented
if [ -z "$1" ]; then
internal_errormsg "run_parts() called without an argument."
fi
if [ ! -d "$1" ]; then
internal_errormsg "run_parts() called, but \"$1\" does not exist or is" \
"not a directory."
fi
for F in $(ls $1); do
if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
if [ -f "$1/$F" ]; then
echo "$1/$F"
fi
fi
done
}
# initialize variables for use by all session scripts
OPTIONFILE=/etc/X11/Xsession.options
SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources
SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors
# attempt to create an error file; abort if we cannot
if touch "$ERRFILE" 2> /dev/null && [ -w "$ERRFILE" ] &&
[ ! -L "$ERRFILE" ]; then
chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
"\"$ERRFILE\"; look for session log/errors in" \
"\"$TMPDIR/xsession-$USER\"."
fi
else
errormsg "unable to create X session log/error file; aborting."
fi
exec > "$ERRFILE" 2>&1
# sanity check; is our session script directory present?
if [ ! -d "$SYSSESSIONDIR" ]; then
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
fi
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run_parts $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
for SESSIONFILE in $SESSIONFILES; do
. $SESSIONFILE
done
fi
exit 0
# vim:ai:et:sts=2:sw=2:tw=80:
2.) xinitrc
Code:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
. /etc/X11/Xsession
TIA.