dbus-launch --exit-with-session wmaker
EOF
-cat > /etc/skel/.Xdefaults << "EOF"
+X_RESOURCES_FILE="Xresources"
+
+cat > /etc/skel/.${X_RESOURCES_FILE} << "EOF"
xterm*scrollBar: false
xterm*rightScrollBar: false
xterm*saveLines: 1000
-xterm*geometry: 120x45+70+50
+xterm*geometry: 160x60+70+50
xterm*background: #000000
xterm*foreground: #A8A8A8
xterm*color0: #000000
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
-sysresources=/usr/lib/X11/xinit/.Xresources
-sysmodmap=/usr/lib/X11/xinit/.Xmodmap
+sysresources=/usr/lib/xorg/xdm/Xresources
+sysmodmap=/etc/X11/Xmodmap
+
+if [ -r /etc/profile ]; then
+ . /etc/profile
+fi
+if [ -r ~/.bash_profile ]; then
+ . ~/.bash_profile
+fi
# merge in defaults and keymaps
xmodmap "$usermodmap"
fi
-# now, we see if xdm/gdm/kdm has asked for a specific environment
+# To fix bug "Cannot open display..." when running commands as su root:
+xhost +localhost
+# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
case $1 in
chmod 755 /etc/skel/.xsession
-cp /etc/skel/.{xinitrc,Xdefaults,xsession} /root
-cp /etc/skel/.{xinitrc,Xdefaults,xsession} /home/${REGUSER}
-
# When needed, the X Window System creates the directory /tmp/.ICE-unix if it
# does not exist. If this directory is not owned by root, the X Window System
# delays startup by a few seconds and also appends a warning to the logfile.
/tmp/.ICE-unix dir 1777 root root
EOF
-# Packages in Xorg store their configuration files in /usr/lib/X11
-# by default. This is strictly against FHS guidelines. Correct the
-# installation /etc/X11 and create symlinks in the original location:
-mkdir -v -p /etc/X11
-
-for file in /usr/{lib/X11/{xinit,xdm},share/X11/app-defaults}; do
- if [ -f ${file} -a ! -h ${file} ]; then
- mv -v ${file} /etc/X11/ 2> /dev/null
- ln -svfT /etc/X11/$(basename $file) $file
- fi
-done
-
if [ "x${INST_TYPE}" = "xltsp-server" ]; then
# Enable remote xdm login for LTSP clients
sed -i -e "s@^\(DisplayManager.requestPort.*\)@!\1@g" /etc/X11/xdm/xdm-config