[답변].Xdefaults외
[답변].Xdefaults외
1999-12-02 00:00 - 넷사랑
리눅스의 설정 내용을 참고로 드립니다.
1./etc/X11/xdm/Xsession
#!/bin/bash -login
# (c) 1999 Red Hat Software, Inc.
xsetroot -solid '#356390'
# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ( cp /dev/null "$errfile" 2> /dev/null )
then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
break
fi
done
# clean up after xbanner
if [ -x /usr/X11R6/bin/freetemp ]; then
/usr/X11R6/bin/freetemp
fi
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0
;;
gnome)
exec gnome-session
;;
kde)
exec startkde
;;
anotherlevel)
# we assume that switchdesk is installed.
exec /usr/share/apps/switchdesk/Xclients.anotherlevel
;;
esac
esac
# otherwise, take default action
if [ -x "$HOME/.xsession" ]; then
exec "$HOME/.xsession"
elif [ -x "$HOME/.Xclients" ]; then
exec "$HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
exec /etc/X11/xinit/Xclients
else
exec xsm
fi
2./etc/X11/xdm/Xresources
! $XConsortium: Xresources /main/8 1996/11/11 09:24:46 swick $
xlogin*login.translations: #override
CtrlR: abort-display()n
F1: set-session-argument(failsafe) finish-field()n
CtrlReturn: set-session-argument(failsafe) finish-field()n
Return: set-session-argument() finish-field()
xlogin*borderWidth: 3
xlogin*greeting: CLIENTHOST
xlogin*namePrompt: login:040
xlogin*fail: Login incorrect
#ifdef COLOR
xlogin*greetColor: CadetBlue
xlogin*failColor: red
*Foreground: black
*Background: #fffff0
#else
xlogin*Foreground: black
xlogin*Background: white
#endif
XConsole.text.geometry: 480x130
XConsole.verbose: true
XConsole*iconic: true
XConsole*font: fixed
Chooser*geometry: 700x500+300+200
Chooser*allowShellResize: false
Chooser*viewport.forceBars: true
Chooser*label.font: *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label: XDMCP Host Menu from CLIENTHOST
Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-*
3. Xauthority파일
이 파일은 기본적으로 처음부터 내용이 들어있는 것이 아니며
host와 X server 사이에 XDM을 사용하여 로그인 할때 서로
MIT-MAGIC-COOKIE-1 을 사용하기로 설정되어 있을 때 machine-readable code를
Home Directory안에 있는 자신 소유의 .Xauthority 파일 안에
넣게 되며 차후에 client 가 X server에 접근하기 위해서
사용되어 지는 것입니다.
1./etc/X11/xdm/Xsession
#!/bin/bash -login
# (c) 1999 Red Hat Software, Inc.
xsetroot -solid '#356390'
# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ( cp /dev/null "$errfile" 2> /dev/null )
then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
break
fi
done
# clean up after xbanner
if [ -x /usr/X11R6/bin/freetemp ]; then
/usr/X11R6/bin/freetemp
fi
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0
;;
gnome)
exec gnome-session
;;
kde)
exec startkde
;;
anotherlevel)
# we assume that switchdesk is installed.
exec /usr/share/apps/switchdesk/Xclients.anotherlevel
;;
esac
esac
# otherwise, take default action
if [ -x "$HOME/.xsession" ]; then
exec "$HOME/.xsession"
elif [ -x "$HOME/.Xclients" ]; then
exec "$HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
exec /etc/X11/xinit/Xclients
else
exec xsm
fi
2./etc/X11/xdm/Xresources
! $XConsortium: Xresources /main/8 1996/11/11 09:24:46 swick $
xlogin*login.translations: #override
CtrlR: abort-display()n
F1: set-session-argument(failsafe) finish-field()n
CtrlReturn: set-session-argument(failsafe) finish-field()n
Return: set-session-argument() finish-field()
xlogin*borderWidth: 3
xlogin*greeting: CLIENTHOST
xlogin*namePrompt: login:040
xlogin*fail: Login incorrect
#ifdef COLOR
xlogin*greetColor: CadetBlue
xlogin*failColor: red
*Foreground: black
*Background: #fffff0
#else
xlogin*Foreground: black
xlogin*Background: white
#endif
XConsole.text.geometry: 480x130
XConsole.verbose: true
XConsole*iconic: true
XConsole*font: fixed
Chooser*geometry: 700x500+300+200
Chooser*allowShellResize: false
Chooser*viewport.forceBars: true
Chooser*label.font: *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label: XDMCP Host Menu from CLIENTHOST
Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-*
3. Xauthority파일
이 파일은 기본적으로 처음부터 내용이 들어있는 것이 아니며
host와 X server 사이에 XDM을 사용하여 로그인 할때 서로
MIT-MAGIC-COOKIE-1 을 사용하기로 설정되어 있을 때 machine-readable code를
Home Directory안에 있는 자신 소유의 .Xauthority 파일 안에
넣게 되며 차후에 client 가 X server에 접근하기 위해서
사용되어 지는 것입니다.
이전 조회수: 143