Setup .xinitrc and .xsession properly in /etc/skel.

This commit is contained in:
Linus Miller 2015-11-15 21:01:13 +01:00
parent 0c22536cfe
commit 2a99ca5ee3
2 changed files with 29 additions and 10 deletions

View File

@ -1,25 +1,36 @@
#!/bin/sh #!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
# load any default xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ]; then if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f" [ -x "$f" ] && . "$f"
done done
unset f unset f
fi fi
# load all settings in .Xresource file (mainly for urxvt terminal) # load all settings in .Xresource file (mainly for urxvt terminal)
if [ -s ~/.Xresources ]; then if [ -s ~/.Xresources ]; then
xrdb ~/.Xresources xrdb ~/.Xresources
fi fi
# load any user xmodmappings. script="$HOME/.xsession"
if [ -s ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap if [ -x "$script" -a ! -d "$script" ]; then
echo "Loading xsession script $script"
. "$script"
fi fi
# update X font locations ## DE: awesome
xset +fp /usr/share/fonts/local #exec awesome
xset fp rehash
## DE: XFCE4
exec $1 exec startxfce4
## DE: Gnome
# exec gnome-session
## DE: KDE
#exec startkde

8
etc/skel/.xsession Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
#
# ~/.xsession
#
# update X font locations
xset +fp /usr/share/fonts/local
xset fp rehash