X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fconfigure-xorg;h=a47d6d917cf79fe9033e5291c46aae134703f959;hb=23534737a153c4084e3dd44a3e6cdcf2537aee01;hp=75b2d53603fe82a364fe0db282dfbe6e9c0d14a0;hpb=9d1f28295ec1c295329a0a9dd319ac86dbad8015;p=hvlinux.git diff --git a/stage4/configure-xorg b/stage4/configure-xorg index 75b2d53..a47d6d9 100755 --- a/stage4/configure-xorg +++ b/stage4/configure-xorg @@ -9,11 +9,13 @@ cat > /etc/skel/.xinitrc << "EOF" 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 @@ -43,6 +45,13 @@ usermodmap=$HOME/.Xmodmap sysresources=/usr/lib/X11/xinit/.Xresources sysmodmap=/usr/lib/X11/xinit/.Xmodmap +if [ -r /etc/profile ]; then + . /etc/profile +fi +if [ -r ~/.bash_profile ]; then + . ~/.bash_profile +fi + # merge in defaults and keymaps if [ -f $sysresources ]; then @@ -61,8 +70,10 @@ if [ -f "$usermodmap" ]; then 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 @@ -90,9 +101,6 @@ EOF 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. @@ -156,4 +164,7 @@ EOF sed -i -e "s!_VIDEO_CARD_DRIVER_!${XORG_VIDEO_DRIVER}!g" /etc/X11/xorg.conf +# Updating font information cache. +fc-cache -f + exit $?