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,6 +1,9 @@
#!/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
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
@ -13,13 +16,21 @@ if [ -s ~/.Xresources ]; then
xrdb ~/.Xresources
fi
# load any user xmodmappings.
if [ -s ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
script="$HOME/.xsession"
if [ -x "$script" -a ! -d "$script" ]; then
echo "Loading xsession script $script"
. "$script"
fi
# update X font locations
xset +fp /usr/share/fonts/local
xset fp rehash
## DE: awesome
#exec awesome
exec $1
## DE: XFCE4
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