Skip to content
Snippets Groups Projects
configure 455 B
Newer Older
Eric Vidal's avatar
Eric Vidal committed
#!/bin/bash

mod="${1}"
home=$(homeof ${mod})
uid=$(id -u ${mod})
gid=$(id -g ${mod})

if [[ -e ${home}/.xsession ]]; then
	mv ${home}/.xsession ${home}/.xsession.bak
	chown ${uid}:${gid} ${home}/.xsession.bak
fi
if [[ -e ${home}/.xinitrc ]]; then
	mv ${home}/.xinitrc ${home}/.xinitrc.bak
	chown ${uid}:${gid} ${home}/.xinitrc.bak
fi

cp .xsession ${home}/
chown ${uid}:${gid} ${home}/.xsession

cp .xinitrc ${home}/
chown ${uid}:${gid} ${home}/.xinitrc